feat: deliver Grok and Codex replies through managed plugin conversations - #71
Conversation
🦋 Changeset detectedLatest commit: 58b24eb 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: 239f36d1da
ℹ️ 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".
| } | ||
| const text = messageText(input.message); | ||
| envelope(input); | ||
| const r = await route(input); |
There was a problem hiding this comment.
Re-check the binding after asynchronous route validation
When a send uses a binding, route(input) can await target resolution and Codex verification while stopBinding() runs concurrently outside the engine's serial queue. If another route keeps the Codex session open, this continuation still uses the stale running binding, persists a prepared record, and submit() silently returns it because the binding is now stopped; the caller may therefore report success even though the message will never be submitted, and replays remain stuck on that record. Revalidate the binding after these awaits or persist a rejected/cancelled receipt when it stopped.
Useful? React with 👍 / 👎.
Grok replies can now arrive automatically in the originating Codex thread while it continues working. A normal native
gbot_sendreturns a durable exchange receipt; the managed worker delivers the matching reply without model polling. Explicit links also forward new Grok messages to a chosen Codex thread and return its corresponding final answer.The same implementation ships in the generated Codex/Cursor/Claude plugins, portable MCP artifact, and CLI. It adds conversation discovery/send/wait/watch and bridge start/status/stop/operator-response tools, persistent app-server connections, guarded active-turn steering, and a separately packaged background worker. Native source identity is required for automatic inference; other hosts use explicit routes.
Durable cursors and stable message IDs prevent historical replay and duplicate uncertain submissions. Stop reaches the final pre-send boundary, per-send busy policy is honored, and bounded authentication retries resume from the saved cursor. Host permissions remain authoritative; no private Desktop pipes or automatic approvals are used.
Validation: the integrated tree passed 387 unit and 14 route tests, build, typecheck, and source/artifact validation. Copied-plugin/packed-npm checks passed 71 tests on Node 22.19, including cancellation, authentication recovery, caller-ID preservation, canonical transcript coverage, and inherited test-environment regressions. Independent whole-branch review plus scoped re-review closed all three final findings. Live receipts verify native model-to-MCP automatic return, Grok-to-Codex-to-Grok delivery, caller exit, and worker restart without duplicate delivery. The integration preserves the API cleanup already merged in #69 while restoring the unconditional loopback-only unit-test bootstrap. Detailed IDs, limits, and runtime decisions are in
docs/verification/2026-09-15-duplex.md.