Repository navigation
/codex cleanup stops asking for /careful approval, and plan-mode Codex reviews start again - #4851
Merged
capy-ai[bot] merged 4 commits intoNov 26, 2026
Merged
Conversation
…views can write their prompt The /codex challenge and consult cleanup now deletes the prompt through a guarded variable, and /plan-eng-review and /plan-ceo-review create their Codex prompt in the project's .gstack/tmp/ instead of $TMPDIR, where plan mode refuses Write. Fixes #4841, fixes #4842. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
|
😎 This pull request was merged. |
…the run header and size pins unchanged A second review found that writing a .gitignore inside .gstack/tmp could follow a committed symlink. The command no longer writes one, refuses a symlinked .gstack or .gstack/tmp, and the plan prose keeps its exact length. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
The prompt-file fix itself is in a08e4a2; this commit records which review finding it answers. Review-Finding: p1/specialist-batched#1 reader=security Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…s it as a plain folder create mkdir -pm700 hid the -p flag from the guard that rejects mkdir used as a lock. The command now reads mkdir -p -m700 and folds the two symlink checks into one test, which keeps the plan prose 2 characters under main. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
/codex challengeand/codex consultno longer stop for a /careful delete warning on every run, and the Codex second-model review in/plan-eng-reviewand/plan-ceo-reviewworks in Claude Code plan mode again.Why: both broke a core review path on every use; the reports came from @dmfrede and @mcp10.
Nothing to do after merge.
What changed
/careful no longer asks about the /codex cleanup, and the plan-review prompt file moves into the project.
Before/after as text: /careful no longer asks about the /codex cleanup, and the plan-review prompt file moves into the project
"Every /codex challenge run stops for a /careful approval at cleanup" (#4841): the cleanup deleted the prompt with
rm -f "$PROMPT_FILE", a variable /careful cannot resolve, so it asked every time. The cleanup now reads"${PROMPT_FILE:?}", which /careful already accepts as guarded. The hook itself is unchanged."The Codex outside voice fails in plan mode" (#4842): the plan reviews created the prompt under
$TMPDIR, where plan mode refuses Write, so Codex never ran. The prompt now goes to.gstack/tmp/inside the project (folder mode 700, file mode 600). The command refuses a.gstackor.gstack/tmpthat is a symlink, so a cloned repo cannot redirect the prompt. Cleanup is a plainrm -- '<path>', which /careful allows.Why
People reported that /codex stopped for approval on every run and that the plan-review second opinion never started in plan mode. Now /codex runs straight through under /careful, and plan-mode reviews get their second-model review again.
Blast radius
The change touches the generated /codex, /plan-eng-review and /plan-ceo-review skill files for every host, and nothing else reads these lines. The /careful hook is unchanged: the new test feeds the generated lines to
careful/bin/check-careful.shand runs the generated create and cleanup commands in a scratch repo (script ran).Documentation
Status: current. No documentation changes were needed for this branch.
Scope: committed diff 8982588..254b65f (12 files: the /codex challenge and consult templates and their generated files, the /plan-ceo-review and /plan-eng-review sections, the outside-voice resolvers, tests and one changelog fragment). Nothing staged, unstaged or untracked. Searched README, ARCHITECTURE, CONTRIBUTING, docs/ and authored templates for the old prompt-file and cleanup wording.
Documentation health:
.gstack/tmp/gstack's scratch folder)Coverage debt: none new. The changes are internal to skill prose (where the Codex prompt file lives and how it is deleted) and add no public command, flag or setting.
Diagram drift: none.
Note: docs/designs/SEVERE_FIX_WAVE_2026_10.md (a dated design record) describes a lint that wants a
${TMPDIR:-/tmp}template onmktemp; the new plan-prompt path uses$PWD/.gstack/tmp/instead. The record was left as written.Tests
bun test test/outside-prompt-file.test.ts(new, 4 cases, all fail on main): passbun run typecheck: 0 errors;bun run typecheck:test: none newPre-Landing Review
Three review passes and an adversarial read. One blocking finding (writing the prompt through a symlink committed in the repo) was fixed by refusing a symlinked
.gstackor.gstack/tmp. The rest are below the blocking floor and are listed in the review notes. Second-model review: not run for this change; the adversarial read ran in the same model.Review notes
Below the blocking floor (advisory, informational, test-gap or wording items); recorded here and not fixed in this PR.
sf-171f8476ad01security finding, details recorded privatelytest/outside-prompt-file.test.ts:84git-status-empty assertion dropped with the .gitignore step.sf-6f2c363d68dbsecurity finding, details recorded privatelysf-41cba996e220security finding, details recorded privatelyIssues
Fixes #4841
Fixes #4842
Agent notes
Thread GSTA-873 for GST-4009. Local: targeted tests, typecheck, typecheck:test and parity-suite only; the full suite ran in CI (R65).
REVIEW_LOOP: passes=3 blocking_found=1 deferred=0 noted=10 fixed=1 scope=frozen dispatches=4
APPROVALS_RENDER: redacted (repository visibility public); gstack-approvals list shows the full record
Approvals
No approvals recorded for branch fix-codex-prompt-cleanup-plan-mode-prompt-file.
Plan: exempt: bug fix with a failing-first test (R65)
Plan check: exempt bug fix
Refs GST-4009
🤖 Generated with Claude Code