Troubleshooting¶
Common failure modes and how to resolve them.
"kew run picks no issue"¶
kew queries GitHub for issues with the ready label. If nothing is picked:
- Check labels — verify the issue has the
readylabel and a priority label (p0-criticalthroughp3-low): - Check authentication — ensure
ghis authenticated and can access the repo: - Check config — verify
project.repoinkew.tomlmatches your repository, or thatghauto-detects it correctly: - Already in-progress — issues labeled
in-progressoragent-workingare excluded from selection. Check if the issue is already being worked on.
"Agent times out"¶
The agent is killed after agent.timeout_minutes (default: 120 minutes). If your agent consistently times out:
- Increase the timeout — set a higher value in
kew.toml: - Check the complexity label —
complexissues get more token budget guidance but still respect the timeout. Consider breaking the issue into smaller pieces. - Check the issue scope — issues that touch many files or require cross-cutting changes are more likely to time out. Use the
simple/medium/complexlabels to set expectations.
"Budget exceeded"¶
kew enforces per-issue, daily, and weekly spend caps configured in [budget].
- Check current spend:
- Increase limits — adjust
[budget]inkew.toml: - Force past the check — use
--forceto bypass budget checks for a single run: - Per-run cap — the per-run cap (
agent.max_budget_usd) is separate from the aggregate budget. Increase it if individual runs are hitting the limit:
"Worktree already exists"¶
A stale worktree can remain after a crash or interrupted dispatch. kew creates worktrees at {branches.worktree_base}/agent/issue-{N}.
- List worktrees:
- Remove the stale worktree:
- Force removal if the directory is corrupted:
- Prune all stale entries (safe — only removes worktrees whose directories no longer exist):