Troubleshooting¶
Common issues and their solutions when working with Clown.
Daemon Issues¶
Daemon Not Starting¶
Symptoms:
- Commands hang or timeout
- "Connection refused" errors
Solutions:
-
Check if daemon is already running:
-
Check for stale socket file:
-
Start daemon manually with debug logging:
-
Check daemon logs:
Daemon Keeps Stopping¶
Cause: Daemon exits after idle timeout by default.
Solution: Keep daemon running indefinitely:
Profile Issues¶
Profile Creation Fails¶
Symptoms:
- "Provider not compatible with agent" error
- "Failed to run Rhai script" error
Solutions:
-
Verify agent-provider compatibility:
-
Sync registry for latest scripts:
-
Check if custom script has syntax errors:
Profile Won't Run¶
Symptoms:
- Agent exits immediately
- "Command not found" error
Solutions:
-
Verify agent is installed:
-
Check profile configuration:
-
Verify API key is valid:
-
Run with debug logging:
Wrong Model Being Used¶
Cause: Model specified in profile doesn't match expected.
Solutions:
-
Inspect profile:
-
Recreate with explicit model:
Agent Issues¶
Agent Not Detected¶
Symptoms:
- Agent shows as "Not Installed" in
agents list - "Agent not found" error
Solutions:
-
Verify binary is in PATH:
-
Verify detection command works:
-
Sync registry to update manifests:
-
Check agent manifest detection config:
Wrong Version Displayed¶
Cause: Detection cache is stale.
Solutions:
-
Force registry sync:
-
Clear detection cache:
Provider Issues¶
API Key Not Working¶
Symptoms:
- Authentication errors from provider
- "Invalid API key" messages
Solutions:
- Verify key is correct with provider directly
-
Recreate profile to re-enter key:
-
Check environment variables aren't overriding:
Wrong Endpoint Used¶
Symptoms:
- Connection errors
- Requests going to wrong region
Solutions:
-
Specify endpoint explicitly:
-
Check profile endpoint:
-
Verify provider endpoints:
Proxy Issues¶
Proxy Not Starting¶
Symptoms:
- "Failed to start proxy" error
- Agent can't connect to local endpoint
Solutions:
-
Check if ultrallm is installed:
-
Check if port is in use:
-
View proxy logs:
-
Start proxy manually to see errors:
Routing Not Working¶
Symptoms:
- All requests go to same provider
- Rules seem to be ignored
Solutions:
-
Verify routing rules:
-
Check generated config:
-
Ensure API keys are set for all target providers
Connection Refused¶
Symptoms:
- Agent gets "connection refused" error
- Proxy appears to be running
Solutions:
-
Verify proxy status:
-
Check port matches profile config:
-
Test proxy health endpoint:
Usage Tracking Issues¶
No Usage Data Showing¶
Symptoms:
ringlet usageshows zeros- "No data for period" message
Solutions:
-
Verify daemon is running:
-
Check if profiles have been used:
-
Verify telemetry directory exists:
Costs Showing as Null¶
Cause: Cost calculation only works for "self" provider.
Solutions:
-
Check provider type:
-
Verify pricing data is synced:
-
Sync registry:
Import Not Finding Data¶
Symptoms:
- "No data found" when importing Claude data
- Import shows 0 records
Solutions:
-
Verify Claude directory exists:
-
Check for stats-cache.json:
-
Specify path explicitly:
Registry Issues¶
Sync Fails¶
Symptoms:
- "Network error" during sync
- Timeout errors
Solutions:
- Check internet connectivity
-
Use offline mode:
-
Check if GitHub is accessible:
-
Use environment variable to override URL:
Custom Manifest Not Loaded¶
Symptoms:
- Custom agent/provider not appearing
- Changes not taking effect
Solutions:
-
Verify file location:
-
Check TOML syntax:
-
Force sync:
Hooks Issues¶
Hook Not Firing¶
Symptoms:
- Command not executing
- No output from hook
Solutions:
-
Verify event type is correct (case-sensitive):
-
Check matcher pattern:
-
Ensure agent supports hooks:
-
Enable debug logging:
Hook Command Errors¶
Symptoms:
- Hook runs but fails
- Partial output
Solutions:
-
Test command manually:
-
Check
$EVENTvariable quoting: -
Increase timeout if needed:
Getting Help¶
If you're still stuck:
-
Check logs:
-
Enable debug mode:
-
Report issues: https://github.com/neul-labs/ccswitch/issues
-
Include in bug reports:
- Clown version (
ringlet --version) - OS and version
- Agent and provider being used
- Relevant log output
- Steps to reproduce