kew dispatch¶
Dispatch a single issue.
Usage¶
kew dispatch <issue> # single-shot dispatch (same as `kew run --issue <n>`)
kew dispatch <issue> --loop # supervise the runner as a first-class loop
kew dispatch <issue> --loop --max-steps N # loop with explicit step cap
--loop (first-class loops)¶
With --loop, kew creates a Loop: a goal it pursues to a terminal state,
recording each agent step as an iteration and verifying the result against a
gate before declaring success.
- Routed like ordinary dispatch: the loop's runner and model are resolved
through the
[routing]table using the issue's complexity label, exactly as a single-shot dispatch would — so asimple-labelled issue runs its loop on the simple tier's runner/model, not the[agent]default. The route is resolved from the effective config —kew.tomlplus anyconfig_overridesraised in the web UI, so a runtimeagent.model/routing.*override governs the loop exactly as it governs every other dispatch kind. The resolved runner, model and complexity tier are all recorded on the loop, sokew loop resumecontinues on that same route instead of re-resolving the default. - Native runners only (v1): all supported runners (Claude Code, OpenCode,
pi) declare
loop_style = "native"and drive the loop themselves. If a[routing]entry ever resolves to a runner that is not native-loop-capable,--loopfails closed with that reason — it never silently degrades to a single-shot dispatch. - Guardrails come from config and are load-bearing:
agent.timeout_minutesbounds the wall clock (threaded into the run timeout), and the loop is stampedneeds_humanif recorded steps exceedmax_steps(scaled by issue complexity: simple=80, medium=200, complex=400).agent.max_budget_usdis passed to the runner as a best-effort dollar cap. The loop refuses to start if the resolved model is not in the pricing table (no silent $0 / unbounded run) and if no verify command (commands.verify_loop, falling back tocommands.ci) is configured. - The loop and its iteration timeline are queryable in the run store; the read-only Loop card (Flight Recorder) renders status, the step timeline, the verification result, and the audit trail.
Not to be confused with
kew run --loop.kew run --loopruns continuous dispatch — it keeps picking the next ready issue until the queue is empty.kew dispatch <issue> --loopruns one first-class, verified loop pursuing a single goal. Different flag, different command, different meaning.