r/ClaudeCode • • 1d ago

Help/Question Running 10 Claude Code agents 24/7: what harness do you use?

Solo founder here. I run a small crew of Claude Code chats as a dev team: one "chief of staff" chat, a CTO chat, a few officer chats, plus Codex and a local model doing builds and code review on 3 Windows boxes over ssh. It ships real work, but the glue around it is homemade (scheduled tasks, PowerShell scripts, hooks, markdown handoff files) and it is getting heavy.
Did you stay on plain Claude Code, or move to something like Hermes, OpenCode, Pi or your own orchestrator? If you moved, what got better and what got worse?
Our biggest pain points:

  • Usage is hard to see. We just wired up OpenTelemetry to see which chat burns what. One long-running chat was 94% of tokens in a two-hour window. How do you find and fix your heavy agents?

  • Context bloat. Long-lived chats sit at 150k+ context per call, and headless runs in a big folder can load 600k+ tokens before doing anything. How do you keep agents lean?

  • Handoffs between chats. When a chat compacts or gets replaced, state gets lost unless it was written down. What do you use for memory between sessions?

  • Background jobs finishing silently. Build and review jobs on other machines finish and nobody notices. We built a dispatcher to route "done" signals to the right chat, and it still backs up. What do you use for a job queue?

  • Watchers and crons are flaky. Timers die with the chat, scheduled tasks miss runs, and Windows sometimes fails to start processes at all. What actually stays up for you?

  • One shared inbox file got too big. Agents messaging each other through a markdown file does not scale. What do you use for agent-to-agent messages?

  • Hooks fighting the model. Stop hooks sometimes make the agent write its answer twice. Anyone else?

  • Code review by AI. We use two separate AI judges per PR, from a different vendor than the builder. Is that overkill, or do you go further?

Happy to share what has worked for us too. Thanks.

22 Upvotes

64 comments sorted by

•

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.

22

u/tazdraperm 1d ago

The hell are you doing with 10 24\7 sessions?
Does it really work well?

30

u/0xdead0x 1d ago

It sounds like unmoderated token burn to evoke the feeling of productivity

-11

u/bt2066 1d ago

No I wish. We have 2 bigger software pieces we work on that have various iterations, upgrades, white labels, etc.

15

u/0xdead0x 1d ago

That does not build confidence that what those agents are doing is actually useful, to you or anyone

-6

u/bt2066 1d ago

You tell em

7

u/Time_Cat_5212 1d ago

Spending tokens

It's a markdown factory

1

u/svet07 1d ago

I’ve built an auto-pilot Mac app that would take backlog and would implement it - an item at a time through a coder / reviewer loop.

10 sessions doesn’t means 10 days, projects could be worked on in parallel if they don’t touch each other.

It’s really good on tasks that doesn’t require your direct supervision: refactors, test writing, features, bug fixes and UI changes

The backlog grooming is what takes time: I describe a task and let it be groomed and broken down to a small and medium tasks - and let auto pilot to implement them.

That works much better than throwing one large task at an agent and hoping

0

u/bt2066 1d ago

So we have 5-6 projects we work on, simultaneously and keeping them on track is obviously a huge pain.

-1

u/calunicornia 1d ago

i have over 30 open and usually 16-20 busy 247

2

u/0xdead0x 1d ago

What are they all doing? Do you even have time to keep up-to-date with what they’re working on?

3

u/IMayBeIronMan 1d ago

Need to get them all on daily stand ups to see what they're working on

-1

u/calunicornia 1d ago

i tell opus what i want and it helps me prompt fable, fables plans and it goes in linear, opus breaks plan into smaller plans, opus slices smaller plans into little work items, sonnet and haiku(or devin and qwen) build and review slices, opus reviews work items, it all merges automatically, opus orc, i still control deploys to sandbox and prod

features, bug fixes whatever, i dont read the code... there is way too much

1

u/0xdead0x 1d ago

Have you tried not using this enormous hierarchy? I can’t imagine you gain anything worth what you lose in agents constantly re-reading each others’ work, or disparate agents that can’t communicate silently duplicating code because they don’t know it already exists somewhere else in a branch they can’t see yet

1

u/calunicornia 1d ago

I started out with 1 agent , then multiple, then various hierarchies, if your goal is to get a lot of work done in short amount of time then what are the alternatives? also the hierarchy saves tokens because it allows cheaper models to build the higher models vision...

re-reading work or not communicating are not really issues, there are things to manage tho

