work-on: pass --non-interactive to the headless claude bootstrap#47
Conversation
There was a problem hiding this comment.
Based on my analysis of the PR:
Review Summary:
-
Correctness (
pkg/ops/workon.go:194): The concern about--non-interactiveflag support is addressed. The CHANGELOG v0.96.1 explicitly documents that/vault-cli:work-on-taskaccepts--non-interactive— it "skips the create-task prompt (Phase 4) and the plan-task/execute-task sharpening chain (Phase 5), so headless callers orient and stop instead of hanging onAskUserQuestion." The flag is explicitly designed for this bootstrap use case. -
Test formatting (
pkg/ops/workon_test.go:201): The regexMatchRegexp(--non-interactive$)is correct and consistent. The space before--non-interactiveis intentional — it's part of the format stringfmt.Sprintf(%s "%s" --non-interactive, ...)at line 194 of workon.go. The resulting prompt ends with" --non-interactive, and the regex correctly matches--non-interactiveat the string end. -
CHANGELOG: The entry under
## Unreleasedcorrectly classifies this as afix(workon)— appropriate since it's a bugfix addressing a 5-minute headless hang, not a new feature.
No issues found. The change is correct and the tests properly validate the behavior.
{
"verdict": "approve",
"summary": "The PR correctly appends `--non-interactive` to the headless `claude --print` bootstrap prompt to prevent the 5-minute hang when work-on needs input that cannot be answered headlessly. The vault command explicitly supports this flag (documented in v0.96.1 CHANGELOG), and the test regex correctly validates the prompt format.",
"comments": [],
"concerns_addressed": [
"correctness: vault.GetWorkOnCommand() returns /vault-cli:work-on-task which explicitly accepts --non-interactive (per CHANGELOG v0.96.1)",
"tests: trailing space in MatchRegexp(` --non-interactive$`) is intentional — the format string includes the space before --non-interactive"
]
}
Why
Completes the fix for the Vault UI "Start" hang (
claude session start timed out after 5m).vault-cli work-onbootstraps a session withclaude --print -p '<work-on-command> "<file>"'— a headless turn that can't answerAskUserQuestion. #46 taught/vault-cli:work-on-taskto honor--non-interactive; this makes vault-cli actually pass it.What
pkg/ops/workon.gohandleClaudeSession: append--non-interactiveto the bootstrap prompt (unconditional — theclaude --printbootstrap is always headless; interactive work resumes later viaResumeSession).pkg/ops/workon_test.go: assert the bootstrap prompt carries--non-interactive+ preserves the file path.## Unreleased.Authored by the dark-factory daemon (prompt 159); container
make precommitexit 0. Routed through a PR (instead of the config's direct-commit) for bot review, matching #45/#46.Deploy-time note
End-to-end no-hang requires the
claude-yolocontainer's baked-in plugin to include #45+#46. If that image lags master, the binary passes--non-interactiveto an older command that ignores it. This PR is safe regardless.