Troubleshooting
Common issues and fixes. Start with rivetos doctor — it checks everything.
Quick Diagnostics
npx rivetos doctor # 12-category health checknpx rivetos test # Smoke test (provider, memory, tools)npx rivetos status # Runtime overviewnpx rivetos logs # Tail logsnpx rivetos logs --level error # Errors onlyAgent Won’t Start
”Config validation failed”
[RivetOS] [ERROR] [Config] Validation failed: ✗ agents.opus.provider: "anthropic" not found in providersFix: Your config.yaml references a provider that isn’t defined. Add it to the providers section, or fix the agent’s provider field.
npx rivetos config validate # Dry-run validation”Cannot find module”
Error: Cannot find module '@rivetos/core'Fix: Run npm install from the repository root. If that doesn’t work:
rm -rf node_modulesnpm install“EADDRINUSE: address already in use :3100”
Another instance is already running on port 3100.
npx rivetos stop # Stop the running instance# ornpx rivetos status # Check what's runningkill $(cat ~/.rivetos/rivetos.pid) # Force kill via PID file”PID file exists but process is not running”
Stale PID file from a crashed instance.
rm ~/.rivetos/rivetos.pidnpx rivetos startAgent Won’t Respond
Check the basics
- Is the agent running?
npx rivetos status - Is the provider reachable?
npx rivetos test - Is the API key valid? Check
.env— keys must not have quotes or trailing whitespace - Is the channel connected? Check
npx rivetos logsfor connection errors
”429 Too Many Requests” or “529 Overloaded”
The provider is rate limiting you or overloaded.
Fix: RivetOS handles this automatically with fallback chains if configured:
runtime: fallbacks: - providerId: anthropic fallbacks: - "google:gemini-2.5-pro"The circuit breaker will also prevent hammering a failing provider. It opens after 5 failures in 60 seconds and recovers automatically.
”Maximum tool iterations reached”
The agent hit the safety cap (default: 100 iterations per turn).
Fix: This is usually correct behavior — the agent was in a loop. If you need more iterations for a specific task:
runtime: max_tool_iterations: 150Or steer the agent mid-turn with /steer to refocus it.
Agent responds but output is empty
Check for streaming errors in logs:
npx rivetos logs --level error --since 5mCommon cause: the provider returned an empty response (often a content filter issue).
Database Issues
”Connection refused” to PostgreSQL
Error: connect ECONNREFUSED 127.0.0.1:5432Docker: Check if the datahub container is running:
docker compose psdocker compose logs datahubBare-metal: Check PostgreSQL is running:
sudo systemctl status postgresqlFix connection string: Verify RIVETOS_PG_URL in .env:
# DockerRIVETOS_PG_URL=postgresql://rivetos:rivetos@datahub:5432/rivetos
# Bare-metalRIVETOS_PG_URL=postgresql://localhost:5432/rivetos“relation ros_messages does not exist”
The database schema hasn’t been created yet.
Fix: The schema is created automatically on first boot. If it’s missing:
# Restart the agent — it will run migrationsnpx rivetos stopnpx rivetos start“extension vector does not exist”
pgvector isn’t installed.
Docker: The datahub image includes pgvector. Rebuild:
npx rivetos builddocker compose up -d datahubBare-metal:
# Ubuntu/Debiansudo apt install postgresql-16-pgvectorsudo -u postgres psql rivetos -c "CREATE EXTENSION IF NOT EXISTS vector;"Memory search returns no results
- Embeddings not generated yet: Check
npx rivetos statusfor embedding queue depth. New messages need to be embedded before vector search works. - FTS still works: Even without embeddings, full-text search (the default) should return results.
- Database empty: New install? There are no messages yet. Talk to the agent first.
Docker Issues
Containers won’t build
# Clean rebuilddocker compose build --no-cache
# Or use the CLInpx rivetos build”no space left on device”
Docker is out of disk space.
# Clean up unused images and containersdocker system prune -a
# Check disk usagedocker system dfContainer starts but agent doesn’t connect
Check that the agent can reach the datahub:
docker compose exec opus wget -qO- http://datahub:5432 || echo "Can't reach datahub"Common cause: network configuration mismatch. Ensure all containers are on the same Docker network.
Workspace files not visible in container
The workspace directory must be bind-mounted. Check docker-compose.yaml:
volumes: - ./workspace:/app/workspaceAnd verify the directory exists on the host:
ls -la workspace/Channel Issues
Discord: “Missing Access”
The bot doesn’t have permission to read/write in the channel.
Fix:
- Go to Server Settings → Roles → your bot’s role
- Ensure “Send Messages”, “Read Messages”, “Add Reactions” are enabled
- Check channel-specific permissions if using channel overrides
Discord: “Invalid token”
# Check your token (don't share it!)grep DISCORD_BOT_TOKEN .env
# Common issues:# - Trailing whitespace# - Quotes around the value (remove them)# - Wrong token (application token vs bot token)Telegram: “409 Conflict”
Another instance is polling with the same bot token.
Fix: Only one process can use a Telegram bot token at a time. Stop the other instance.
Channel keeps disconnecting
Check npx rivetos logs for reconnection messages. The reconnection manager uses exponential backoff:
[ReconnectManager] Channel discord disconnected. Attempt 1/10, retry in 2s[ReconnectManager] Channel discord disconnected. Attempt 2/10, retry in 4sIf it keeps failing, check your network connection and the platform’s status page.
Mesh Issues
”No mesh peers found”
npx rivetos mesh list# Empty listFix:
- Ensure the agent channel is configured with a port and secret
- Other instances must be running and reachable on the network
- Check firewall rules (port 3100 must be open between peers)
Delegation to remote agent fails
npx rivetos mesh ping# Shows which peers are unreachableCommon causes:
- Remote agent is down
- Network/firewall blocking port 3100
- Agent secret mismatch between peers
Update Issues
”git pull failed”
# Check for local changesgit status
# Stash local changesgit stashnpx rivetos updategit stash popContainer rebuild fails after update
# Clean rebuildnpx rivetos builddocker compose up -dAgent lost its workspace after update
This should not happen — workspace files are on bind mounts. Check:
# Verify mountdocker compose exec opus ls /app/workspace/If workspace files are missing, they may not have been bind-mounted. Check docker-compose.yaml for the volume configuration.
Performance
Agent responses are slow
- Check provider latency:
npx rivetos statusshows p95 latency - Check tool execution time: Enable debug logging:
RIVETOS_LOG_LEVEL=debug - Reduce context: Large workspace files slow down every request. Keep CORE.md focused.
- Reduce tool iterations: If the agent uses many tools per turn, consider whether it’s doing too much
High memory usage
# Check container memorydocker stats
# For bare-metalnpx rivetos status # Shows runtime memoryCommon causes:
- Large conversation history in memory (use
/newto reset) - Many MCP server connections (each spawns a child process)
- Memory leak in a plugin (check logs for “heap” warnings)
rivetos doctor Output Guide
The doctor command runs 12 categories of checks:
| Category | What it checks | Common failures |
|---|---|---|
| System | Node.js, memory, disk | Node too old, low disk |
| Config | Schema validation | Missing fields, bad types |
| Workspace | Required files exist | Missing CORE.md |
| Env Vars | Required vars set | Missing API keys |
| Secrets | .env permissions | World-readable .env |
| OAuth | Token validity | Expired tokens |
| Containers | Docker health | Container not running |
| Memory | PostgreSQL connection | Connection refused |
| Shared Storage | /shared/ writable | Mount not available |
| DNS | Name resolution | Network issue |
| Providers | API connectivity | Bad key, rate limited |
| Peers | Mesh reachability | Firewall, peer down |
Use --json for machine-readable output:
npx rivetos doctor --json | jq '.checks[] | select(.status == "fail")'Getting Help
- Check this guide — most issues are covered above
- Run diagnostics —
rivetos doctorandrivetos testcatch most problems - Check logs —
rivetos logs --level errorshows what went wrong - Search issues — github.com/philbert440/rivetOS/issues
- File a bug — include
rivetos doctor --jsonoutput and relevant logs