Skip to content

feat: deliver Grok and Codex replies through managed plugin conversations - #71

Merged
ScriptedAlchemy merged 23 commits into
mainfrom
codex/duplex-bridge
Sep 16, 2026
Merged

ScriptedAlchemy merged 23 commits into
mainfrom
codex/duplex-bridge

Conversation

@ScriptedAlchemy

@ScriptedAlchemy ScriptedAlchemy commented Sep 16, 2026

Copy link
Copy Markdown
Owner

Grok replies can now arrive automatically in the originating Codex thread while it continues working. A normal native gbot_send returns 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.

@changeset-bot

changeset-bot Bot commented Sep 16, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 58b24eb

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
grok-bot-cli Minor

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

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 16, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-16T09:19:16.275658Z 239f36d PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@ScriptedAlchemy
ScriptedAlchemy merged commit 7a24037 into main Sep 16, 2026
2 checks passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread src/core/relay/engine.js
}
const text = messageText(input.message);
envelope(input);
const r = await route(input);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant