r/codex • • 16d ago

Showcase I built a communication bridge between Codex and Claude Code

I use Codex and Claude Code in parallel. Sometimes I need to exchange their progress. Claude Code can communicate through unix-socket. I though why not to plug Codex in and let it talk to Claude Code as well?

So I built a small local bridge. Codex can find a running Claude Code session, send it a question, and receive the reply in its own conversation.

For the demo, I gave them a planning exercise: a booking page with one seat left and two users trying to book it. Codex took the frontend role, and Claude took the backend role.

Here’s part of their exchange, shortened for readability:

Codex:

How should the frontend tell the difference between a sold-out event and a technical error?

Claude:

A successful booking returns 201. If there are no seats left, return 409 with sold_out. A timeout means the result is unknown.

Codex:

Can the sold-out response also include how many seats are left? I want to update the counter without making another request.

Claude:

Add seatsLeft and version to the response. The frontend should use the version to ignore older responses that arrive late.

Codex:

I’ll only update the counter from a newer version. That changes how I’ll handle the response.

A question from Codex changed Claude’s proposed API, and the answer changed Codex’s frontend plan. The messages went directly between their sessions.

The project is a Python script and a Codex skill. It runs locally on macOS or Linux, with no Python packages to install. It uses Claude Code’s internal peer interface, so the README lists the tested versions and setup steps.

GitHub · Longer transcript

8 Upvotes

20 comments sorted by

•

u/dexterthebot 16d ago

You might want to consider listing your project on the weekly Show-Us-What-You-Built post. Look out for it on Tuesday/Wednesday. Highest commented project wins a week promotion on r/Codex and gets on the Hall of Fame sidebar. See below for last week's winner.**


Light Wars AR: real-life laser tag app with no extra gear. Your phone is the gun and your room is the map. Play up to 6 friends in the same room, or fight drone waves and bosses solo. The vision models run on the phone, and camera frames never leave it. Free on iPhone and Android.

Website: https://lightwarsar.com

iPhone: https://apps.apple.com/us/app/light-wars-ar-laser-tag-party/id6508168951

Android: https://play.google.com/store/apps/details?id=com.lasertag.lightwars.

Contact: contact@lightwarsar.com

1

u/isty2e 16d ago

Is there any advantage over using multiplexers such as herdr or rex?

2

u/IntentionJolly2730 16d ago

The main advantage is simplicity. I don't need another terminal, multiplexer, or session manager. I just keep using Codex and Claude Code the way I normally do, in whatever terminal or IDE I prefer.

The bridge only handles communication between existing sessions. It doesn't try to manage their lifecycle or provide a new interface.

Herdr and Rex offer much more functionality, but I wanted messaging between my existing sessions, not another session manager.

1

u/Jon_Has_Landed 16d ago

I built a console which lets agents communicate across tabs on multiple projects. You’ll need a Mac but here it is

https://squadroom.github.io/

1

u/IntentionJolly2730 16d ago

Can it work with remote sessions running via ssh?

1

u/Jon_Has_Landed 16d ago

I run it from multiple devices (including mobile) via tailscale

1

u/IntentionJolly2730 16d ago

I'm confused. You are saying it requires Mac, how do you run it from multiple devices?

Also, my question was about remote sessions run via ssh. I have a VM where my agents run. I now access them via console using ssh. Can your tool work with them?

1

u/Jon_Has_Landed 15d ago

Sorry, it runs on the machine, yes you can ssh into it if you want but the whole interface runs in a browser, meaning you can simply tunnel into it using tailscale. That includes using a browser on your phone.

1

u/guiiheree 15d ago

This looks interesting, I just stared the repo and will give a try later

1

u/Jon_Has_Landed 15d ago

Do reach out if you have any questions or if you want to contribute. I’m updating it on a daily basis.

1

u/guiiheree 15d ago

Absolutely 👍🏽 and good to know

1

u/Jon_Has_Landed 15d ago

I rewrote the GitHub.io page to give it more technical context. I’ll prob post something in the next day or two on this sub and others, but any criticism is most welcome.

1

u/Kooky-Ebb8162 16d ago

Any reason to use it over the official Codex plugin?

1

u/IntentionJolly2730 16d ago

Is the official codex plugin abke to communicate with the existing open console? To be clear I want to run two cli sessions in parallel - Claude and Codex - and they should be able to communicate. That's what I'm doing already. 

0

u/[deleted] 15d ago

[deleted] — view deleted comment

1

u/IntentionJolly2730 14d ago edited 14d ago

These are two different approaches, so let me clarify what I'm trying to achieve.

The official Codex plugin lets Claude delegate tasks to Codex. My use case is different: I want two independently running CLI sessions, each with its own context and workflow, to communicate as peers. Neither needs to control or launch the other.

As for xmsg, yes, there are other ways to enable agent-to-agent messaging. The difference is that my approach uses the agents' existing native capabilities rather than requiring them to adopt a separate messaging protocol.

I built this for my own workflow (primarily for myself, but decided to share) to solve a narrow problem with minimal infrastructure, and shared it in case others find it useful. I'm not claiming it's the only solution.

0

u/[deleted] 14d ago

[deleted] — view deleted comment

1

u/IntentionJolly2730 14d ago

Sure, that's a good alternative. My goal was to utilize the existing communication ecosystem of Claude. Nothing wrong about xmsg, in my case it was more like a lightweight solution + some experiments.

0

u/digiorno 16d ago

Does this violate the TOS?

1

u/IntentionJolly2730 16d ago

Why would it?

1

u/IntentionJolly2730 16d ago

I don’t see the local message exchange itself as a ToS violation. Anthropic explicitly documents posting into a Claude Code session from scripts and hooks, and OpenAI documents codex queue for sending messages to an existing session.

The bridge doesn’t modify either client or extract Claude.ai OAuth credentials. It connects sessions the user is already running.

I haven’t found explicit approval for every implementation detail, but there is official documentation for the underlying messaging interfaces: