plan-eng-review/plan-ceo-review: Codex outside voice can't run in Claude Code plan mode — prompt file is written to $TMPDIR with the Write tool, which plan mode refuses

Aperta Adatta ai principianti
#4,842 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
74/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
typescript

Direzione di ricerca

Inizia da scripts/resolvers/outside-voice.ts, intorno alla riga 181, e confronta le istruzioni sulla voce esterna visualizzate in plan-eng-review/sections/review-sections.md e plan-ceo-review/sections/review-sections.md. Poi aggiorna il fixture ermetico in test/autoplan-dual-voice-fixture.test.ts affinché corrisponda al comando per il file del prompt. Il risultato è raggiunto quando la voce esterna di Codex può scrivere il proprio prompt ed essere eseguita nella modalità di pianificazione di Claude Code, con il file temporaneo rimosso al termine.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

What happened

/plan-eng-review (same text in /plan-ceo-review) could not run its Codex outside voice while Claude Code was in plan mode. Codex was never launched; the skill fell back to the native reviewer.

The outside-voice step (generated by scripts/resolvers/outside-voice.ts around line 181, rendered into plan-eng-review/sections/review-sections.md and plan-ceo-review/sections/review-sections.md) says:

Create a private prompt file: run umask 077; mktemp "${TMPDIR:-/tmp}/gstack-plan-prompt.XXXXXXXX" in Bash and keep the returned path. Use Write to put the complete prompt and context ... in that file

From the session transcript (permissionMode: "plan"):

  1. Bash mktemp succeeded and created an empty file under $TMPDIR (/var/folders/.../T/gstack-plan-prompt.h7XtYt9m).
  2. The Write tool on that path was refused:
    Cannot edit files outside allowed directories (<workspace>). Attempted to edit: /var/folders/<...>/T/gstack-plan-prompt.h7XtYt9m
    
  3. Following the skill ("if a write fails or is refused, do not send"), no Codex process started → native fallback.

In plan mode, Claude Code's Write/Edit tools are limited to the working directory (plus the plan file), while $TMPDIR is outside it. So the step as written cannot succeed in plan mode, which is exactly where plan reviews usually run. Expected: the Codex outside voice runs during plan mode.

Suggested fix

Create the prompt file inside the working tree, in a gitignored scratch dir the skills already use with the Write tool (e.g. .gstack/tmp/, as the question-preference step does with .gstack/tmp/qt.txt):

mkdir -p .gstack/tmp && umask 077 && mktemp ".gstack/tmp/gstack-plan-prompt.XXXXXXXX"

and delete it after the run. (Alternatively, fall back to the in-workspace path only when the $TMPDIR Write is refused.) The hermetic test in test/autoplan-dual-voice-fixture.test.ts builds this same mktemp command, so it would need to change too.

Steps to reproduce

  1. In Claude Code, enter plan mode (Shift+Tab) in any git repo, with Codex installed and authenticated.
  2. Run /plan-eng-review on a plan, accept the outside voice (Codex).
  3. The Write to $TMPDIR/gstack-plan-prompt.* is refused; Codex never runs.

Readiness report

gstack doctor 1.104.0.0
ok              install root    ~/.claude/skills/gstack: claude global current (1.104.0.0), codex global current (1.104.0.0)
ok              rescue refs     none in ~/.claude/skills/gstack
ok              state root      ~/.gstack durable=yes (selected by default)
ok              bun             1.4.5 at ~/.bun/bin/bun (floor 1.3.3, tested 1.4.2)
ok              hooks           19 hook(s) parse
ok              codex           codex-cli 0.172.0; self-locate ok; model gpt-5.6-sol (source: ~/.codex/config.toml model)
warn            codex hooks     skill-route no trust entry, skill-contract no trust entry, destructive-guard no trust entry (Codex skips a hook until it is trusted)
ok              codex probe     cached MODEL_OK, 13h ago (not re-run; --live probes now)
not configured  artifacts sync  off; cross-machine artifacts sync is unavailable
ok              browse bundle   browse/dist built
ok              binaries        find-browse, design, pdf, gstack-global-discover launch (4 of 4)
ok              claude code     2.1.322 (Claude Code)
ok              session journal largest of 2: 3.3 MiB
ok              guard log       111 decisions (0 denied)
ok              CLAUDE.md       none
13 ok, 1 warn, 1 not configured, 0 fail

Environment

  • Host: Claude Code 2.1.322 (running inside Conductor, Claude Agent SDK), plan mode
  • OS: macOS (Darwin 27.2.0)
Lingua principale
TypeScript
Stelle
143k
Fork
21k
Merge medio
7h 19m
PR unite (30g)
781

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di garrytan/gstack

Tutte le issue di garrytan/gstack

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.