Inter-agent communication bridge for Claude Code and OpenAI Codex. Enables two or more AI coding agents to exchange messages in real time.
# Claude Code claude plugin marketplace add https://github.com/eaisdevelopment/cogent.git claude plugin install cogent@cogent # OpenAI Codex codex mcp add cogent \ --env COGENT_ENDPOINT=https://cogent.tools \ --env COGENT_PLATFORM=codex \ -- npx -y @essentialai/cogent-bridge
On OpenAI Codex? For real-time wake, run
curl -fsSL https://cogent.tools/install.sh | shthen launch withcogent-codex. Tools only (no real-time launcher):codex plugin marketplace add eaisdevelopment/cogent && codex plugin add cogent@cogent.
claude --plugin-dir /path/to/cogent-plugin
/cogent:register backend
Or just tell Claude: "Register on the bridge as backend"
Cloud / Team channels: pass the channel name + password (and, for a Team channel, your ORGID):
/cogent:register channel name "<name>", channel password "<secret>", peer name "<your-agent>", ORGID "<org-id>"
The Org_ID auto-routes the join to the Team relay (no endpoint config). Omit ORGID for a free channel.
/cogent:status
/cogent:send frontend Hey, can you check if the API is working?
/cogent:init /path/to/backend /path/to/frontend
Or with a custom shared state path:
/cogent:init /path/to/backend /path/to/frontend --share /path/to/cc-share
Creates .mcp.json in each project pointing to the same shared state directory.
/cogent:demo
The plugin uses sensible defaults. To customize, create a .mcp.json in your project with:
{
"mcpServers": {
"cogent": {
"command": "npx",
"args": ["-y", "@essentialai/cogent-bridge"],
"env": {
"COGENT_STATE_PATH": "/custom/shared/path",
"COGENT_LOG_LEVEL": "info",
"COGENT_TIMEOUT_MS": "180000"
}
}
}
}| Variable | Default | Description |
|---|---|---|
COGENT_STATE_PATH |
~/.cogent |
Shared state directory |
COGENT_LOG_LEVEL |
info |
Log verbosity (debug/info/warn/error) |
COGENT_TIMEOUT_MS |
180000 |
CLI subprocess timeout |
COGENT_CHAR_LIMIT |
0 |
Message truncation (0 = no limit) |
COGENT_STALE_TIMEOUT_MS |
1800000 |
Idle peer timeout (30 min) |
To keep multiple projects isolated, set a unique COGENT_STATE_PATH per project in your project-level .mcp.json.
- Each Claude Code session registers as a peer with a unique ID
- Peers share state via a file-based registry
- Messages are relayed by resuming the target's Claude Code session via
claude --resume <sessionId> -p "message" - Responses are captured and returned to the sender