Docs / Runtimes

Runtimes

Claude Code, Codex, OpenCode, and Cursor support.

The support matrix

agit can scan and import sessions from all four runtimes below — every one of them can be adopted, versioned, and pushed to the hub. What varies is whether a session can be restored back into that runtime:

RuntimeScan & importResume backWhy the limit, if any
Claude Code✓ native
Codex✓ native
OpenCode✓ native
Cursor✗ import-onlyits transcript on disk is a projection; the source of truth is an encoded protobuf, and there is no resumeable CLI entry. agit refuses to write bytes Cursor wouldn’t read back.
Claude Desktopexport-onlyhandoff goes through a claude://resume URL the app ingests itself — the final step happens where agit can’t observe it, so we don’t claim success.

agit doctor prints this table for your machine, per runtime.

Switching runtimes is lossy on purpose

Moving a session between runtimes goes through an intermediate representation (IR), and losses are stated up front, never silent:

  • encrypted reasoning never survives — neither vendor’s opaque blocks can be translated into the other’s; that’s a property of the formats, not an unfinished feature;
  • tool-call arguments/results may lack a landing spot in the target format.

Before materializing across runtimes, agit prints the loss list and asks you to confirm. Within the same format family (e.g. Claude Code ↔ Claude Desktop) it rewrites bytes natively instead — session id and cwd change, everything else passes through byte-for-byte, encrypted reasoning included.

What agit setup installs per runtime

All idempotent; re-running is a no-op.

RuntimeTurn-end hookInstruction blockMCP registration
Claude Code~/.claude/settings.json (SessionStart + Stop)~/.claude/skills/agit/SKILL.mdclaude mcp add agit
Codex— (no hook mechanism; the global instruction block teaches the discipline instead)~/.codex/AGENTS.md marked block[mcp_servers.agit] in ~/.codex/config.toml
OpenCode~/.config/opencode/AGENTS.md marked blockmcp.agit in ~/.config/opencode/opencode.json
Cursorproject AGENTS.md block (Cursor reads it; there is no user-level instruction file)mcpServers.agit in ~/.cursor/mcp.json

Restrict to one runtime with agit setup --runtime codex.

Where sessions are discovered

agit import with no session id, run inside the project directory, lists the candidates waiting to be adopted — read straight from the runtimes’ stores:

  • Claude Code — ~/.claude/projects/<slug>/*.jsonl
  • Codex — ~/.codex/sessions/**/rollout-*.jsonl
  • OpenCode — ~/.local/share/opencode/storage/message/** (+ parts)
  • Cursor — ~/.cursor/projects/<slug>/agent-transcripts/**.jsonl

Discovery answers “what exists” — never “whose it is”. Nothing auto-imports: you adopt a session with agit import <id> -n <agent> -b <branch> explicitly, because the name you pick silently decides which lineage this memory lands in.