← All projects

Open Source · npm package

context-bridge.

Switch agents. Not context.

You work in more than one coding agent, and every switch normally costs you the conversation: copy a summary, hunt a session id, start over. context-bridge connects the native sessions of Claude Code, Codex, Grok, Antigravity and OpenCode. Each agent keeps its own real session; the bridge computes what the other one is missing and delivers exactly that.

JavaScriptnpmv0.13.0 developer preview

Five native sessions, running at once

Claude Code

Native session
claude › Working on the checkout…
Decisions Use VitestKeep API surface small
Open questions How to diff Codex threads?
Files touched src/bridge/src/state/tests/
git main ✓ clean

Codex

Native session
codex › Refactoring the adapter…
Decisions Deterministic thread adoption
Open questions What about rate limits?
Files touched src/adapters/src/cli.ts
git main ✓ clean

Grok

Native session
grok › Exploring edge cases…
Decisions Session-id resume path
Open questions How to handle expired sessions?
Files touched src/grok/src/state.ts
git main ✓ clean

Antigravity

Native session
agy › Tightening the handoff…
Decisions Auto-submit prompt
Open questions Consent UX wording?
Files touched src/agy/docs/
git main ✓ clean

OpenCode

Native session
opencode › Verifying transactions…
Decisions SQLite insert strategy
Open questions Should we prune more aggressively?
Files touched src/opencode/src/ob/
git main ✓ clean
Missing context only
The agents were different.The work was the same.

Every switch meant rebuilding context, rewriting summaries or starting over.

The context should follow.

One command · one continuous session

Watch the work move.

Claude Code

claude ▸ /bridge codexPacking delta…Sending to Codex…Closing Claude Code session.

context-bridge

decisions ✓open questions ✓git state ✓knownBy matrix ✓packing delta…

Codex

codex ▸ Session resumedContext received: only what was missing.
  1. Record

    Decisions and open questions

  2. Diff

    Compare what the target knows

  3. Pack

    Build bounded delta

  4. Switch

    Close one TUI, open the next

  5. Resume

    Continue inside native session

No copied transcript. No wrapper session. No restart.

install, check, switch
$ npm install -g @serdardb/context-bridge
$ bridge doctor --fix bootstraps what is missing, asks before each change
$ bridge starts the loop, Claude Code by default
claude ▸ /bridge codex hand off, Claude closes, Codex opens
codex ▸ $bridge grok same command in every agent
grok ▸ $bridge antigravity
agy ▸ $bridge opencode the fifth agent, delta written into its own store
opencode ▸ $bridge claude back home, context intact
Five agents.Twenty directions.One command.

Five agents. Equal citizens.

Same knowledge on every side. The session shape differs per agent, and each difference is stated, not glossed.

Claude Code

/bridge <agent>
Delta arrives via SessionStart hook, inside the conversation
First switch to Codex Official OpenAI import
Version 2.1.x or newer

Codex

$bridge <agent>
Delta arrives via Resume prompt; SessionStart hook once trusted via /hooks
First switch Delta-seeded session
Version 0.143.0 or newer

Grok

$bridge <agent>
Delta arrives via Opening prompt of the resumed session
First switch Delta-seeded session
Version 0.2.x or newer

Antigravity

$bridge <agent>
Delta arrives via Auto-submitted prompt (--prompt-interactive)
First switch Delta-seeded session
Version agy 1.1.x

OpenCode

$bridge <agent>
Delta arrives via Direct write into its SQLite session store
First switch Delta written on resume, then the TUI opens
Needs The sqlite3 CLI; doctor also reports store schema compatibility

State, not transcripts. And not in your repo.

  • Native Claude session
  • Native Codex session
  • Native Grok session
  • Native Antigravity session
  • Native OpenCode session

global project store

session refssync watermarksrecovery journalspending markers

Canonical memory stays where it belongs: inside each agent's own session. What links them now lives outside the project entirely.

Runtime
One dependency.Three things Node will not do. koffi
Publish a file and fail if it already existsA kernel lock that does not live in a PID fileFilesystem identity where there is no birth timeReads never load it. Writes refuse rather than fall back to a weaker promise.MCP is a separate package, so installing the core installs no SDK.
  • No transcripts

  • No SaaS

  • No telemetry

  • No API keys

One directory. More than one conversation.

Lanes isolate context. Now they can isolate the working tree too.

main Claude Code Codex Switch history
refactor Claude Code Grok OpenCode Switch history
release Codex Antigravity Switch history
One checkout by default / a Git worktree when you ask
$ bridge lane$ bridge lane new refactor --seed main$ bridge lane switch main

Each lane keeps its own agent links, switch history and checkpoints. Two terminals can run without their context colliding.

Parallel conversation — and, when a lane takes a worktree, parallel code.

More than a switch.

bridge status --json linked sessions, machine-readable
bridge verify every agent answers, every route configured
bridge inspect what the last handoff actually ran
bridge handoff codex --dry-run the road and payload, writing nothing
bridge search <text> across local summaries and audits
bridge storage plan preview the move out of .bridge/
bridge project adopt <id> reconnect a directory that moved
bridge artifact export a redacted, hashed context bundle
bridge artifact seal encrypt it; the key leaves separately
bridge watch metadata changes, read-only

Commands that change things preview first and act on --apply. Purge asks for the id typed back.

Engineering principles

Engineering principles.

  • Local and private

    No SaaS. No telemetry. Credentials are detected, never read.

  • Boundaries stated

    macOS, with selected Linux and Windows acceptance. Power-loss durability is not claimed.

  • Failures visible

    Inspect shows what agents actually ran, failures first.

  • Safe by default

    Clean supports dry-run. Pending injection is never deleted.

The product is the handoff. Trust is the rest of the system.

Keep the work.Change the agent.
npm install -g @serdardb/context-bridge
v0.13.0 / developer previewMIT / one native dependencyUses the subscription CLIs already installed on your machine.