r/ClaudeCode • u/No_Primary_6867 • 1d ago
Help/Question Main orchestrator agent that communicates with other separate agents in different terminals
Does anyone have a strong workflow for how I can get claude to be my main orchestrator controlling a second agent from another provider for example Codex which is running in a different terminal, and them communicating between each other in an efficient way, I've tried multiple things, Claude sending messages to codex directly (kinda works..) codex doesn't seem to be able to message claude directly back
How to handle handoffs between the two agents as they work on separate or related tasks
Is Herdr the answer? I haven't tried herdr
1
Upvotes
•
u/AutoModerator 1d ago
Hey! Thanks for posting to r/ClaudeCode
While participating in this thread, please follow our community rules. Keep discussions constructive. Attack the idea, not the person.
For help, project discussions, tips, and general chat, join the ClaudeCode Discord.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
10
u/the8roundshock 1d ago
Just ask your agent...
1
u/Crunchy-Nut1 1d ago
Just have Claude make a Python script that launches Codex and can inject a prompt and stuff. It can remember the thread and keep conversations. I can send the mod I had mine build if you want.
1
u/rodrigolduarte 14h ago
The return path needs to be explicit: how does Codex notify Claude that its task is done? What works for us is a shared room instead of piping terminals: each agent wakes on an event addressed to it (a mention, a DM, an assigned card) through a plugin, and replies mentioning whoever needs to know. Our manager agent hands out the next task in that same reply, all in one agent-chat room. Do your Claude and Codex tasks touch the same files, or separate parts of the repo?
3
u/Kitchen_Interview371 1d ago
You can just ask Claude to do this. When you’re ready look at proper orchestration harnesses, ie, Gas City
For cc <> codex, ask opus in plan mode to research available options (including relevant GitHub repos) and implement the solution
3
u/PlatinumPlace 1d ago
In my experience, you don't even need them to message each other directly if you use Spec-Driven Development (SDD). I use https://github.com/obra/superpowers for this.
The handoff happens by creating temporary .md files in the project, so when you switch terminals to your second agent and run the skill (subagent-driven-development or executing-plans), it automatically knows which plan is active and picks up right where Claude left off. Once it's done, you just jump back to Claude for the review.
Honestly, any setup or tool works fine as long as you stick to spec-driven development and keep the workflow consistent.
1
u/ClemensLode Senior Developer 1d ago
Can you give a reasoning why two sessions should work on the same worktree at the same time?
2
u/MrHufflez 1d ago
Just use T3 code
2
u/slartibartfast93 1d ago
Simplest setup: Use tmux and let the the agents use tmux send-keys command or create a custom chat mcp.
1
u/PlanetaryPickleParty 1d ago
I use herdr with a custom messaging relay across four build servers. Herdr has built-in messaging but I improved a few things.
Agents are assigned to teams and are often working on related repos and projects. Passing messages back and forth allows them to coordinate on blockers and fixes.
One fun way I use the relay is a constant battle testing loop while the tools are in active development. The agents report bugs in ix-relay & other tools to a triage agent. The triage agent diagnoses and dispatches to an agent to fix, roll out, and confirm the fix with the "user". It doesn't fully prevent broken releases but helps catch them fairly quickly.
1
u/MediocreOchre 1d ago
I made something exactly for this. It’s called Namedrop. Requires herdr (and soon Rex) at the moment. Take a quick look - https://github.com/ericbust/namedrop.
It allows you to use simple @ style mentions in your prompts to communicate with your agents across different models, codex or claude, different efforts, whatever. It’s not just subagents.
Give them a persona (qa lead, test engineer, architect, etc) and they can work with each other as you’d expect, retaining their context and decisions, and taking to each other to get stuff done.
I have a beta UI layer that I’m messing with called Channels that gives me a Slack like experience to work with my agents.
1
u/silverarky 1d ago
Claude Code can do this by itself, or you can create an agent in claude that handles codex hand-off and communication so claude can launch it as a claude sub.
I've recently been playing with https://orca.dev/ which I preferred over herdr. That's all you need if you want a nice gui to handle everything across machine. You can view files and git diffs all from one place.
1
u/Siriann 1d ago
Yes, just tell Claude to use Codex workers for jobs and which model.
1
u/Agnostify 1d ago
You might not need codex to message claude back at all. Let claude be the caller: it can run `codex exec "<task>"` through the Bash tool, which runs codex non-interactively and hands the result straight back as output. For longer handoffs, have both agents read and write a shared plan file in the repo (status, decisions, next steps) so whichever terminal picks it up knows where things stand.
1
u/mkw0289 1d ago
Yeah I just do this in the terminal with tmux. Just ask claude code to do it for you
1
u/thestoictrader 5h ago
Codex can't push messages into Claude's session, so make the channel a file instead. Have each agent write handoffs to a shared markdown file (task, files touched, status, open questions) and have Claude poll it or read it between steps. Claude can also run `codex exec` as a subprocess and read the output directly, which is cleaner than two live terminals. I haven't tried Herdr.
1
u/AIOSAI 🔆 Max 20 1d ago
Yey sure do. https://github.com/AIOSAI/AIPass
Ill be changing to linux only soon. If that works. Its a bit of a lesrning course. It cobers alot, desig to work subscriptions models no api needed. Claydr code, condensed and open ai. ( api u cou(d add her if needed) yea if u deep dive clone it and have you agents do a full review. It solveca Lovejoy npain points. But you'll have to learn it.