Common Issues¶
This page covers the most frequent issues users encounter and how to resolve them.
Installation Problems¶
jq not found¶
Error: jq: command not found
Symptoms: Cub fails to start with an error mentioning jq.
Cause: jq is a required dependency for JSON processing but isn't installed.
Solution: Install jq for your platform:
Verify installation:
Permission denied¶
Error: Permission denied when running cub
Symptoms: You get a permission error when trying to run cub or cub-init.
Cause: The script files don't have execute permissions.
Solution: Make the scripts executable:
If using symlinks in /usr/local/bin/, ensure the target files are executable:
Command not found after installation¶
Error: cub: command not found
Symptoms: You've installed Cub but can't run it from the command line.
Cause: Cub isn't in your PATH.
Solution: Choose one of these options:
Verify Cub is accessible:
Bash version requirement¶
Error: Bash 3.2+ requirement not met
Symptoms: Cub exits with an error about Bash version.
Cause: Your system has an older version of Bash.
Solution: Check your Bash version:
On macOS (which ships with older Bash due to licensing):
Harness Issues¶
No harness available¶
Error: No harness available
Symptoms: Cub starts but can't find an AI harness to use.
Cause: No AI coding CLI is installed on your system.
Solution: Install at least one harness:
Verify installation:
Specific harness not found¶
Error: harness not found: claude (or other harness name)
Symptoms: Cub can't find a specific harness you've configured.
Cause: The configured harness isn't installed or not in PATH.
Solution:
-
Diagnose with doctor:
This shows which harnesses are installed and which are missing. -
Install the missing harness (see options above)
-
Or change the configured harness in
.cub.json: -
Or use a different harness at runtime:
Harness invocation fails or times out¶
Harness fails silently or times out
Symptoms: Cub starts but the harness doesn't respond or fails.
Cause: Various - authentication, network, or rate limiting issues.
Solution:
Enable debug logging to see what's happening:
Common causes and fixes:
Ensure your harness has valid credentials:
- Claude Code: Check
~/.anthropic/credentialsorANTHROPIC_API_KEY - Codex: Check
OPENAI_API_KEYenvironment variable - Gemini: Check Google Cloud authentication
- OpenCode: Check your configured provider's credentials
Task File Errors¶
Missing tasks array¶
Error: prd.json missing 'tasks' array
Symptoms: Cub fails with an error about task file format.
Cause: Your prd.json doesn't have the required structure.
Solution: Ensure your prd.json has a tasks array:
{
"tasks": [
{
"id": "task-1",
"title": "First task",
"description": "What to do",
"status": "open"
}
]
}
Complete task structure:
{
"id": "task-1",
"title": "Task title",
"description": "Detailed description",
"status": "open", // open, in_progress, completed, blocked
"priority": 2, // 0-4 (0=critical, 4=backlog)
"epic": "epic-id", // optional
"labels": ["label1"], // optional
"dependencies": [], // optional
"acceptance_criteria": [] // optional
}
Duplicate task IDs¶
Error: Invalid/Duplicate task IDs found
Symptoms: Error about duplicate IDs in your task file.
Cause: Multiple tasks have the same id value.
Solution: Find and fix duplicates:
Then edit prd.json to make each ID unique.
Invalid dependency references¶
Error: Invalid dependency references
Symptoms: Error about tasks referencing non-existent dependencies.
Cause: A task's dependencies array references an ID that doesn't exist.
Solution: Verify all dependency IDs exist:
# List all task IDs
jq '.tasks[].id' prd.json
# Show tasks with dependencies
jq '.tasks[] | select(.dependencies) | {id, dependencies}' prd.json
Ensure all referenced IDs exist and match exactly (case-sensitive).
Task file not found¶
Error: prd.json not found or Permission denied
Symptoms: Cub can't find or read your task file.
Solution:
-
Verify file exists:
-
If missing, initialize a project:
-
If permission denied, fix permissions:
Beads Backend Issues¶
Beads not installed¶
Error: beads not installed
Symptoms: After configuring beads backend, you get errors about beads not being installed.
Cause: The Beads CLI isn't installed on your system.
Solution: Install Beads:
Verify installation:
Note
If beads isn't available, Cub automatically falls back to the JSON backend with a warning.
Beads directory missing¶
Error: .beads/ not found or Run 'bd init' first
Symptoms: Using beads backend but the .beads/ directory doesn't exist.
Cause: Beads hasn't been initialized in the project.
Solution: Initialize beads:
This creates:
.beads/directory.beads/issues.jsonltask database.beads/.gitignoreto exclude internal files
Corrupted issues.jsonl¶
Beads errors about invalid JSON or corrupted data
Symptoms: Beads can't parse the task database.
Cause: The .beads/issues.jsonl file has invalid JSON.
Solution:
-
Diagnose the issue:
-
Backup and reinitialize (may lose data):
-
Or manually repair (advanced):
- Edit
.beads/issues.jsonl - Ensure each line is valid JSON
- Remove trailing commas
- Fix improperly escaped strings
Git and State Issues¶
Uncommitted changes¶
Error: Repository has uncommitted changes
Symptoms: Cub refuses to proceed because you have modified files.
Cause: Cub requires a clean git state by default for safety.
Solution:
Warning
Disabling the clean state check is not recommended as it can lead to lost work.
Not in a git repository¶
Error: Not in a git repository
Symptoms: Git operations fail because directory isn't a git repo.
Solution: Initialize git:
Branch already exists¶
Error: branch already exists
Symptoms: Cub can't create a work branch because it exists.
Solution:
-
Check existing branches:
-
Delete old branches if needed:
-
Or use a different session name:
Tests failed¶
Error: Tests failed with exit code X
Symptoms: Clean state verification detects test failures.
Cause: Your test suite is failing.
Solution:
-
Run tests manually to see errors:
-
Fix the failures in your source code.
-
Or disable test requirement in
.cub.json:
Configuration Issues¶
Invalid config JSON¶
Error: Failed to parse user config or Failed to parse project config
Symptoms: Cub warns about invalid configuration files.
Cause: Your .cub.json or global config has invalid JSON.
Solution:
-
Validate JSON syntax:
-
Fix common errors:
| Error | Wrong | Correct |
|---|---|---|
| Trailing commas | {"key": "value",} | {"key": "value"} |
| Unquoted keys | {key: "value"} | {"key": "value"} |
| Single quotes | {'key': 'value'} | {"key": "value"} |
Unknown backend¶
Error: unknown CUB_BACKEND
Symptoms: Error about unrecognized backend option.
Cause: Invalid backend specified in config or environment.
Solution: Use a valid backend:
beads- Beads CLI (.beads/issues.jsonl)json- JSON file (prd.json)
Performance and Budget¶
Slow task execution¶
Tasks take much longer than expected
Symptoms: Iterations take too long.
Diagnosis: Enable debug logging:
Solutions:
-
Run single iterations:
-
Target specific work:
-
Reduce iteration timeout in config:
Budget exceeded¶
Error: Budget exceeded
Symptoms: Cub stops because token budget was exceeded.
Solution:
-
Check current usage:
-
Increase budget for the run:
-
Or set in config (
~/.config/cub/config.json): -
Split large tasks to reduce per-task token usage.
Symlink Issues (Legacy Layout)¶
Symlinks to .cub/ files not working
Background: Cub supports two layouts:
- New:
.cub/agent.md,.cub/prompt.md,.cub/progress.txt - Legacy:
AGENT.md(symlink to.cub/agent.md), etc.
Diagnosis:
Solution:
-
For legacy layout, create symlinks:
-
If symlinks are broken, recreate them:
-
Run doctor to validate:
Migration Problems¶
Cannot migrate to beads¶
Error: Cannot migrate: prd.json not found
Symptoms: You want to migrate from prd.json to beads but get an error.
Solution: Create a minimal prd.json first:
cat > prd.json << 'EOF'
{
"tasks": [
{
"id": "task-1",
"title": "Example task",
"description": "A task to migrate",
"status": "open"
}
]
}
EOF
Then migrate: