r/ClaudeCode • u/bt2066 • 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.
•
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?
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:
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
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.
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/kincaidDev 1d ago
I use this
https://github.com/Obedience-Corp/festival
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 3h 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 38m 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
1
u/boomer_fit 1d ago
Company is slop.org