One conversation.
Any agent runtime.
Switch the agent CLI running your conversation, mid-thread, without losing context. Start in Codex, continue in Claude Code, 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 x Codex takes it back
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 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, 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 JSONL, the file it re-reads to remember.
Load Codex / Claude formats into a neutral thread model (IR).
Drop scaffold and tool noise, redact secrets.
Materialise the target runtime's exact native session shape.
Boot the target with its own resume command. No paste. No summary.
What carries, what doesn't
Your turns cross over. Tool calls and reasoning don't, because they aren't the same across runtimes. 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, so it shows up in /resume
Stripped
Removed before anything crosses over.
- ✕System prompts, skill and plugin lists
- ✕Injected memory and environment blocks
- ✕Secrets: API keys, tokens, auth headers, emails
Not carried
Tool calls and reasoning don't transfer between runtimes.
- ·Tool calls and tool results
- ·Reasoning traces
- ·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, refreshing the existing projection
- Ctrl-BCCreate a new Claude continuation
- Ctrl-BxContinue in Codex, refreshing the existing projection
- Ctrl-BXCreate a new Codex continuation
- Ctrl-B:Open the Constant command line (switch / new / quit)
- Ctrl-BdDetach and exit cleanly
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 and switch the live runtime with a prefix key.$ constant carry --from codex --to claudeHeadless carry into the target's native session; prints the resume command.$ constant sessions --all --titlesList carryable sessions across known runtime stores.$ 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 statusQuick orientation: runtime readiness, latest sessions, trail state.$ constant trailShow the current Constant projection per runtime for this directory.$ constant routeDebug view of the fork graph with readable aliases (codex[1], claude[1.1]).Constant is alpha software. It reads and writes local session files and never overwrites your originals; it keeps a separate copy per runtime. Secrets are redacted and system prompts stripped before anything crosses over. Read the trust boundary before using it on sessions you care about.