Skip to content

Bidirectional Grok Bot ↔ Codex messaging (app-server + gbot) #24

Description

@ScriptedAlchemy

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)

  1. 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.
  2. Grok → Codex: Small bridge client using documented Codex app-server JSON-RPC (initializethread/list|resumeturn/start). Prefer daemon-managed sessions until Desktop re-attaches to the shared control socket.
  3. 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

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions