remotehands
Enables Codex to act as a user of a live Claude Code session. It provides tools to send messages, read outputs, manage sessions, and review diffs, allowing mid-task corrections without losing context.
README
driveclaude
Codex drives. Claude types.
Codex doesn't submit jobs to Claude Code. Codex drives it — typing into a live session, watching it work, cutting in mid-task when it drifts, and carrying on. Exactly what a person does, except the person is an agent.
you ──▶ Codex ──MCP──▶ driveclaude daemon ──▶ live Claude Code session
▲ │
└────────── everything it says and does ──────┘
You watch Codex. Codex watches Claude.
Why this is different
Every other Codex↔Claude bridge does task delegation: send a task, wait, collect a result. Each turn is a fresh process; the supervisor is a dispatcher standing outside the room.
driveclaude keeps one Claude process alive with its stdin held open. That
single fact changes what's possible:
| task delegation | driveclaude | |
|---|---|---|
| process | one per task, dies after | one live session, stays open |
| mid-task message | impossible — must kill and restart | queued, absorbed between steps |
| context | replayed from history each time | never left |
| supervisor is | a dispatcher | the driver of the session |
Steering work in flight
This is the whole point. Codex sends a correction while Claude is working — nothing is interrupted, nothing restarts:
you › Create red/green/blue/gold.txt, each containing COLD.
· Write red.txt
you › Change of plan — files not yet written must contain WARM. [queued mid-task]
· Read red.txt
claude: Got it — red.txt stays COLD (already written), the remaining three will be WARM.
· Write green.txt
Result: red.txt: COLD, the rest WARM. Claude finished its current step, took
the new instruction on board, and kept going — no lost context, no restart.
Install
npm install -g driveclaude
driveclaude init-codex
Needs the Claude Code CLI on your PATH and logged in, plus the Codex CLI.
The tools Codex gets
| Tool | What it does |
|---|---|
send(cwd, message, model?, fresh?) |
Type into the live session. Returns instantly. Accepted any time, including mid-task — then it's queued. |
read(cwd, since?) |
Everything since a cursor: Claude's words, every tool call, files written, failures, turn completions. Returns a new cursor. |
session(cwd) |
Is a session live, how long, what has it written. |
sessions() |
Every session across every directory. |
end(cwd) |
Close the session cleanly. The conversation is remembered and resumes on next send. |
diff(cwd, stat?, path?) |
Working-tree diff vs HEAD — how Codex reviews what actually landed. |
send and read are the loop. Everything else is occasional.
The daemon
Sessions live in a background daemon, not inside the MCP server — because Codex kills its MCP subprocess on exit, and a session that dies with your terminal isn't a session you can come back to.
So: quit Codex, reopen it, and Claude is still there — still mid-task, queue intact, full context. Verified by killing the MCP server mid-task and attaching a new one; the queued correction was still picked up and applied.
The daemon starts automatically on first use.
driveclaude status # is it running?
driveclaude stop # stop it and all sessions
If the daemon does die, nothing is lost permanently — session ids are persisted,
and the next send resumes the same conversation.
Teaching Codex to drive
Put this in ~/.codex/AGENTS.md:
## Driving Claude Code
You are the driver of a live Claude Code session, not a dispatcher. You plan,
type, watch, correct, and review. You do not write implementation code
yourself.
Loop:
1. Plan the change and state your acceptance criteria.
2. send({ cwd, message }) — brief it like a capable engineer.
3. read({ cwd, since }) repeatedly while it works. Narrate what you see to me.
4. The moment it looks wrong, send() a correction. Do NOT wait for the turn to
end — the message queues and Claude picks it up between steps.
5. When idle, diff({ cwd }) and review against your criteria.
6. Correct with another short send(), or report the finished work to me.
The session remembers everything. Keep messages short and conversational —
never restate earlier context. Keep one unanswered message in flight at a time.
CLI
The same engine by hand.
driveclaude send "add retry with backoff to the fetcher" # send, then watch
driveclaude send "actually use the existing helper" # works mid-task too
driveclaude watch # follow the live session
driveclaude read --since 42 # replay from a cursor
driveclaude session # status
driveclaude diff --stat # review
driveclaude end # close the session
Flags: --cwd <dir>, --model <name>, --fresh, --since <n>, --stat,
--no-follow.
You can always attach to the exact session Codex is driving:
claude --resume $(driveclaude session | awk '/^session/{print $2}')
Autonomy
Claude runs with --dangerously-skip-permissions in your real working copy — it
writes, runs tests, installs things, without prompting. Headless sessions have
nobody to answer a permission dialog, and the point is hands-off delegation.
Your guardrails are Codex watching in real time, the ability to correct mid-task, and git. Work on a branch.
Known limits
- The queue is in-memory. If the Claude process dies, queued messages are gone silently. Keep one unanswered message in flight — the daemon reports queue depth as best-effort, not a guarantee. See anthropics/claude-code#78338.
- No mid-turn interrupt.
sendalways queues and never cuts Claude off (deliberate). To stop something badly wrong,endthe session — the conversation resumes on the nextsend. - One session per directory. Two sessions in one working copy would fight over the same files.
Configuration
| Env var | Default | Purpose |
|---|---|---|
DRIVECLAUDE_MODEL |
sonnet |
Model for new sessions. |
DRIVECLAUDE_CLAUDE_BIN |
claude |
Path to the Claude Code binary. |
DRIVECLAUDE_HOME |
~/.driveclaude |
Sessions, event logs, daemon socket. |
How it works
sendasks the daemon for the session bound to that directory, starting one if needed —claude -p --input-format stream-json --output-format stream-json --verbose --dangerously-skip-permissions, stdin held open.- Your message is written to that stdin as a JSON user message. Claude takes it whenever it reaches a step boundary.
- Claude's stream-json output is parsed into numbered events (text, thinking,
tool calls, failures, results) kept in memory and appended to
~/.driveclaude/logs/<session>.jsonl. readreturns events after your cursor, so Codex polls cheaply and only ever sees what's new.
Unofficial
Not affiliated with or endorsed by Anthropic or OpenAI. "Claude" and "Codex" are trademarks of their respective owners.
License
MIT
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。