Troubleshooting guide for operators and maintainers.
# Install
cargo install --path crates/contribai-rs
# First run
contribai init
# Run pipeline
contribai run --dry-run
# Check status
contribai circuit-breaker
contribai statsSymptoms:
Error: LLM provider error: Gemini HTTP error: timeout
Circuit breaker: OPEN (cooldown remaining: 180s)
Resolution:
- Check network connectivity:
curl https://generativelanguage.googleapis.com - Verify API key:
contribai doctor - If circuit breaker is open: wait for cooldown or run
contribai run --dry-runto reset - Increase timeout in config (if applicable)
- Check for rate limiting:
contribai system-status
Symptoms:
Error: Database error: database is locked
Resolution:
- Check for concurrent ContribAI processes:
ps aux | grep contribai - Ensure only ONE instance is running at a time
- If lock persists, delete the WAL files (safe):
rm ~/.contribai/memory.db-wal ~/.contribai/memory.db-shm
- WAL mode is enabled — concurrent reads are fine, but writes serialize
Symptoms:
Error: GitHub rate limit exceeded, resets at 2026-04-07T00:00:00Z
Resolution:
- Check remaining quota:
curl -H "Authorization: token $GITHUB_TOKEN" https://api.github.com/rate_limit - Authenticated: 5000 req/hour. Unauthenticated: 60 req/hour
- Wait for reset time or switch to a different token
- Reduce
pipeline.max_repos_per_runto consume fewer requests
Symptoms: PRs created but closed by maintainers without merge.
Resolution:
- Check dream profiles:
contribai statsshows repo preferences - Increase quality threshold: set
pipeline.min_quality_score: 0.8 - Enable sandbox:
sandbox.enabled: true,sandbox.mode: "local" - Review rejected PR feedback in patrol mode:
contribai patrol - Check if repo has AI policy — some repos reject AI-generated PRs
Symptoms:
Error: Configuration error: Cannot read config.yaml: ...
Resolution:
- Validate config:
contribai doctor - Reset to defaults: delete
config.yamland runcontribai init - Check YAML syntax:
python -c "import yaml; yaml.safe_load(open('config.yaml'))" - Ensure required fields:
llm.provider,llm.model(or env vars)
Symptoms:
Found 0 candidate repositories
Resolution:
- Broaden search criteria: lower
discovery.stars_min, add more languages - Check GitHub API auth:
contribai doctorshould show GitHub as ✅ - Try targeted analysis:
contribai target https://github.com/owner/repo - Check if repos are archived: GitHub search excludes archived repos
Symptoms:
Circuit breaker: OPEN (failures: 5, cooldown remaining: 240s)
Resolution:
- Wait for cooldown (default: 300s = 5 minutes)
- After cooldown, circuit transitions to HalfOpen automatically
- Next successful LLM call → Closed. Next failure → Open again
- Manual reset: run
contribai run --dry-run(success resets counter) - Check root cause:
contribai doctorfor LLM auth issues
Symptoms:
curl http://127.0.0.1:8787 → Connection refused
Resolution:
- Start the server:
contribai web-server - Check port: default is 8787. Override with
--port 5000 - Check firewall: ensure port is not blocked
- If TLS enabled: verify cert/key paths are correct
- Check API keys: if
web.api_keysis set, include?api_key=YOUR_KEY
Enable verbose logging for troubleshooting:
# CLI verbose flag
contribai run --verbose
# Environment variable (RUST_LOG)
RUST_LOG=debug contribai run
RUST_LOG=contribai::analysis=debug contribai run
RUST_LOG=contribai::generator=trace contribai run| Log | Path |
|---|---|
| JSONL events | ~/.contribai/events.jsonl |
| LLM cache | ~/.contribai/llm_cache.db |
| SQLite memory | ~/.contribai/memory.db |
| Dream lock | ~/.contribai/.dream.lock |
| Component | Minimum | Recommended |
|---|---|---|
| RAM | 2 GB | 4 GB |
| CPU | 2 cores | 4+ cores |
| Disk | 500 MB | 2 GB |
| Network | GitHub API + LLM API access | Low-latency to APIs |
contribai cache-clear # prompts for confirmation
contribai cache-clear --yes # skip promptcontribai cache-stats
# Output:
# 📊 LLM Response Cache Statistics
# Cache enabled: Yes
# TTL: 7 days
# Total entries: 1234
# Valid entries: 1100
# Expired entries: 134
# Database size: 45.2 KBcontribai stats # Summary stats
contribai status # Recent PRs
contribai leaderboard # Merge rates by repoDream consolidation runs automatically after pipeline runs when gates are met:
- 24h since last dream
- 5+ sessions since last dream
- No concurrent dream running
Manual trigger:
contribai dream # runs if gates met
contribai dream --force # runs regardless of gates# Ctrl+C in terminal
# Or kill the process
kill $(pgrep contribai)contribai run --dry-run # dry run resets circuit on successrm ~/.contribai/memory.db
# Note: This loses all PR history, analysis cache, repo preferences- Go to GitHub Settings → Developer settings → Personal access tokens
- Delete the token used by ContribAI
- Generate new token with
public_reposcope - Update config:
contribai config-set github.token YOUR_NEW_TOKEN
Symptoms:
Error: GitHub API error: rate limit exceeded (403)
X-RateLimit-Remaining: 0
Resolution:
- Check rate limit status:
contribai system-status - Wait for rate limit reset (usually 1 hour):
curl -s https://api.github.com/rate_limit - For authenticated users: ensure
GITHUB_TOKENis set (5000 req/hour vs 60 unauthenticated) - Use GraphQL for batched queries (reduces API calls by 60%+)
Symptoms:
- PRs consistently closed without merging
- Merge rate < 20%
Resolution:
- Check closed PR analysis:
contribai patrol --dry-run - Review rejection reasons in memory:
contribai stats - Adjust contribution strategy:
- Reduce finding count per repo (max 2 → 1)
- Focus on documentation/style fixes (higher merge rate)
- Use
--mode issuesto solve existing issues first
- Review repo intelligence:
contribai analyze <repo-url>
Symptoms:
Error: LLM provider error: Gemini API error 429: Resource has been exhausted
Error: LLM provider error: Anthropic API error 500: Internal server error
Resolution:
- 429 Rate Limit: Wait and retry (automatic with exponential backoff)
- 5xx Server Error: Retry automatically (up to 3 attempts)
- 401 Unauthorized: Check API key:
contribai doctor - 400 Bad Request: Prompt too large — reduce
llm.max_tokensor increase context window - Circuit Breaker Open: System auto-stops after 5 consecutive failures
- Wait 5 minutes (default cooldown)
- Or run
contribai run --dry-runto reset
Symptoms:
cargo buildfails- CI lint check fails
Resolution:
- Run locally:
cargo clippy -- -D warnings - Format code:
cargo fmt --all - Run tests:
cargo test - Common fixes:
- Missing imports: check
usestatements - Type errors: check function signatures changed in dependency updates
- Dead code: add
#[allow(dead_code)]or remove unused code
- Missing imports: check
Symptoms:
- Keyboard input not working in TUI
- TUI stuck or frozen
Resolution:
- Press
qto quit TUI - If frozen:
Ctrl+Cto force quit - Terminal may be in raw mode — reset:
resetcommand - Check terminal compatibility: TUI requires crossterm-supported terminal
Enable verbose logging for troubleshooting:
# Set log level to debug
contribai config-set log.level debug
# Or use environment variable
RUST_LOG=debug contribai run --dry-run
# Logs written to: ~/.contribai/logs/pipeline.log (JSON format)# Update dependencies
cargo update
cargo clippy -- -D warnings # verify no new warnings
# Run benchmarks (track performance)
cargo bench
# Check for security advisories
cargo audit# Review and clean memory
contribai stats # check memory usage
contribai cache-stats # check LLM cache size
contribai cache-clear # if cache > 100MB
# Review config
contribai config-list # audit config settings
contribai doctor # health check