# AgentBridge: Local Bridge for Claude Code and Codex Collaboration

This repository profile is provided by osrepos.com, an open source repository discovery platform.

Source: osrepos.com
Repository profile: https://osrepos.com/repo/raysonmeng-agent-bridge
Generated for open source discovery and AI-assisted research.

AgentBridge is an innovative local tool designed to facilitate real-time, bidirectional collaboration between Claude Code and Codex AI agents. It enables seamless cross-review, task splitting, and quota relay, allowing these powerful models to work together efficiently within a single session without manual intervention. Notably, the tool itself was largely built by Claude Code and Codex collaborating through AgentBridge.

GitHub: https://github.com/raysonmeng/agent-bridge
OSRepos URL: https://osrepos.com/repo/raysonmeng-agent-bridge

## Summary

AgentBridge is an innovative local tool designed to facilitate real-time, bidirectional collaboration between Claude Code and Codex AI agents. It enables seamless cross-review, task splitting, and quota relay, allowing these powerful models to work together efficiently within a single session without manual intervention. Notably, the tool itself was largely built by Claude Code and Codex collaborating through AgentBridge.

## Topics

- agent-collaboration
- claude-code
- codex
- developer-tools
- multi-agent
- TypeScript
- AI
- CLI

## Repository Information

Last analyzed by OSRepos: Sat Aug 22 2026 20:56:25 GMT+0100 (Western European Summer Time)
Detail views: 1
GitHub clicks: 0

## Safety Notice

OSRepos shares public repositories for knowledge and discovery only. Review source code, dependencies, licenses, and security implications before running or installing anything.

## Content

## Introduction

AgentBridge is a powerful local developer tool that creates a bidirectional bridge between Claude Code and Codex, enabling them to collaborate in real-time within the same working session. This project addresses the challenge of integrating different AI agents, allowing them to review each other's work, split tasks, and even manage subscription quotas for long-running jobs. It was notably built by Claude Code and Codex themselves, showcasing its proof of concept through its own development process.

Key benefits include:
*   **Cross-review**: Codex implements, Claude reviews the diff, and pushes change requests directly back.
*   **Task splits from one prompt**: Agents negotiate and divide labor before coding, with human guidance.
*   **Quota relay for overnight runs**: Tasks seamlessly transfer between agents when one's subscription window runs dry, ensuring continuous progress.

## Installation

Getting started with AgentBridge is straightforward. You'll need Bun, Claude Code, and Codex CLI installed.

1.  **Install Bun**: The runtime for AgentBridge daemon and plugin server.
    bash
    curl -fsSL https://bun.sh/install | bash
    
2.  **Install AgentBridge CLI**: This step also attempts to register the Claude Code plugin.
    bash
    npm install -g @raysonmeng/agentbridge
    
3.  **Initialize your project**: This checks dependencies and generates the necessary configuration.
    bash
    abg init
    
4.  **Start Claude Code**: Launch Claude Code with the AgentBridge channel enabled.
    bash
    abg claude
    
5.  **Start Codex TUI**: In a separate terminal, connect Codex to the same bridge.
    bash
    abg codex
    

*Note: By default, `abg claude` and `abg codex` run with elevated permissions (`--dangerously-skip-permissions` and `--yolo`). Use `--safe` to launch with normal prompts or set `AGENTBRIDGE_SAFE=1`.*

## Examples

Once both agents are running and connected via AgentBridge, you can initiate a collaborative task. For instance, ask Claude:


"Propose a task split with Codex for <your task>, then have Codex implement its part while you review."


You will observe Claude sending a proposed division of labor to Codex. Codex can then accept or counter, begin its work, and push its completion back into Claude's session for review. This entire process occurs without any manual relaying on your part, demonstrating true peer-to-peer AI collaboration.

## Why Use AgentBridge?

AgentBridge offers significant advantages over manual workflows or simpler delegation tools:

*   **Automated Communication**: Unlike running two terminals and copy-pasting, AgentBridge automates message relay, manages turn coordination, and filters noisy events, allowing agents to communicate efficiently without human intervention as a message bus.
*   **Persistent Peer-to-Peer Interaction**: It maintains both agents as live, persistent peers, enabling mid-turn communication, such as review comments landing while the other agent is still working. This differs from one-way delegation plugins that only allow a single request-response cycle.
*   **Human-Steered Coordination**: Instead of a top-down orchestrator scripting every hop, AgentBridge facilitates peer-to-peer conversations where agents propose their own splits and review each other, with the human providing high-level steering. This fosters a more dynamic and autonomous collaboration environment.
*   **Context Management**: The bridge intelligently forwards only meaningful `agentMessage` payloads, not raw tool-call noise or full transcripts. It uses a three-tier marker routing system (`[IMPORTANT]`, `[STATUS]`, `[FYI]`) to ensure each agent receives a curated stream of relevant information, preventing context bloat.

## Links

*   **GitHub Repository**: <a href="https://github.com/raysonmeng/agent-bridge" target="_blank" rel="noopener noreferrer">https://github.com/raysonmeng/agent-bridge</a>
*   **Official Website**: <a href="https://raysonmeng.github.io/agent-bridge/" target="_blank" rel="noopener noreferrer">https://raysonmeng.github.io/agent-bridge/</a>
*   **User Manual**: <a href="https://github.com/raysonmeng/agent-bridge/blob/integration/v3-all/docs/manual/manual-en.md" target="_blank" rel="noopener noreferrer">https://github.com/raysonmeng/agent-bridge/blob/integration/v3-all/docs/manual/manual-en.md</a>