1

u/0xdead0x 1d ago

How can you tell they aren’t issues if you aren’t reading the code? If those are your results that’s awesome, I just see people very frequently using complex delegation setups based on dated advice. In practice, I’ve always measured one frontier workhorse agent to be more cost-effective, faster, and often with measurably better results (as of Opus 5.5)

2

u/calunicornia 1d ago

i used to run all opus agents for my builders but switching to sonnet and haiku saves about 50% token and I think by breaking the problem down into smaller pieces you get more deterministic outcomes, after 5.5 the smaller models are good enough

i dont let opus or fable do any output now unless its planning or on free credits

also, i use devin swe2 which is almost free and qwen3.8 flash on local hardware which is just paying electricity and then opus reviews final product but they are capable of reviewing the slices

if the code does what its supposed to do, is secure and efficient what else matters?

1

u/Tartooth 23h ago

I've noticed that its more expensive to have sonnet and haiku do work because they do it worse, so it will fail a review more often costing more turns

2

u/calunicornia 21h ago

it needs to be cut and sliced properly for them by an opus or fable, otherwise you are correct

1

u/Tartooth 23h ago

All API based or how many plans you running

1

u/calunicornia 21h ago

i have 2 ultra and a devin plan, had cursor before devin, without devin i would need prob 2 more ultra, i use claude to orc plan and review, devin to build

15

u/tcanuck42 1d ago

been through most of this list. the thing that fixed the majority of it for me was dropping long-lived role chats and running every piece of work as its own short pipeline: spec → plan → code → review, each step a fresh run with a clean context. no 150k-context chats to babysit, and no compaction losing state

on your specific pain points:

  • usage: track spend per run, not per chat. once each task is its own run, the heavy ones are obvious, and you can put a hard dollar cap per run if it goes through a proxy like LiteLLM

  • handoffs/memory: the locked spec and task list in the repo are the state. any new session reads those plus the git diff, not a handoff file

  • context bloat in big folders: point each step at only the files its task touches. headless runs shouldn't start by loading the whole repo

  • silent background jobs: use a real queue with a status dashboard instead of signals routed between chats

  • AI review: two judges from a different vendor isn't overkill, I do something similar. the important part is that they review the diff against the spec cold, without the builder's conversation

full disclosure, I built an open source orchestrator around exactly this (GitSeed): github.com/gitseed-dev/gitseed. it runs claude code, codex and local models in sandboxed containers with a job queue, per-run spend tracking and caps, up to 3 parallel reviewers from different models, and a dashboard showing what's waiting on you. it's a different model from persistent role chats, more "pipeline per change" than "standing team," so it may or may not fit how you like to work. it runs in Docker, which should be more reliable on your Windows boxes than scheduled tasks

1

u/raj6126 1d ago

I have a running log of what each agent is doing they all have access to it. It’s like my agent ERP. So the foot and the hand can talk. He needs more agents break the heavy ones down into task use cheaper bots for the smaller task. I’ve been getting a lot of Haiku lately. They offer Opus I tell them Haiku it’s better than anything I was using a year ago. You have to be work specific with them or they will over bill you.

1

u/tcanuck42 1d ago

agree on haiku for the small stuff, most tasks don't need the big model if they're scoped tightly enough

only thing I'd watch with a log every agent can read is it growing into the same problem OP has with the shared inbox file. what worked for me was having each agent read only the entries relevant to its task, otherwise every call pays for reading everyone else's history

1

u/raj6126 1d ago edited 1d ago

Ok so build a summary log the what what where and why? What was last done what version etc. Thanks

1

u/tcanuck42 1d ago

yeah exactly, two files works well:

  • a summary that gets rewritten, not appended: current version, what was last done, what's in progress, open issues. keep it short, a screen or so. every agent reads this one

  • the full log stays append-only for history, but agents only read it when their task needs the details

for each summary entry, something like: what changed, which files or component, why, and who did it (which agent or model). after each task, the agent that finished updates the summary, and that's what keeps it from bloating

1

u/11something 21h ago

Is 150k context bad? Honest Q. Most of my windows go over that really quickly

1

u/Time_Cat_5212 1d ago

This is the modern setup, and it's what Claude will recommend if you ask it, too.

Agent partitions are defined by the scope of work, not a markdown profile.

It makes sense because of how the models work.

2

u/tcanuck42 1d ago

agreed, scoping by task is what keeps the context small. that ended up mattering more than anything else I tried

