Automation·terminal·MIT
cdx
Codex and Antigravity as detached lanes, driven with 21 tools from the session.

cdx lets a Claude Code session hand work to OpenAI Codex and Google Antigravity and keep going. Each task runs as a detached lane on your machine, started with one of the 21 tools the mod registers in the session, and cdx wakes Claude when the lane finishes, asks a question, stalls or hits an outage. Claude never waits on a lane: there is no wait tool by design.
What it does
- Start work with
mcp__cdx__spawn(a lane with a brief),resume(continue a finished lane),review(a diff reviewed in a fresh, read-only session),consult(a read-only advisory lane) andfork(branch a Codex thread). - Steer a running lane with
send, answer its question withreply, message another session withmsg. - Check in with
status,events,report,tail,questionsandusage. None of them block. - Finish with
closeorkill.gatesets the shell command a lane must pass before its report counts,jobruns a detached shell command,takeoverclaims another session’s lanes,doctordiagnoses the install. /lanesprints lane status from the prompt. A status line shows running lanes, open questions and quota; each wake event also shows a toast.gptruns Codex, ongpt-6-astraby default;gemini, the default, runs Antigravity ongemini-3.8-flash-high. A Codex lane spawned as supervisor drives its own children, one level deep.- The same lanes are reachable from the
cdxCLI in any terminal and from a browser dashboard atcdx view, port 7477.
Install
Needs function hooks enabled, Bun, and at least one engine: Codex CLI 0.149 or later, signed in, for gpt, or the Google Antigravity CLI agy, authorized, for gemini. macOS, Linux and WSL. The author does not state a minimum Claude Code version; the type definitions vendored in the repo come from Claude Code 2.1.270.
git clone https://github.com/RedesignedRobot/cdx.git ~/.claude/skills/cdx && ln -s ~/.claude/skills/cdx/cdx.ts ~/.local/bin/cdx
cdx doctor --fix
cdx doctor --probe
The clone into ~/.claude/skills/ loads the mod in the next Claude Code session; the symlink gives you the cdx command in the terminal. doctor --fix installs the shipped Antigravity agents and hooks; --probe sends a short request through each engine. Then ask Claude to spawn a lane, or run /lanes. If cdx doctor says the session is not polling, run /reload-plugins.
How it works
The mod talks to cdx only through $.process.run: every call starts bun cdx.ts from the plugin folder with your session id in the environment. On session.start it registers the 21 tools under the prefix mcp__cdx__, the /lanes command and a two-second timer that runs cdx events --json, plus cdx status --line every fifth tick. cdx brief runs at start and after /clear or /resume; its output is queued as context for Claude.
Events reach Claude by two paths. When no turn is running and a pending event is a wake-up, the mod submits a prompt that starts with [cdx], which starts a turn of its own. Mid-turn, events stay in a buffer and are attached as [cdx] events context to the next tool result of the head, or to your next prompt. Subagent tool calls never drain the buffer.
From the session it reads turn.start and turn.complete, to know whether the head is idle; each tool.call, to see whether it was denied and whether a subagent made it, never its arguments; and the command of every Bash call, which it denies when it calls an engine CLI directly, so engine work goes through a lane. It reads no prompt text: prompt.submit only gets pending events attached.
The mod makes no network calls and never calls $.model, so it spends Claude tokens only through what it puts in context: the 21 tool definitions, each [cdx] wake prompt, and the events and briefs attached to tool results and prompts. Lanes run the engines’ own CLIs as local processes, so their tokens land on your OpenAI or Google account. The ledger records Codex tokens per thread, usage shows account limits and which Codex account to spend next, and a Gemini round that hits its five-hour quota writes ~/.cdx/gemini-quota.json and blocks Gemini work until the reset.
State lives under $CDX_HOME, default ~/.cdx, as plain files: ledger.json (every lane and round), logs/ (raw engine events and stderr), briefs/ (every prompt cdx injected into an engine), reports/, control/, questions/, feed.log (the event journal) and sessions.json (ownership and delivery cursors). cdx doctor --fix also writes a cdx entry into ~/.gemini/config/hooks.json.
Work lanes edit files and run shell commands without approval: Codex starts with approval policy never and full workspace access, Antigravity with --dangerously-skip-permissions. The injected brief forbids commits, pushes and deploys; the gate command, run by cdx after the report, decides whether a round passes. Review lanes are read-only: Codex through its sandbox, Antigravity through a before-and-after tree check that fails the round if any file changed. The README calls these accidental-write controls, not a security sandbox, and warns: “Point cdx only at code you would let either engine edit.”
Limitations
- Function hooks are early access. The author removed the 135 end-to-end tests, so engine integration, question timeouts, gate execution and the browser view have no automated coverage.
- The head never waits. There is no wait tool;
cdx waitexists only in the CLI. Mid-turn, check witheventsorstatus. - Ownership follows the full session id. A new session or a fork must run
takeoverbefore it can steer, close or kill another head’s lanes or receive their events. Takeover replays no history. - A crash between printing an event and acknowledging it can deliver that event twice, because Claude Code gives no durable delivery acknowledgment.
- Antigravity lanes have no headless fork, a 90-minute runtime cap by default and a cap of two work rounds per lane. Codex lanes have neither cap.
- Headless (
claude -p) keeps polling and delivery but skips the status line and toasts.
More mods
The whole directory →autodev-core
Autonomous sprint loop: brainstorm, auto, iterate, audit, review, ship. Redacts secrets.
claude plugin install autodev-core@autodevcatalyst-probes
Model judges over subagent dispatches, defined in TOML. Plus your own prompt rules.
claude plugin install catalyst-probes@catalystagent-flow
Every subagent of the session in a live tree beside the transcript. Zero tokens.
claude plugin install agent-flow@claude-agent-flowanchorwatch-mod
Blocks rm -rf, force pushes, DROP TABLE, curl | sh and cat .env before they run.
claude --plugin-dir ./anchorwatch/plugins/anchorwatch-mod