Troubleshooting
Common issues and their solutions when using gh-worker.
Installation Issues
Command Not Found: ghw
Symptom: Running ghw returns "command not found"
Solution:
- Verify installation:
- Ensure Python's script directory is in PATH:
# Add to ~/.bashrc or ~/.zshrc
export PATH="$HOME/.local/bin:$PATH"
# Reload shell
source ~/.bashrc # or source ~/.zshrc
- Reinstall if needed:
GitHub CLI Not Authenticated
Symptom: Errors mentioning "authentication required" or "not logged in"
Solution:
# Authenticate with GitHub
gh auth login
# Verify authentication
gh auth status
# If needed, refresh authentication
gh auth refresh
Claude Code CLI Not Found
Symptom: "claude-code: command not found" or agent validation errors
Solution:
-
Install Claude Code CLI from claude.ai/code
-
Verify installation:
- If installed but not in PATH, specify the full path:
- Or use a different agent:
Configuration Issues
Configuration File Not Found
Symptom: "Configuration file not found" errors
Solution:
# Create config directory
mkdir -p ~/.config/gh-worker
# Initialize configuration
ghw config issues-path ~/gh-worker/issues
ghw config repository-path ~/gh-worker/repos
Invalid Configuration Values
Symptom: Validation errors when setting config values
Solution:
# Check current value
ghw config plan.parallelism
# Set valid value (>= 1)
ghw config plan.parallelism 1
# For paths, use absolute paths or ~
ghw config issues-path ~/gh-worker/issues # Good
ghw config issues-path ./issues # May cause issues
Permission Denied on Config Directory
Symptom: Can't write to ~/.config/gh-worker
Solution:
# Fix permissions
mkdir -p ~/.config/gh-worker
chmod 755 ~/.config/gh-worker
# Or use a custom config path
ghw --config-path /writable/path/config.yaml sync --repo owner/repo
Sync Issues
No Issues Synced
Symptom: ghw sync completes but no issues are stored
Causes and Solutions:
- No open issues in repository:
- Wrong repository name:
- Time filter too restrictive:
# Try without --since
ghw sync --repo owner/repo
# Or use longer timeframe
ghw sync --repo owner/repo --since 30d
- Search query excludes all issues:
Rate Limiting
Symptom: "API rate limit exceeded" errors
Solutions:
- Reduce sync frequency:
- Reduce parallelism:
- Use time-based sync:
- Check rate limit status:
Repository Clone Failed
Symptom: Errors during repository cloning
Solutions:
- Verify access:
- Check disk space:
- Remove and re-clone:
Plan Generation Issues
Plans Not Generated
Symptom: ghw plan completes but no plans are created
Causes and Solutions:
- No issues to plan:
- Plans already exist:
# Check for existing plans
find ~/gh-worker/issues/owner/repo -name "plan-*.md"
# Force regenerate by deleting old plans
rm ~/gh-worker/issues/owner/repo/42/plan-*.md
ghw plan --repo owner/repo --issue-numbers 42
- Agent not available:
Plan Generation Hangs
Symptom: Plan generation starts but never completes
Solutions:
- Check agent is responsive:
-
Check network connectivity (for cloud agents)
-
Monitor logs:
- Reduce parallelism:
Plan Quality Issues
Symptom: Generated plans are incomplete or incorrect
Solutions:
-
Ensure issue descriptions are detailed:
-
Include clear problem statement
- Provide reproduction steps
-
Add context about the codebase
-
Regenerate with more context:
# Delete old plan
rm ~/gh-worker/issues/owner/repo/42/plan-*.md
# Add more context to issue description
gh issue edit 42 --body "..." --repo owner/repo
# Resync and replan
ghw sync --repo owner/repo --issue-numbers 42
ghw plan --repo owner/repo --issue-numbers 42
Implementation Issues
Implementation Fails Immediately
Symptom: ghw implement fails right after starting
Causes and Solutions:
- No plan exists:
- Repository not clean:
- Agent not available:
Implementation Hangs
Symptom: Implementation starts but never completes
Solutions:
- Monitor in another terminal:
- Check agent process:
- Check repository state:
- Increase timeout (if configurable):
Tests Fail During Implementation
Symptom: Implementation fails because tests don't pass
Solutions:
-
Review test output in agent logs
-
Run tests manually:
- Fix test issues and retry:
Branch Already Exists
Symptom: "Branch already exists" error
Solutions:
cd ~/gh-worker/repos/owner/repo
# Option 1: Delete existing branch
git branch -D issue-42-branch-name
git push origin --delete issue-42-branch-name
# Option 2: Check out and update existing branch
git checkout issue-42-branch-name
Pull Request Creation Failed
Symptom: Implementation succeeds but PR creation fails
Solutions:
- Verify GitHub CLI permissions:
- Check repository permissions:
- Create PR manually:
Monitoring Issues
Monitor Shows No Output
Symptom: ghw monitor runs but shows nothing
Causes and Solutions:
- Wrong issue number:
- Session not found:
- Session completed:
- Monitor can't show output for completed sessions
- Check implementation results instead
Work Command Issues
Work Command Stops After One Iteration
Symptom: ghw work runs once then exits
Solution:
Remove --once flag for continuous mode:
# This runs once and exits
ghw work --once --repos owner/repo
# This runs continuously
ghw work --repos owner/repo
Work Command Frequency Not Respected
Symptom: Work command runs more/less frequently than configured
Solutions:
- Check configuration:
- Specify frequency explicitly:
- Monitor logs to verify timing:
Performance Issues
Slow Execution
Causes and Solutions:
- Low parallelism:
-
Network latency:
-
Check internet connection
-
Use closer/faster agent endpoints
-
Large repository:
-
Repository cloning and operations take longer
-
Consider shallow clones (if implemented)
-
Resource constraints:
High Memory Usage
Solutions:
- Reduce parallelism:
- Process issues in batches:
# Instead of all at once
ghw plan --repo owner/repo --issue-numbers 1 2 3
ghw plan --repo owner/repo --issue-numbers 4 5 6
File System Issues
Disk Space Full
Symptom: "No space left on device" errors
Solutions:
- Check disk space:
- Clean old plans:
- Remove old repositories:
- Move to larger disk:
ghw config issues-path /larger-disk/gh-worker/issues
ghw config repository-path /larger-disk/gh-worker/repos
Permission Denied
Symptom: Can't read/write files in gh-worker directories
Solutions:
Logging and Debugging
Enable Debug Logging
For detailed troubleshooting:
View Recent Logs
Check Agent Logs
Agent-specific logs may be in different locations:
Getting Help
If you can't resolve your issue:
-
Check existing issues: GitHub Issues
-
Create a new issue with:
-
gh-worker version
- Python version
- Operating system
- Complete error message
- Steps to reproduce
-
Debug logs
-
Include diagnostics:
# System info
python --version
ghw --version
gh --version
claude-code --version # If using Claude Code
# Configuration
ghw config issues-path
ghw config repository-path
ghw config agent.default
Next Steps
- Usage Guide - Command usage and workflows
- Configuration - Configuration options
- Architecture - Technical deep dive
- Agents - Agent system details