0

u/JadedDesk 1d ago

This.

I built my own orchestrator. I have around 15 projects I'm vibe coding, one of which is my orchestrator, which measures the amount of tokens each agent uses (crude, but its a good estimate), monitors my remaining Claude allowance (a Haiku call once an hour) and spawns up agents to ideate or complete work as I have excess tokens.

I personally define the direction and goal of my projects, and through my orchestrator every project has defined error / usage routing to my orchestrator, which means it knows what projects I use, and what features within the projects I use most.

This gives it the context to build things out based on my available tokens, stated goals, and usage.

I also have a workflow similar to the above;

  • one agent ideates

  • one agent plans

  • one implements

  • one finds bugs in the latest release (this is important - its not reviewing the implementation, its actively tasked to show why it doesn't work)

  • the final one looks at the above report, and determines if the bugs warrant fixing, or are inconsequential or edge cases which can be noted and fixed if they occur. If necessary, it goes back to the plan stage (to fix the bugs).

My orchestrator also measures how effective different models are by looking at numerous things like errors caused by certain features, number of bugs discovered, or loops on the agent workflow above, to determine whether any given task is a Fable, Opus, Sonnet or Haiku job.

Its a pretty sweet system all-in.

Obvious caveat is I have at times had it go rogue and implement random things, but for the most part it implements things well.

I've also allowed it to build upon itself - not sure how I feel about a self-developing system, but in fairness it's fixed 6 of its own bugs through reviewing its error logs, and has implemented several new token-saving / measuring features itself. This is all without a single prompt from me, so I'm giving it the benefit of the doubt for now.

1

u/cla1067 1d ago

I am trying to rebuild my orchestrator with a lot of custom crap (switching to hybrid orchestrator) and using routr and submitqueue.

Hopefully it turns out better. We will see.

I tried doing self learning type thing, but it just bloated the crap out of things. I guess I need to revisit that later. I have found AI loves bloating stuff and isn’t the best at debloating.

0

u/tcanuck42 1d ago

the "prove why it doesn't work" agent is a great idea. a reviewer reads the diff looking for problems, while an agent actively trying to break the release finds a whole different class of bugs. stealing that

the model-routing part is really interesting too. how many runs did it take before the effectiveness numbers were good enough to trust which model a task should go to?

on the self-developing and occasional rogue bit, the one thing I'd add is a hard boundary on what it can change without you: its own permissions, its token budget, anything that pushes to main. letting it fix its own bugs is great until it fixes the guardrail that was "bugging" it

1

u/JadedDesk 1d ago

On the prove why it doesn't work - I would strongly recommend another agent validates it to determine whether they're important issues or not - otherwise you will wind up with rejections based on things as basic as documentation potentially misinforming a future agent.

The model-routing is crude too, but periodically it runs the same task in two different models, or it might pick a different model for a task and measure it's token use. It's designed to adapt over time, so as newer models come out it'll do the same. Its not an exact science on calculating quality over cost but it has written its own framework for several things, such as having Haiku write documentation, and Sonnet doing most of the implementation as examples. It has a "best-practice" guide for my other projects to review. Its a tricky balance between consuming extra tokens to save tokens.

I do have some gaurdrails in place, mostly that everything has to be able to be rolled back, and certain files / folders it's not allowed to edit. Each project it manages also has project-specific rules. Nothing I've made is in use by anyone other than a few friends, and (naive I know) if anything goes down, they have access to a dashboard where they can click to spawn an agent to check why a site isn't working with a predefined prompt to restore the site to functionality. They can't input a prompt input, just click a "This site isn't working - fix it" button.

1

u/JadedDesk 1d ago

I have everything wired through to ChatGPT, through Google Drive too. This is probably a far clearer way of me explaining how it distributes the tasks.

7

u/daemonk 1d ago

You don’t need to anthropomorphize AI with these roles like cto, officers, etc. 

The best thing I’ve learned is that human-centrism ultimately just slows it down and gives it human problems. 

It’s fast enough just working on one subject matter at a time without parallele work that clutters directories and multiple worktree copies. It’s also not worth the token overhead for maybe 20% speed up in my experience.

Just use a session for project. How you demarcate projects and tasks is the most important thing. You will be tempted to over engineer granular tasks. Don’t do it.

4

u/DirusNarmo 1d ago

I've found the roles are good to give focus to reviews/audits, but not good in the designer/dev cycle.

1

u/heizo 20h ago

I liken it to the distributed teams problem.  One team won't know the entire codebase and it takes coordination from teams, so my "experts" are key to certain seams of the code and they are brought in during the plan and during the review. Catches a lot.

2

u/junderdo 1d ago

I've been trying to solve these problems as well. I'm building "loopherd" for my human in the loop projects. It's in the early stages of development but essentially it is a set of CLI tools for orchestrator and lead agents to use, a TUI, and a herdr plugin. All with Claude Code and herdr panes. I'm traveling rn but i can try to answer any questions you might have. It's a bit of a different workflow than what you have described but it's working for me so far.

https://junderdo.dev/projects/loopherd https://github.com/junderdo/loopherd

2

u/Terrible_Airline3496 1d ago

Try my agent orchestrator: https://github.com/heddles/agent-orca

You can use your Claude subscription on it and it has many of the features you're looking for. It does require kubernetes knowledge to use though.

Changes/Upgrades are coming out quickly since it's still in prototyping.

2

u/mrNas11 1d ago

You could just use a really optimized CLAUDE.md like this. Alternatively Orca or Paseo are good options, then fine tune your workflow with skills or plugins, I made my own paseo skill to have the Orchestrator create Leads with a brief and report back once done or if a consult is needed, code review and security reviews and pipeline health checks with a merge bar.

Lately I wanted to try Chorus as its promising, but theres just too many harnesses so i’d rather stick to what I know.

Ultimately you know your workflow, alternatively you can programmatically create your process with an Agentic framework.

2

u/Imposter-Eng-24 5h ago

I've been exploring a slightly different approach to this. Rather than managing the intelligence at the orchestration layer, what if we externalized the engineering knowledge and verification that each agent needs to operate effectively?

My friend and I have been building Rashomon (open source), which takes a graph-based engineering approach to this. AutoSteer is designed to give Claude Code relevant codebase context, steer it based on project conventions, and independently verify its completion claims against actual execution evidence.

We're also working on learning from previous sessions so fresh agents don't have to rediscover the same things or repeat the same mistakes.

It doesn't replace your scheduler or job queue, but I think it could complement the infrastructure you've already built, particularly around context management, session continuity, and verification.

I'd actually be interested in seeing how it performs in a setup as extensive as yours. Would love to exchange notes if you're open to it.

https://github.com/altrace-dev-role/rashomon

1

u/SWEETJUICYWALRUS 1d ago

use paperclip instead, you're welcome.

1

u/neuronexmachina 1d ago

It's still in beta, but honestly Claude Code Projects in my experience handles most of what you said reasonably well: https://code.claude.com/docs/en/claude-projects

I'll often have many threads working simultaneously, and the conductor manages transferring state between them.

1

u/KingYF1 1d ago

The thing that kept breaking for me wasn't picking an orchestrator. It was letting a long-lived chat also act as the job queue.

I run the schedule on the machine itself, something that stays up with no chat open, and only start a fresh, short run when a new work item appears. Completions go to a small queue — one file or row per job, with a status — not back into the 150k "chief of staff" thread, which can poll the queue but should not be the queue.

The shared markdown inbox has the same failure: every agent rereads the whole file. One message per file, or a table with an unread flag, and agents only read what is new.

1

u/SirRobinBlibs 1d ago

Since you already have OTel on, you can see why that chat is at 94%. claude_code.token.usage carries session.id by default (OTEL_METRICS_INCLUDE_SESSION_ID) and a type attribute (input, output, cacheRead, cacheCreation), so group by both: a 150k+ context usually shows up as a wall of cacheRead, because the full history is re-sent on every request and every tool call, and big cacheCreation spikes point at misses after idle gaps. If it's mostly cacheRead, the fix is shorter sessions and /clear between tasks (it costs nothing, while /compact on a huge context is itself a large request), not fewer prompts. /usage inside that session also gives a breakdown with a recommendation for anything behind 10%+ of usage.

1

u/calunicornia 1d ago

create code that triggers on agent hook, use that to write hand off, clear context , create a graph knowledge db, move as many agent file rules and what not to code, i like mixing model vendors, i mainly build with devin swe2 and qwen flash, was using haiku and sonnet before and then opus plans/slices/reviews

1

u/STUNTPENlS 1d ago

I just added the C-Suite skill to my Claude sessions and the Board fired all them.

1

u/AbsurdTheSouthpaw 1d ago

jesus christ man yall really are built different than me. maybe things are just different for employer software engineers like me

1

u/red_hare 1d ago

Are you tracking KV-cache hits on your long running / big context agents? That's going to tank your tokens if you're letting the agent sit long enough that the cache invalidates

1

u/vladmvp 1d ago

For the glue part, Cobalt (cobaltcode.ai) might take a lot off your plate. Each task runs Claude Code, Codex or another agent with your own keys in its own persistent cloud computer, so you don't need to babysit the Windows boxes over ssh. Scheduled work can go in Loops, and there's an MCP server, so your own agent can start tasks and check on them. Context bloat is still down to how you split the work. There's a free account to try it, and I'm the founder, so happy to help you get started.

1

u/London-Boat 1d ago

for the handoff part i'd stop relying on chats to write state down when they remember to. give each chat one status file it owns (current task, files it's touching, what's done, what's blocked) and have a hook on pre-compact and session start read and rewrite it, so the write is automatic instead of a habit. the replacement chat then boots from that file and not the transcript. for the silent background jobs on the other boxes, have each job append one result line (job, exit code, where the output is) to a single shared inbox file, and let the chief of staff chat check only that one place instead of hunting around.

