resume-claude-codex-grok
Health Pass
- License — License: MIT
- Description — Repository has a description
- Active repo — Last push 0 days ago
- Community trust — 10 GitHub stars
Code Warn
- process.env — Environment variable access in src/adapters/antigravity.mjs
- process.env — Environment variable access in src/adapters/claude.mjs
- process.env — Environment variable access in src/adapters/codex.mjs
- process.env — Environment variable access in src/adapters/grok.mjs
- process.env — Environment variable access in src/adapters/omp.mjs
- process.env — Environment variable access in src/adapters/opencode.mjs
- process.env — Environment variable access in src/install.mjs
Permissions Pass
- Permissions — No dangerous permissions requested
No AI report is available for this listing yet.
Pick up in-progress work from one CLI agent inside another: Claude Code, Codex, Grok Build, OpenCode, oh-my-pi, Cursor, Google Antigravity. Inspired by Grok Build (xAI).
resume-claude-codex-grok
Pick up in-progress work from one CLI agent inside another. You're building
something with Codex, you type /resume-codex in Claude Code, and Claude carries
on with the goal, the decisions already made, the files touched and what's still
open. Both directions, across seven agents — Google Antigravity included.
Install
Easiest: ask your AI agent to do it
Paste this prompt into Claude Code, Codex, Grok Build, Cursor, or any agent with
access to your terminal:
Install the resume-claude-codex-grok tool on this machine.
1. Check that Node.js >= 20 is installed (`node --version`). If it's missing or
too old, install the latest LTS first:
- Windows: `winget install OpenJS.NodeJS.LTS`
- macOS: `brew install node`
- Linux: your distro's package manager, or nvm
2. Run: npx -y github:Capetlevrai/resume-claude-codex-grok install
3. Then run: npx -y github:Capetlevrai/resume-claude-codex-grok doctor
and show me the output.
4. Tell me which resume-* commands are now available and in which agents, then
remind me to restart my agents so they pick them up.
Don't change anything else on the machine.
Or by hand, one line
npx -y github:Capetlevrai/resume-claude-codex-grok install
That's it. No clone, no npm install, zero dependencies — only Node >= 20
(>= 22.5 to read OpenCode and Cursor, which go through node:sqlite).
What the install does
Copies the runtime to
~/.resume-handoff/— a stable location that survives
deleting the clone or clearing the npx cache.Drops the
resume-*commands into the three hosts that accept them:Host Location Claude Code ~/.claude/commands/resume-*.mdCodex CLI ~/.codex/skills/resume-*/SKILL.mdGrok Build ~/.grok/skills/resume-*/SKILL.mdCommands are installed even if the agent isn't there yet. Install Claude
Code, Codex or Grok Build next week and the commands will already be waiting
at first launch — nothing to re-run.
For Grok Build, only resume-opencode, resume-omp, resume-grok andresume-antigravity are added: Grok already ships resume-claude, resume-codex and resume-cursor in its own
skills, and there's no reason to overwrite them.
How you invoke it, per agent
The prefix is not the same everywhere:
| Agent | Prefix | Example |
|---|---|---|
| Claude Code | / (command) |
/resume-codex |
| Grok Build | / (skill) |
/resume-opencode |
| Codex CLI | $ (skill) |
$resume-claude |
Codex uses $, not /. Its / is reserved for a palette compiled into the
binary (/model, /import, /skills, /export…): Codex has no custom
slash-command mechanism at all, and no /resume-* will ever show up there. Its
skills trigger with $ — type $res and autocomplete offers all seven.
In any of the three, plain language works too: "resume my last Claude session",
"continue from Grok".
Codex also ships
/import— "import setup, this project, and recent chats from
Claude Code" — a native import, but for Claude Code only. The skills installed
here cover the six other agents, and work in both directions.
Version note: Codex < 0.150 read
~/.codex/prompts. The installer now
writes to~/.codex/skills/and cleans up any files a previous version of this
tool may have left inprompts/.
Check / uninstall
npx -y github:Capetlevrai/resume-claude-codex-grok doctor # full diagnostic
npx -y github:Capetlevrai/resume-claude-codex-grok uninstall # remove everything
doctor reports your Node version, whether node:sqlite is available, how many
sessions each agent exposes, and which commands are already installed.
Where the idea comes from
Grok Build (xAI) introduced/resume-claude, /resume-codex and /resume-cursor — resuming another agent's
session from your own terminal. This repo generalizes that: every agent, in
every direction, plus OpenCode, oh-my-pi and Google Antigravity, and above all
the direction that didn't exist — resuming a Grok, Codex or Antigravity session
from Claude Code.
Supported agents
| Agent | Where sessions live | Status |
|---|---|---|
| Claude Code | ~/.claude/projects/<project>/<uuid>.jsonl |
tested |
| Codex CLI | ~/.codex/sessions/YYYY/MM/DD/rollout-*.jsonl |
tested |
| Grok Build | ~/.grok/sessions/<cwd>/<uuid>/chat_history.jsonl |
tested |
| OpenCode | ~/.local/share/opencode/opencode.db (SQLite) |
tested |
| oh-my-pi | ~/.omp/agent/sessions/<cwd>/<ts>_<uuid>.jsonl |
tested |
| Cursor | .../Cursor/User/globalStorage/state.vscdb (SQLite) |
untested |
Antigravity (agy CLI) |
~/.gemini/antigravity-cli/brain/<uuid>/.system_generated/logs/transcript_full.jsonl |
tested |
| Antigravity (IDE) | ~/.gemini/antigravity/brain/<uuid>/.system_generated/logs/overview.txt |
partial |
The Cursor adapter is written against Cursor's documented schema but could not
be validated on a real install. If it returns nothing, open an issue with your
Cursor version and the mapping will be fixed.
Antigravity, in a bit more detail
Antigravity stores each conversation as protobuf (conversations/<uuid>.db for
the CLI, an encrypted .pb for the IDE). The adapter reads neither: next to them,
Antigravity keeps its own plain-text journal of every step, and that journal
already holds the requests, the replies, the tool calls and the exit codes.
- Swarms and sub-agents. A session that spawned workers lists them by name,
and its "files modified" section includes what the workers wrote — in a swarm
the coordinator itself writes nothing. Workers are left out of the session list
and never picked by--last, but each one stays reachable by its id:/resume-antigravity 4f2a9c1e. - Working directory and title aren't in the journal. They come from
Antigravity'sconversation_summaries.dbwhennode:sqliteis available, and
fromhistory.jsonland the sub-agent records otherwise — so Antigravity works
on plain Node 20. - IDE conversations are encrypted. Only those for which the IDE left an
overview.txtcan be resumed, and that file is partial: requests, replies and
tool calls, without results or exit codes. The handoff says so.
Usage
In Claude Code and Grok Build (prefix /):
/resume-codex list Codex sessions, the agent asks which one
/resume-claude --last resume the most recent Claude Code session
/resume-grok 3 resume the 3rd Grok session in the list
/resume-opencode 01a04cfe select by UUID (a prefix is enough)
/resume-antigravity --last resume the most recent Antigravity conversation
In Codex (prefix $):
$resume-claude list Claude Code sessions
$resume-grok --last resume the most recent Grok session
$resume-opencode 3 resume the 3rd OpenCode session
And from the command line, without any agent:
npx -y github:Capetlevrai/resume-claude-codex-grok codex # list
npx -y github:Capetlevrai/resume-claude-codex-grok claude --last # handoff
npx -y github:Capetlevrai/resume-claude-codex-grok all --cwd # current project
# or, after install, straight from your home directory:
node ~/.resume-handoff/bin/resume-handoff.mjs grok 3 --out HANDOFF.md
| Option | Effect |
|---|---|
--last |
most recently active session |
--cwd |
only sessions from the current directory |
--out <f> |
write to a file |
--full |
no truncation |
--limit <n> |
how many sessions to list (default 12) |
--agent-keep <n> |
agent replies kept (default 14) |
--json |
machine-readable output (listing) |
What it produces
One document, identical whatever the source agent: the user's requests in full,
the agent's most recent replies, files modified with the kind of change, commands
run with their exit codes, MCP tools called, and the last exchange.
The filtering is aggressive, and that's the point: a 10.5 MB Codex rollout
becomes 17 KB of Markdown in 0.2 s (~99.8% reduction). What gets dropped —
reasoning blocks, token counts, injected system instructions, full tool outputs —
doesn't help you resume the work and floods the context of whichever agent picks
it up.
Two deliberate choices
A handoff is a summary, not ground truth. The generated commands explicitly
tell the agent to verify actual state (the listed files, git status) before
changing anything, and to flag discrepancies. That's the main trap in
agent-to-agent transfers: the summary describes intent, the disk describes what
exists.
Compaction is surfaced. When the source agent compacted its context, the start
of the session is gone on its side too. The report says so instead of implying a
complete history.
How it works
bin/resume-handoff.mjs CLI: subcommands, selection, listing, options
src/adapters/*.mjs one adapter per agent -> normalized shape
src/render.mjs normalized shape -> Markdown
src/sqlite.mjs lock-free SQLite reads (WAL copy to temp)
src/install.mjs deployment and command generation
test/smoke.mjs list + extract + render, for every agent present
test/antigravity.mjs content checks for Antigravity, on a synthetic fixture
Each adapter exposes available(), list(), extract(ref) and normalizes to the
same structure, which keeps the renderer and the CLI indifferent to the source.
Adding an agent means one file in src/adapters/ and one line in its index.mjs.
SQLite databases are never opened in place: they're copied (along with their-wal/-shm files) to a temp directory before reading, which avoids any lock and
guarantees a running session is never disturbed.
Language note: the generated commands and the handoff briefing are written
in French, since that's what they were built for. The tool itself, its CLI and
its output structure are language-agnostic. If you want English commands, open
an issue — a--langflag on the installer is the natural fix.
Development
git clone https://github.com/Capetlevrai/resume-claude-codex-grok
cd resume-claude-codex-grok
npm test # smoke test + Antigravity fixture
node bin/resume-handoff.mjs install --link # commands pointing at the clone
--link makes the commands point at the repo instead of copying into your home
directory: handy while iterating, best avoided otherwise (moving the folder breaks
everything).
Known limitations
- Cursor unvalidated (see above).
- Antigravity IDE conversations are encrypted: only the ones with an
overview.txtjournal are listed, and their handoff is partial. Conversations
from theagyCLI are complete. - Antigravity isn't a host yet: its conversations can be resumed from Claude
Code, Codex and Grok Build, but theresume-*commands aren't installed into
Antigravity itself. - Sub-agent sessions have no direct user message; the report says so and
surfaces the coordinator's instructions instead. - Exit codes aren't available from every agent: Codex, OpenCode and
Antigravity expose them, Claude Code, Grok and oh-my-pi don't. - Compaction detection depends on what each agent logs.
License
MIT. Inspired by Grok Build (xAI). Not affiliated with xAI, Anthropic, OpenAI, or
any of the other projects mentioned.
Reviews (0)
Sign in to leave a review.
Leave a reviewNo results found