One conversation.
Any agent runtime.
Switch the agent CLI running your conversation, mid-thread, without losing context. Start in Codex, continue in Claude Code or OpenCode, switch back whenever.
A live codex ⇄ claude switch. The transcript stays; only the runtime swaps.
Two ways to use it
Host an agent live and switch with a keypress, or carry a thread from the command line.
Live, in your terminal
Run an agent CLI inside Constant and switch the running one with a prefix key. The CLI keeps its own interface; Constant swaps it underneath.
$ constant host codex you talk to Codex Ctrl-B c Claude Code continues the thread Ctrl-B o OpenCode takes a turn Ctrl-B x Codex takes it back Ctrl-B t the trail graph — every chapter so far
From the command line
Carry a thread into another runtime's session without a hosted terminal. Constant prints the resume command.
$ constant carry --from codex --to claude carried → claude session 8da587a7 (auth bug · ch02 ← codex · cobalt-37) carried 14 turns · 2 redactions resume with: claude -r 8da587a7
What happens on a switch
Agent CLIs don't keep the conversation in memory. Every turn they re-read it from a file on disk, so the file is the memory. To switch, Constant reads the current session, snapshots the distilled thread to its own record, writes the target runtime's own session file, and runs its resume command. No summaries, no model calls. It takes milliseconds.
The runtime's local session file, the one it re-reads to remember.
Load Codex / Claude / Gemini / OpenCode formats into a neutral thread model (IR).
Drop scaffold, redact secrets, cap tool output. Every carry prints a receipt of what crossed.
Snapshot the distilled IR to ~/.constant/snapshots first — a durable copy no runtime owns.
Materialise the target's exact native session and boot it with its own resume command. No paste. No summary.
What carries, what doesn't
Your turns cross over. Tool history can come along with --with-tools; reasoning never does. System prompts and secrets are stripped on the way.
Carried
The conversation crosses, word for word.
- ✓Every user and assistant turn
- ✓The working directory
- ✓A name and handle, so it shows up in /resume
- ✓Tool calls and results, opt-in with --with-tools (redacted, size-capped)
Stripped
Removed before anything crosses over.
- ✕System prompts, skill and plugin lists
- ✕Injected memory and environment blocks
- ✕Secrets: API keys, AWS keys, PEM blocks, JWTs, tokens, emails
Not carried
Some machinery is never the same across runtimes.
- ·Tool history, unless you opt in with --with-tools
- ·Reasoning traces — never carried
- ·Approvals, sandbox, and hidden provider state
Add the tap, then install
Homebrew is the recommended path. curl and Cargo work too. Run constant doctor afterwards to check your setup.
brew tap kennykankush/constant https://github.com/kennykankush/constantbrew install kennykankush/constant/constantconstant --versionconstant doctor$ brew update $ brew upgrade kennykankush/constant/constant
- Ctrl-BcContinue in Claude Code (uppercase C: new continuation)
- Ctrl-BxContinue in Codex (uppercase X: new continuation)
- Ctrl-BoContinue in OpenCode (uppercase O: new continuation)
- Ctrl-BtToggle the trail graph: every chapter of the conversation, switchable from the graph
- Ctrl-B:Open the command line (switch / new / rename / quit, with Tab completion and history)
- Ctrl-BdQuit (the hosted CLI exits with it)
The command set
A small set of subcommands. The read-only ones never write to your runtime files.
$ constant host codexRun an agent CLI in a Constant PTY: switch the live runtime with a prefix key, status bar on the bottom row.$ constant carry --from codex --to claudeHeadless carry into the target's native session; prints a receipt and the resume command.$ constant resume cobalt-37Re-host a conversation from the trail; reprints from the record if every projection is gone.$ constant sessions --all --titlesList carryable sessions across known runtime stores.$ constant snapshotsList the record volumes: per-hop IR snapshots written at every carry.$ constant restore SNAPSHOTReprint a fresh native session from any record volume. Never overwrites anything.$ constant rename auth bugName a conversation; the native resume pickers re-stamp immediately.$ constant pack cobalt-37Bundle a conversation — ledger and record — into one portable file; unpack it on another machine.$ constant psEvery agent CLI process alive right now: runtime, uptime, the conversation it holds, cwd.$ constant export --from codex --out thread.constant.jsonExport the distilled, redacted neutral IR of a thread.$ constant doctorPreflight: runtime CLI versions, session-store presence, codec versions.$ constant trailShow the conversation's projections and chapters for this directory.Constant is alpha software. It reads and writes local session files and never overwrites your originals; it keeps a separate copy per runtime, and every carry is snapshotted to a local record you can restore from. Secrets are redacted and system prompts stripped before anything crosses over. Read the trust boundary before using it on sessions you care about.