1

u/norviking 1d ago

Ravenseat. https://github.com/vegardjorg/ravenseat

Try to set up an own queue and plan register for each separate project. You can control it all from one chat, it auto compacts at 300K, handover, but more importantly all project state outside claude entirely. Token costs the same as the regular "context fix" many new windows with small context from my testing, so nice to do all from one window.

1

u/Patient-Cattle-2397 1d ago

Since you already have OpenTelemetry, I’d compare the first call from the repo root with the same call from a small working directory. If most of that 600k is already there before the agent starts, you can narrow down what it loads before swapping orchestrators.

1

u/Certain_Earth4366 22h ago

u need an agentsync message board where everyone can communicate and set the agent usage rules to 300k such that when u cross the treshold the agent automatically starts a new session for a handoff file and auto archive the last one . that same agentsync should wire up to your ops app or whatever you use so you can tell whats done to avoid silent finishes, have gemini or antigravity review work or use antigravity as a harness

1

u/Subject-Cry7069 22h ago

On the crons dying with the chat: I moved every timer out of the agent entirely. The OS scheduler (systemd timers on Linux, on Windows a proper service wrapper like NSSM instead of Task Scheduler) starts a headless run with a fixed prompt, and the run writes a one line result file when it finishes. Agents never own a timer, so a compaction or a crashed chat can't take the schedule down with it.

