Repository navigation
Description
Residual of #1319 (review round 2, finding A1). #1319 fixes the cases where Agent Code can SEE the native draft; this issue is the case where it cannot.
What happens
- A human types a draft directly into a Codex pane, in a layout the composer classifier cannot read (for example the 13-row draft probe from the fix(codex): see a native draft before writing into it; restart into an empty 0.157 composer (#800, #1313) #1319 review: the draft pushes the shortcuts hint off, so
getComposerState()isunknown). - Readiness correctly withdraws to
{ ready: false, reason: 'provider-not-ready' }. It does not latchcomposer-occupied, because nothing proves a draft is there. - The user types in Agent Code's own composer and presses Enter.
composerOccupiedis false, so the new fix(codex): see a native draft before writing into it; restart into an empty 0.157 composer (#800, #1313) #1319 guard inuseComposerKeybindsdoes not run. Codex's composer submit writes bracketed paste +\r, which appends to and submits the human's native draft.
The provider-owned delivery path (deliverCodexPrompt) already refuses this case. Only the pane's own Enter path lets it through.
Why #1319 did not refuse it
Refusing Enter on every provider-not-ready would also block the normal "queue a follow-up while Codex is working" flow, because a working pane also reports provider-not-ready. The readiness reason cannot tell apart "Codex is busy" and "the composer holds something we can't read".
Proposed fix
Add a separate readiness reason (for example composer-unreadable) for the case where Codex is idle but the composer rows are not provably empty. Publish it from publishNativeComposer in src/providers/codex/runtime/codexSession.ts, and let the pane's Enter guard refuse it the same way it refuses composer-occupied. provider-not-ready while Working stays queueable.
Evidence
temp/review-1319/round2-report-a.mdfinding 1 (renderer probe:inputReadinessReason: 'provider-not-ready', inputStatus?,sendcalled with\x1b[200~Status?\x1b[201~\r).- Recorded fixture:
packages/codex-headless/testing/fixtures/composer-0157/idle-draft-ctrlc.json.
Refs #1319
Activity
docs(plan): keep the Codex native-draft plan true after both review r…
fix(codex): a draft taller than 12 rows publishes composer-occupied
fix(codex): #1343 review — the replay waits for the parser; bump code…
test(codex): #1343 review — pace the replay, reuse one pane for the c…
test(codex): #1343 round 2 — replay in batches of 50; bump codex-head…
chore(codex): bump codex-headless to 0e5ea5d (#57 round-3 test fix)
chore(codex): bump codex-headless to the codex-headless#57 merge (d42…