Frequently Asked Questions¶
Answers to commonly asked questions about Cub.
Installation¶
What are the system requirements for Cub?
Cub requires:
- Python 3.10+ - Required for the Python CLI
- At least one AI harness - Claude Code, Codex, Gemini, or OpenCode
- Git - For version control integration
- jq - For JSON processing (in bash components)
Optional:
- Docker - For sandbox mode
- Beads CLI - For beads task backend
Which AI harness should I use?
Claude Code is recommended for most users because it supports:
- All Cub features (streaming, token tracking, system prompts)
- Best integration with
cub prep - Active development and support
See the Harnesses comparison for a full capability matrix.
Can I use Cub without npm/Node.js?
Yes! The Python version of Cub can be installed with:
# Using pipx (recommended)
pipx install cub-cli
# Or using uv
uv tool install cub-cli
# Or using pip
pip install cub-cli
However, most AI harnesses (Claude Code, Codex, Gemini) are installed via npm. You only need npm for harness installation, not for running Cub itself.
How do I install Cub globally?
Use the one-liner installer:
Or install via pipx for isolated installation:
Then set up global configuration:
Usage¶
What's the difference between cub prep and cub run?
cub prep - Preparation phase (work ahead of execution)
- Converts vague ideas into structured tasks
- Runs triage, architect, plan, and bootstrap stages
- Requires human review and refinement
- Creates agent-ready task specifications
cub run - Execution phase (autonomous operation)
- Executes prepared tasks with an AI harness
- Runs autonomously without human intervention
- Tracks progress, handles errors, manages budget
- Updates task status as work completes
The workflow is: Prep (human-in-loop) -> Run (autonomous)
How do I run just one task?
Use the --once flag:
This runs a single iteration and exits. Useful for testing or when you want to review after each task.
Can I run Cub in the background?
Yes! Use nohup or screen/tmux:
# With nohup
nohup cub run &> cub.log &
# With screen
screen -S cub
cub run
# Ctrl+A, D to detach
# With tmux
tmux new -s cub
cub run
# Ctrl+B, D to detach
Monitor progress with:
How do I stop Cub gracefully?
Press Ctrl+C once for a graceful shutdown. Cub will:
- Finish the current operation
- Save state
- Exit cleanly
Press Ctrl+C twice for immediate termination (may lose current task progress).
What happens if Cub crashes mid-task?
Cub is designed to be resumable:
- Task status remains unchanged (still "in_progress")
- Git state is preserved (uncommitted changes may exist)
- Running
cub runagain will resume from where it left off
Check status after a crash:
Configuration¶
Where are Cub's configuration files?
Cub uses a layered configuration system:
| Location | Purpose |
|---|---|
~/.config/cub/config.json | Global defaults |
.cub.json | Project-specific settings |
.cub/ directory | Project state, logs, artifacts |
Priority: CLI flags > environment variables > project config > global config > defaults
How do I set a default harness?
In your global config (~/.config/cub/config.json):
Or set per-project in .cub.json.
How do I increase the budget limit?
Via CLI:
Or in config:
How do I disable clean state checks?
In .cub.json:
Warning
Disabling these checks can lead to lost work or inconsistent state. Use with caution.
Task Backends¶
What's the difference between beads and JSON backends?
| Feature | Beads | JSON |
|---|---|---|
| Storage | .beads/issues.jsonl | prd.json |
| CLI | Full bd CLI | Read-only |
| Sync | GitHub Issues sync | Manual |
| Dependencies | Built-in | Basic |
| Recommended | Yes (active) | Legacy |
Beads is the recommended backend for new projects. It provides a full CLI for task management and syncs with GitHub Issues.
How do I switch from JSON to beads backend?
Run the migration:
This converts your prd.json tasks to .beads/issues.jsonl.
How do I create a new task?
With beads backend:
With JSON backend, edit prd.json manually:
How do I close a task manually?
With beads:
Or use the Cub CLI:
Harnesses¶
Why does Cub prefer Claude Code?
Claude Code has the most complete feature support:
- Streaming output - See progress in real-time
- Token reporting - Accurate budget tracking
- System prompts - Separate instructions from tasks
- JSON output - Reliable response parsing
- Model selection - Choose models per task
Other harnesses work but may lack some features.
Can I use multiple harnesses?
Yes! Configure a priority order:
Cub uses the first available harness. You can also select per-task with labels:
How do I select a model for a specific task?
Add a model label to the task:
When the task runs, Cub passes the model to the harness (if supported).
Git Integration¶
Does Cub commit changes automatically?
By default, no. Cub runs tasks but doesn't automatically commit. The AI harness may commit as part of its work (Claude Code often does).
You can configure hooks to commit after tasks:
How does branch management work?
Cub can bind branches to epics:
# Create and bind branch to epic
cub branch my-epic
# List bindings
cub branches
# Create PR when done
cub pr my-epic
See Git Integration for details.
What are worktrees and when should I use them?
Git worktrees allow multiple checkouts of the same repo. Cub uses them for:
- Parallel execution - Run multiple tasks simultaneously
- Isolation - Each task works in its own directory
See Worktrees for details.
Advanced Features¶
What is sandbox mode?
Sandbox mode runs tasks in Docker containers for complete isolation:
Benefits:
- Untrusted code can't affect your system
- Reproducible environment
- Network isolation (optional)
See Sandbox Mode for details.
How do I run tasks in parallel?
Use the --parallel flag:
Each task runs in its own git worktree. Tasks must be independent (no shared dependencies).
See Parallel Execution for details.
What are hooks and how do I use them?
Hooks run custom scripts at key points:
pre_run- Before session startspost_run- After session endspre_task- Before each taskpost_task- After each task
Configure in .cub.json:
See Hooks System for details.
Troubleshooting¶
How do I debug Cub issues?
-
Enable debug mode:
-
Run diagnostics:
-
Check logs:
Why is Cub slow?
Common causes:
- Large context - Big files or many tasks slow down the AI
- Network latency - Check your connection
- Rate limiting - Use
--onceand space out runs - Heavy tests - Consider
require_tests: falsefor drafts
Enable debug mode to see timing:
How do I report a bug?
-
Gather diagnostic info:
-
Open an issue with:
- Error message
- Doctor output
- Debug logs
- Steps to reproduce
- Your environment (OS, Python version, harness)
Migration & Upgrading¶
How do I upgrade Cub?
Are there breaking changes between versions?
Check the Changelog and Upgrading Guide for breaking changes and migration instructions.