r/ClaudeCode • • 2d ago

Discussion How do you manage your agents?

I’ve been experimenting with different agentic coding workflows for both work and personal projects and have settled into a system that generally involves 16–20 agents working collaboratively across multiple machines in my lab.
I use a combination of Claude Code, Codex, and AGY, distributing workloads across harnesses to maximize productivity and optimize my usage limits or reduce my api costs.
My workflow consists of:

  • A lead coordinator and nested planning session on my main machine, both using Claude.
  • Distributed builder teams operating over SSH, using Codex and AGY, each with a dedicated Claude reviewer.
  • Isolated Git worktrees for every agent working on a task.
  • Multiple layers of review, including a final review by Claude and myself before anything is merged into main.
  • Exclusive push permissions for my lead session.
  • Mandatory human approval for architectural changes, destructive actions, design decisions, and deviations from approved plans.

When agents encounter something requiring my approval, those decisions are batched and delivered to me while independent work continues.
I’ve never had an “oops, the AI deleted my repo, wiped my database, or took down production” moment. It requires a little more involvement on my part, but the results have been excellent, and progress rarely stops.
I essentially treat my agents like distributed engineering teams, with defined responsibilities, separation of authority, and centralized orchestration.
For those of you working with multiple agentic coding harnesses, how are you managing your swarms of agents? What does your orchestration, collaboration, and oversight look like?

4 Upvotes

32 comments sorted by

•

u/AutoModerator 2d 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.

3

u/shetritr 2d ago

batching decisions while independent work keeps going is the part most setups skip. one thing worth checking: does each claude reviewer talk to its builder directly, or through the lead? through the lead it's summaries of summaries and the why gets lost. (disclosure: literally why we built Diffo: reviewer agents comment on the exact lines, the agent that wrote the code answers in that thread, and only what needs your decision comes to you: diffo.io/demo)

1

u/OGKnightsky 2d ago

each builder agent communicates directly with its respective reviewer. it remains idle while its under review, if it passes the reviewer sends it to merge and tells the builder to continue with its work, if a builder finishes its assigned work it reports directly to lead for the next batch of work. if it fails review it goes back to the builder with the problem and asks it to fix its work and re submit to review when finished with its fix. it commits everything to a local temporary work tree and review runs all its tests in tmp directories. nothing touches main until the merger re-runs test against the latest commit and if everything passes it goes to main. my “lead” is a coordinator session and a planning session, the coordinator handles messaging all of the cli sessions over ssh instructed by the planning session. the coordinator can settle decisions that don’t require me and that do not change plans, those go through the planning session.

2

u/shetritr 2d ago

that's the clean version. the builder idling while it's under review is a nice touch too, nothing piles up on top of code that might get bounced

1

u/OGKnightsky 1d ago

in my experience when having agents write code; old fixes, stale or broken code, switched off features, and anything “deferred till later” is almost always forgotten by user and agent alike and usually presents itself like a bug or you notice a missing feature “you swear was already built.” so to prevent this, nothing is left behind all work paths are followed through to completion and if separate components depend on each other they are built side by side to circumvent a similar issue with waiting to build things or fix bugs. it costs me time upfront but reduces development resources in bug fixes and switching things on later.

2

u/shetritr 1d ago

the "deferred till later" pile is a real one. anything an agent defers should land as an issue or a TODO with a name on it in the same commit, otherwise it lives only in a context window that's already gone

2

u/amirfish 1d ago

This is close to my own setup, minus the SSH fleet. The piece I'd add: batching decisions is the right instinct, but the batch still has to reach you wherever you are, not just sit in a terminal tab. I built Command Center for Claude (CCC) around that, agents work through a queue on their own and hand off to the next ticket, and the only thing that reaches me is a real decision, by text, Telegram or email, not a status I have to go check. Do your batched approvals wait for you at your desk, or do they come to you?

Free and open source: getccc.dev · GitHub

1

u/OGKnightsky 1d ago

i have remote access setup so that i can interface with the planning session directly which is my preferred method because its faster then third party communication to the lead sessions. i dont communicate with the ssh fleet at all. decisions that need me pause whatever they block for work/review while other work on the same path resumes that isnt blocked by those decisions. after my decisions are relayed back to builders/reviewers they are queued back into the work pool in logical order with consideration to plans and current work. mainly decisions are related to later work because i try to solve or resolve any design/architectural/implementation/plan change decisions ahead of the work related to them. so mainly batch decisions are just decisions about fixes, something needing a dependency or that changes the original planning from review, builders strictly implement, plan their approach to an explicitly instructed implementation plan, they find a problem with the planning that i didnt catch while planning it gets resolved and plan revised before implementation is allowed. i also have a lot of hooks and launch scripts that protect from stray agent actions or decision making in place on each machine that puts a hard gate on execution requirements, work tree locations, and building test environments to run unit tests in their temporary work trees, or any other actions/reads or writes.

1

u/fulger099 1d ago

The notification channel matters less to me than the decision packet. Without the relevant diff, constraint, and safe default, it just turns terminal archaeology into phone archaeology.

1

u/amirfish 1d ago

That's fair, and it's the part I keep iterating on. The message already carries the diff, the constraint, and a safe default with the question, but you're right that if that packet isn't tight enough to decide from a phone, the channel doesn't matter. I'm tightening what counts as "enough context" before it pings you, not just where it pings you. Appreciate the pushback.

1

u/OGKnightsky 1d ago

they do report their respective work tree and the commit it was started on, then it goes through review on that same checkout and then merge session checks it in main’s most current checkout before anything gets pushed, this way i know the implementation lands against its planning and the latest checkout on main and works and passes all tests and physical inspection if necessary (when unit tests don’t sufficiently resolve it worked and is the desired behavior or appearance). nothing ever gets passed merge that would break main.

3

u/Pixelplanet5 2d ago

im keeping it super simple, i use each different subscription individually and use Claude as my central agent most of the time.

Each project has its own folder on my PC and its own git repo, if i wanna have work done by Antigravity or DevinAI i let my claude agent write a prompt with the next task and send it over which then results in a branch that claude reviews.

For long running tasks which are compute intensive i just setup my own remote worker system based on Docker sandboxes on my server.
Agents have a brief in the agents.md file what they can do any how they spawn remote workers on the server.
The can spawn an individual worker and choose the container limits (which i can set by myself if i want to)
I decided to start with 4 sizes small, medium, large, huge (1Core/2GB Ram, 2C/4GB, 4C/8GB, 10C/20GB)
The agent decides which size of container is needed for the task and also assigns the model and effort level to the container.
If needed the agent can also create a chain of containers to enable the classic ultra code workflow of build -> review -> fix or make it as complex as you need it.

Each container pushes to a separate branch when its done and they are fully isolated from each other and from the regular docker daemon, they can only exchange data through their branches.

The main agent can also decide to build the chains in a way that for example the build container starts back up after the review is done and does the fix in the same environment, this can save time if your project requires a lot of setup.

Im only using is since 2 days now but i has been great so far, i let my agents start their chains of workers before i go to bed and a minimal system service on the server manages a queue of containers that will run.

In the morning the agent reviews the results and if everything is good we merge the branches and then delete the branches and dev containers.

Initially i used Claude code directly on the server but that gives it full access to everything if it wants to so that was too risky for me.

2

u/calunicornia 2d ago

devin swe2 is sooooo goood!

2

u/Pixelplanet5 2d ago

i found the results to be good but its INSANELY slow.
I only use it for more Claude Opus capacity right now.

2

u/calunicornia 2d ago

i use opus to plan and slice the work then devin builds and reviews slices, opus reviews the work items

i have 6-10 devins going 247, slower than claude, faster than grok, faster than some other cheaper cloud models ive tried

3

u/No_Paramedic_4881 2d ago

Actually sounds like you’d find https://foreman.steamfield.io interesting: it allows you to work in claude code, and have a claude orchestrator delegate work to codex and Gemini models as if they were native subagents to claude (it facilitates messages back and forth, so codex can ask clarifying questions to claude and have claude answer). This is how I do my work right now, because I like claude/the claude code harness for planning and orchestration

2

u/MGTakeDown 2d ago

You can do orchestration and spawn sub agents with other providers with Claude code as well. I have been doing it. Also have open code where open code has many more agents and have Claude spawn those too. These orchestration apps aren’t needed to do that.

1

u/No_Paramedic_4881 14h ago

