Skip to content
This repository was archived by the owner on Jun 8, 2026. It is now read-only.

fix: add -p flag to REQUEST_CHANGES spawn for headless permission grants - #31

Merged
thadeusb merged 2 commits into
mainfrom
fix/request-changes-headless-mode
Mar 18, 2026
Merged

thadeusb merged 2 commits into
mainfrom
fix/request-changes-headless-mode

Conversation

@thadeusb

Copy link
Copy Markdown
Contributor

Summary

REQUEST_CHANGES was spawning Claude without -p (headless mode), causing it to hang waiting for interactive permission approval in a detached process.

PLAN/EXECUTE use run-loop.sh which passes -p. DECOMPOSE already had -p. Only REQUEST_CHANGES was missing it.

Without -p, --allowedTools is just a suggestion — Claude still prompts for file edit permissions. With -p, --allowedTools grants full permission without prompting.

Test plan

  • Run REQUEST_CHANGES on desktop — verify it can edit plan.json without hanging
  • Verify PLAN still works (uses run-loop.sh, unaffected)
  • Verify DECOMPOSE still works (already had -p)

@thadeusb
thadeusb merged commit 1eca521 into main Mar 18, 2026
2 checks passed
@thadeusb
thadeusb deleted the fix/request-changes-headless-mode branch March 18, 2026 16:50
@closedloop-ai-stage

Copy link
Copy Markdown

Code Review Summary

Status: Approved

Reviewers: Bug Hunter A, Bug Hunter B, Unified Auditor, Premise Reviewer, gateway-core-architect

Findings

Severity Count
Blocking 0
High 0
Medium 0

No issues found.

Validation Stats

  • Agent failures: 0 partitions skipped
  • Cross-file grouped: 0 findings consolidated

Recommendation: Approve

aponamarev added a commit that referenced this pull request Mar 20, 2026
…_CHANGES

PR #30 branched before PRs #31-#33 landed, leaving all three commands on
the old spawnClaudeFromFile path (--output-format json, no streaming, no
token tracking, no --allowedTools, no --max-turns). This commit brings
parity with the fixes merged to main:

- Add findStreamFormatter() and buildClaudePipeline() (ported from main)
- DECOMPOSE: switch from spawnClaudeFromFile to buildClaudePipeline with
  -p -, --output-format stream-json, --verbose, --allowedTools, --max-turns 200
- EVALUATE_PRD: same treatment — produces claude-output.jsonl for token
  tracking, claude-stderr.log for debugging, and readable formatted logs
- REQUEST_CHANGES: add -p, --output-format stream-json, --verbose, and
  route through buildClaudePipeline (was spawning claude directly)
- Remove now-dead spawnClaudeFromFile helper

Testing: `just desktop-typecheck` clean; all 242 tests pass
Risks: None — behaviour change is intentional parity fix; formatter falls
       back gracefully when stream_formatter.py is not installed

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant