Summary
Enable direct bidirectional communication between Grok Bot agents (via gbot) and Codex tasks/threads, so each side can wake the other the way Codex tasks already message each other ("Sent by ChatGPT from another task").
Motivation
Grok Bot and Codex often work the same repos / machines. Today they cannot coordinate without the human copying context. We want:
- Codex → Grok: Codex agent calls out to a Grok Bot / group with a short status or ask.
- Grok → Codex: Grok Bot injects a follow-up into an existing Codex thread (or starts one), ideally with clear provenance.
Direction of travel (recommended)
- Codex → Grok (ship first): Codex skill / MCP / plugin wrapping
gbot send <bot|group> … (and optionally gbot thread for readback). Auth via existing gbot gateway / Grok Bot app session / CURSOR_ACCESS_TOKEN.
- Grok → Codex: Small bridge client using documented Codex app-server JSON-RPC (
initialize → thread/list|resume → turn/start). Prefer daemon-managed sessions until Desktop re-attaches to the shared control socket.
- Do not scrape Desktop’s ephemeral
CODEX_APP_TOOLS_PIPE_PATH (/tmp/codex-browser-use/*.sock) for product code — that path powers the built-in send_message_to_thread banner but is proprietary and fragile.
Upstream blockers (Desktop live threads)
ChatGPT Desktop currently injects codex_app MCP and runs a private stdio app-server, so ~/.codex/app-server-control/app-server-control.sock is often absent and external clients cannot attach to open Desktop tasks.
Track / pile onto:
Until fixed, Grok→Codex should target daemon / TUI / codex agents sessions, not today’s Desktop stdio process.
Related local code
gbot send / gbot thread already exist in this repo
- agent-bundle already has a UDS+WS app-server client pattern (
codex-app-server.ts) that can be reused or vendored carefully
Acceptance criteria
Status (2026-09-15): Child issues done, including #37/#38/#39 via #46. Epic stays open for ChatGPT Desktop attach (upstream) and optional Mac Studio smoke of the plugin. Follow-ups #32/#33 and #46 landed the hardening slices.
References
Summary
Enable direct bidirectional communication between Grok Bot agents (via
gbot) and Codex tasks/threads, so each side can wake the other the way Codex tasks already message each other ("Sent by ChatGPT from another task").Motivation
Grok Bot and Codex often work the same repos / machines. Today they cannot coordinate without the human copying context. We want:
Direction of travel (recommended)
gbot send <bot|group> …(and optionallygbot threadfor readback). Auth via existinggbotgateway / Grok Bot app session /CURSOR_ACCESS_TOKEN.initialize→thread/list|resume→turn/start). Prefer daemon-managed sessions until Desktop re-attaches to the shared control socket.CODEX_APP_TOOLS_PIPE_PATH(/tmp/codex-browser-use/*.sock) for product code — that path powers the built-insend_message_to_threadbanner but is proprietary and fragile.Upstream blockers (Desktop live threads)
ChatGPT Desktop currently injects
codex_appMCP and runs a private stdio app-server, so~/.codex/app-server-control/app-server-control.sockis often absent and external clients cannot attach to open Desktop tasks.Track / pile onto:
codex_appMCP override makesCODEX_APP_SERVER_USE_LOCAL_DAEMON=1unreachable openai/codex#41014 —codex_appMCP makesCODEX_APP_SERVER_USE_LOCAL_DAEMON=1unreachableUntil fixed, Grok→Codex should target daemon / TUI /
codex agentssessions, not today’s Desktop stdio process.Related local code
gbot send/gbot threadalready exist in this repocodex-app-server.ts) that can be reused or vendored carefullyAcceptance criteria
gbot_send/gbot_thread+ skill); Codex skill/MCP: message Grok Bot viagbot send#25 closedgbot) can list Codex threads on a reachable app-server andturn/starta message — shipped in feat(codex): add gbot codex status, list-threads, and send #28 (gbot codex status|list-threads|send);gbot codex/ bridge: inject messages into Codex threads via app-server #26 closedgbot codexCODEX_APP_TOOLS_PIPE_PATH— control-socket / daemon only; Desktop private stdio still blocked upstream (#41014, #41112)Status (2026-09-15): Child issues done, including #37/#38/#39 via #46. Epic stays open for ChatGPT Desktop attach (upstream) and optional Mac Studio smoke of the plugin. Follow-ups #32/#33 and #46 landed the hardening slices.
References
send_message_to_threadis Desktop MCP, not public RPC