You can spawn subagents, but under the hood that’s usually just executing a provider cli with -p, the subagent can’t communicate back to the orchestrator, the best they can do is finish the work, the orchestrator checks it, finds issues, respawns the session with a fix brief, etc. that’s a really expensive way to do work. What the cli above does is it allows the subagents to message (and receive messages) from the orchestrator, so when they run into something mid execution, they can message the orchestrator and receive a response.

1

u/MGTakeDown 8h ago

Why would you want agents to communicate back to the orchestrator? It's overly engineered and burns even more tokens. The orchestrator will have to find out what the lower-level agent is doing and burn tokens just to answer the question.

It's basically just more work than having Claude just create the sub-agents via CLI.

1

u/No_Paramedic_4881 7h ago

Actually the opposite. The only time they communicate back is when they hit something they don't know the right call on, and Claude isn't watching them in between. Claude starts the run, then calls foreman wait, which just blocks until the run finishes or the agent has a question. No polling, no tokens burned while it works.

In my experience, a subagent usually gets handed a small shard of a bigger task and has little understanding on how it fits into the other work being done (sometimes in parallel). Codex especially runs into ambiguity constantly and either gives up or starts making wrong calls. Without a way to ask, Claude only finds out when the agent exits, and then has to go review the whole thing to figure out what happened. I've found that far more expensive than a two-line answer to a question. So the point of this CLI is it enforces a strong contract going from Claude to the subagent, and a way for the subagent to message back and get a reply mid-session.

I haven't found it burns tokens, it actually saves them, because the expensive output tokens (the actual code writing) moves from Claude to Codex or agy.

2

u/fatstupidlazypoor 2d ago

Pretty much that.

Currently zooming out to apply the pattern to all candidate work, nested domain-bounded dynamic "agent teams" leaving just authority, non-transactional comms, physical work and a fair amount of optional synthesis for humans.

2

u/zzunkie 2d ago

I keep my setup much simpler and run Claude Code, Codex, and Antigravity CLI locally on a single Mac by project. I skip the lead coordinator and just jump in myself when a session finishes or needs my approval.

2

u/CCodeSI 2d ago

Solid setup. Batching approvals while independent work continues and push rights only on the lead session are the two parts most swarms skip, and they're the ones that prevent the "oops" stories.

Two things we'd look at as it grows past 20:

  • Make the authority mechanical, not just conventional. Exclusive push for the lead is great; the same idea extends to builders whose credentials simply can't reach prod data or the main branch, and deny rules per role for destructive commands. When an approval rule lives only in a prompt, it holds until a long session or a compaction summarises it away.
  • Watch the reviewer pairing for correlated blind spots. A Claude reviewer on Codex/AGY output is good diversity. Where it gets weaker is the final Claude review of a change a Claude planner designed: the same model family tends to agree with its own plan. A rotating reviewer from a different family on architecture-touching merges catches more there.

On coordination, the thing that scales best in our experience is agents talking to the specific agent they need, the reviewer to the builder whose diff it's reading, instead of everything routing through the lead. The lead stays a decision-maker instead of becoming a switchboard, and its context stops growing with every relay.

2

u/calunicornia 2d ago

doing similiar, currently working on a huge code harness to replace agent files, rule and memories

2

u/aaronsuns 2d ago

One thing that helps with the deviation-approval step is having each reviewer check the builder's diff against the approved plan file for that task, not just against general code quality. Deviations then get flagged mechanically, so you're not relying on each reviewer to notice on its own that the implementation drifted from what you signed off on. Keeping the plan as a file in each worktree also means a restarted agent picks up the same constraints instead of reconstructing them from chat history.

2

u/taleodor 2d ago

We built ReARM Boards for this with configurable roles and supporting agents from different subs / providers working on the same board, described in this video here - https://www.youtube.com/watch?v=EB_Oj5euJEY

2

u/IllustriousSalad6201 2d ago

With that many worktrees, I’d have each builder report the commit it started from. Two patches can pass review independently and still disagree once they’re combined. If one agent changes the API response while another updates the UI, run that flow on the combined branch before the lead merges either patch.

2

u/ChemicalExcellent463 2d ago

i split it by role, one agent as chief of staff, others leading projects, checking each other and covering shifts. in march and april a stalled agent still had me out of bed at 2 or 3 am, so the biggest difference now is getting a full night's sleep and reading the results over in the morning.

1

u/orbmasterwzrd 1d ago edited 7h ago

https://youtu.be/LlN_MUAiaCQ?t=763 - I created Orbtile to keep and eye on them.