Fix remaining Codex bridge wait, selection, queue, and plugin commands - #118
Conversation
🦋 Changeset detectedLatest commit: 0f4e856 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: de0b265720
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| model: z.string().regex(/^[A-Za-z0-9][A-Za-z0-9._:/-]{0,127}$/).optional(), | ||
| effort: z.enum(['none', 'minimal', 'low', 'medium', 'high', 'xhigh']).optional(), |
There was a problem hiding this comment.
Route model and effort through managed sends
When codex_send is called with replyToGrok or bindingId, these newly accepted options are passed to codexReturnOperation, but that function neither accepts nor includes model or effort in the managed sendToCodex payload. The request therefore succeeds while silently running with the thread's existing selection, which can produce results from a different model or reasoning effort than the caller requested.
Useful? React with 👍 / 👎.
| while (!done) { | ||
| const interactions = scan(); | ||
| if (terminal(status)) return [status, error ?? historyError]; | ||
| if (historyError || overflow) return ['unknown', historyError ?? 'Notification coverage overflow']; | ||
| if (historyError) return ['unknown', historyError]; | ||
| if (interactions.length) return ['waiting-for-input']; |
There was a problem hiding this comment.
Preserve overflow uncertainty for pending interactions
When more than 500 notifications or 4 MiB of events arrive, the bounded event queue can evict an unresolved approval or user-input request, but this change no longer treats overflow as incomplete coverage and resets truncated to false. History polling only reconstructs turns and items, not server requests, so a flooded wait can now report a plain timeout with interactions: [] and reply.truncated: false even though the turn is blocked on an interaction that was dropped.
Useful? React with 👍 / 👎.
| expectedCwd: z.string().min(1).optional(), | ||
| threadId: id, | ||
| timeoutMs: z.number().int().min(1).max(600000).optional(), | ||
| timeoutMs: z.number().int().min(1).max(7200000).optional(), |
There was a problem hiding this comment.
Keep the watch timeout limit aligned
watchSchema spreads observationFields, so raising this shared maximum to two hours also makes codex watch accept values above 600000 ms. conversation.watch still enforces a 600000 ms maximum and the watch route still advertises that limit, causing values such as 1800000 to pass route validation and then return a usage failure from the operation instead of being rejected consistently; use a wait-specific timeout field or update the watch implementation and render budget too.
Useful? React with 👍 / 👎.
Codex bridge fixes
codex_wait/gbot codex waitno longer treat a bounded notification buffer overflow as lost execution. They reconcile terminal state and final items from history and accept caller timeouts up to two hours. Added a notification-flood regression and long-timeout test.codex send/codex_sendaccept validated model and effort overrides through stable 0.158.0thread/resumeandturn/startfields.gbot codex new/codex_newusethread/startwith cwd, model, effort, and optional first message, preserving the expected-cwd guard. Added protocol and validation tests.thread/queue/*remains experimental, so queue selection withoutGROK_BOT_CODEX_EXPERIMENTAL=1fails before connecting with the supported alternatives; an opted-in daemon is checked by the actualthread/queue/addresponse. Updated the API pin, docs, and both-path tests.CODEX_APP_SERVER_SOCK, and point Grok Bot boxes to machine-targeted Grok Bot Shell. Added error guidance tests and README instructions.Verification
npm run check: pass (419 unit tests; 15 route tests)npm run build: passnpm run validate:artifact: passnpx changeset status --since=origin/main: patch release recognizednpm pack --dry-run: pass; all three command files includedA live 25-minute turn was not run because the separate checkout has an active end-to-end test; the flood regression exercises completion reconciliation in this worktree. No npm release or installation was attempted.