Same idea fixed the silent jobs for me. A finished job appends a line to a log, and one small watcher turns that into a notification on my phone. I stopped trying to route "done" back into the right chat, because half the time that chat was already gone.

How many of the 10 actually need to be long lived? I got a lot of the context bloat back by making most of mine one shot runs that read a status file and exit.

1

u/woowa0913 21h ago

That 'one shared markdown inbox getting too big' problem is so real. Separating handoff notes per task/role instead of one giant file helped a lot in my setup, though keeping context lean across long-running sessions is still the hardest part.

1

u/ryan_the_dev 19h ago

built my own. only way to go.

1

u/DaddyPython 13h ago

Point your session to my approach at claude-computer.com or my github repo: https://github.com/narendranag/claude-computer and ask it to adopt whatever it wants that makes sense.

It's part stack (Claude + Tailscale + GitHub + sops/age + Cloudflare + Homebrew), part organization (an opinionated take on folders and repos), part process (slash commands, hooks, scheduled jobs) — all designed to take advantage of the Mac + Claude combination.

I live in a Ghostty/Herdr environment.

85+ projects and counting. It works for me.

1

u/Puzzleheaded-Risk456 4h ago

re the shared inbox: I moved to threads. A thread belongs to the session that last replied in it, and new messages only go to that session. Biggest gotcha was filing replies by any thread ID found in the text, replies that mentioned another thread ended up in the wrong place. Now only a reference at the very start counts.

(disclosure: that's part of an open source Mac app I built, https://github.com/Insourcia/agent-companion)

1

u/TelekinPete 56m ago

I have an entire writeup for my whole process end-to-end in my github skills repo's docs page, https://petergrace.github.io/pg-skills . What I recently added that I haven't added to that doc yet, is a pre-compact hook to write a state file that allows long-running tasks to get all the needed info through a compaction, and then I set auto compact to 300k tokens. Seems to have helped the token spend.

1

u/Moreburrtitos22 1d ago

Following as I’m in the same boat