Skip to content

work-on: pass --non-interactive to the headless claude bootstrap#47

Merged
bborbe merged 1 commit into
masterfrom
feature/work-on-headless-noninteractive
Jul 2, 2026
Merged

work-on: pass --non-interactive to the headless claude bootstrap#47
bborbe merged 1 commit into
masterfrom
feature/work-on-headless-noninteractive

Conversation

@bborbe

@bborbe bborbe commented Jul 2, 2026

Copy link
Copy Markdown
Owner

Why

Completes the fix for the Vault UI "Start" hang (claude session start timed out after 5m). vault-cli work-on bootstraps a session with claude --print -p '<work-on-command> "<file>"' — a headless turn that can't answer AskUserQuestion. #46 taught /vault-cli:work-on-task to honor --non-interactive; this makes vault-cli actually pass it.

What

  • pkg/ops/workon.go handleClaudeSession: append --non-interactive to the bootstrap prompt (unconditional — the claude --print bootstrap is always headless; interactive work resumes later via ResumeSession).
  • pkg/ops/workon_test.go: assert the bootstrap prompt carries --non-interactive + preserves the file path.
  • CHANGELOG under ## Unreleased.

Authored by the dark-factory daemon (prompt 159); container make precommit exit 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-yolo container's baked-in plugin to include #45+#46. If that image lags master, the binary passes --non-interactive to an older command that ignores it. This PR is safe regardless.

@ben-s-pull-request-reviewer ben-s-pull-request-reviewer Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on my analysis of the PR:

Review Summary:

  1. Correctness (pkg/ops/workon.go:194): The concern about --non-interactive flag support is addressed. The CHANGELOG v0.96.1 explicitly documents that /vault-cli:work-on-task accepts --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 on AskUserQuestion." The flag is explicitly designed for this bootstrap use case.

  2. Test formatting (pkg/ops/workon_test.go:201): The regex MatchRegexp( --non-interactive$) is correct and consistent. The space before --non-interactive is intentional — it's part of the format string fmt.Sprintf(%s "%s" --non-interactive, ...) at line 194 of workon.go. The resulting prompt ends with " --non-interactive, and the regex correctly matches --non-interactive at the string end.

  3. CHANGELOG: The entry under ## Unreleased correctly classifies this as a fix(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"
  ]
}

@bborbe bborbe merged commit 75893c1 into master Jul 2, 2026
1 check passed
@bborbe bborbe deleted the feature/work-on-headless-noninteractive branch July 2, 2026 18:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant