session-bridge is a portable CLI and skill bundle for:
- browsing saved Codex and Claude sessions
- previewing a chosen session
- importing a snapshot packet from a past session
- forking the current live Codex or Claude session into a new terminal target
It does not restore hidden reasoning, background tasks, or live tool state. Snapshot import is not live resume, and live fork only branches the provider's visible session history.
Install from this repo:
bash install.shOr with npm:
npx session-bridge-skill installThis installs:
- Codex skill:
~/.agents/skills/session-bridge - Claude skill:
~/.claude/skills/session-bridge - Claude slash command:
~/.claude/commands/session-bridge.md
On first install, the CLI asks which terminal target should be used for fork-current and saves it here:
~/.session-bridge/config.json
You can skip the prompt and set it directly:
session-bridge install --terminal cmux --no-promptSupported terminal targets:
cmuxghosttyitermterminalcommandfor printing the command only
All recent sessions:
session-bridge list --source all --limit 20Only Codex:
session-bridge list --source codex --limit 20Only Claude:
session-bridge list --source claude --limit 20Filter by keyword:
session-bridge list --source all --query handybus --limit 20JSON output:
session-bridge list --source all --limit 20 --jsonBy list index:
session-bridge preview 3 --source all --messages 8By session id prefix:
session-bridge preview 019d23c7 --source codex --messages 8session-bridge pack 3 --source all --messages 12This writes a markdown packet under:
.omx/artifacts/session-bridge-<source>-<session>.md
Use this when you want to continue from an old session without attaching to its live runtime.
fork-current supports both Codex and Claude.
Provider detection order:
- explicit
--provider CODEX_THREAD_IDCLAUDE_SESSION_ID
Default usage:
session-bridge fork-currentWith a first prompt:
session-bridge fork-current "continue from here, but focus only on release notes"Force Codex:
session-bridge fork-current --provider codexForce Claude:
session-bridge fork-current --provider claudePrint the exact command without launching:
session-bridge fork-current --terminal commandCodex uses:
codex fork ...This creates a branched Codex session with a new session ID.
Claude uses:
claude --resume <session-id> --fork-sessionThis creates a branched Claude session from the current Claude conversation when CLAUDE_SESSION_ID is available.
cmux opens a real new cmux window, creates a new workspace there, and selects that workspace so the forked session is actually visible.
These targets open a new app window and run the generated fork command inside it.
This target does not open anything. It prints the exact command you can run manually.
session-bridge list --source all --limit 10
session-bridge preview 2 --source all --messages 8
session-bridge pack 2 --source all --messages 12session-bridge fork-current --provider codex --terminal cmuxsession-bridge fork-current --provider claudesession-bridge --help
session-bridge doctordoctor shows:
- configured terminal target
- detected current provider
- detected current Codex thread
- detected current Claude session
The skill version is defined in:
skill/SKILL.md
Useful commands:
npm run version:check
npm run version:sync
npm testnpm pack and npm publish also run the sync step automatically through prepack.