Context Bridge is an open-source CLI agent harness and context orchestration utility developed by serdardb. It is built to facilitate seamless context switching and conversation state portability across different terminal-based AI coding agents. Operating as a lightweight Node.js command-line tool, Context Bridge manages session transitions between supported developer agents, including Claude, OpenAI Codex, and OpenCode. It tracks active session threads, captures transcript deltas, and delivers state updates across agent boundaries using runtime hooks like SessionStart. What sets Context Bridge apart is its multi-route adopt architecture. Instead of locking developers into a single proprietary assistant interface, it allows users to switch between disparate AI tools on the fly, auto-adopting external sessions via process environment indicators such as CODEX_THREAD_ID or working directory rollout discovery. The project is available as an open-source tool with zero external runtime dependencies, supporting Node.js environments (v18, v20, and v22).
Tags: agent harness, ai agent, cli, coding agent, developer tools, OpenSource
--adopt flag. - Hook-driven state injection — Injects pending conversation deltas and session state into target agents using SessionStart hook integrations. - Zero runtime dependencies — Packaged as a clean, native Node.js binary requiring no third-party package dependencies. - Delta and transcript synchronization — Implements byte-accurate truncation and baseline sync tracking to pass compact conversation summaries across agent boundaries.--adopt flag locates the active session transcript using the current working directory or thread ID and initializes the new agent with full context.Context Bridge is intended for software engineers who switch between multiple CLI-based AI assistants (such as Claude Code, Codex, and OpenCode) and require state portability. It is not necessary for developers whose entire workflow remains inside a single, dedicated agent ecosystem.
bash npm install -g context-bridgebash bridge --versionbash # Adopt an active session context and transition to Claude bridge claude --adopt # Or invoke context transitions from within supported plugin environments $bridge claudePart of CLI Coding Agents
Categories: AI Coding Agents, Code Assistants, Developer Tools