Ten subagents with job titles looks like a company. It's actually a staffing agency where everyone forgets your codebase after every call.
TL;DR
- Subagents start from a blank slate every time and vanish after they return. Ten of them is a list of contractors, not a team.
- Named background sessions that message each other keep their own memory, so each role actually gets better at its part of your codebase.
- The trick is a lead session, "chief", that is never allowed to do any work. You only watch the chief window.
Short on time? The walkthrough below is free. If you'd rather skip the setup, I packaged it as a ready-to-use kit: claude-org on Gumroad.
"I built an AI org with 10 subagents"
I keep seeing posts like this. Ten custom subagents, each with a job title. It looks like a company.
But every one of those subagents starts with an empty context, does one thing, returns a summary and disappears. The auth expert doesn't remember how your auth works. The test runner doesn't remember what broke yesterday. You're paying to re-explain your project every single call.
That's not an org. That's a staffing agency.
I've been running a different setup on my indie projects: one lead session and three long-lived workers, wired together with messages. This post walks through how it works, the three rules that make it work, and the gotchas I hit. All the commands are here.
Three ways to run multiple agents in Claude Code
Right now there are roughly three options.
1. Subagents. Memory resets on every call. They return a result to whoever called them. Great for one-off research.
2. Agent teams (experimental). Memory lasts for the lead's session and teammates can talk to each other. Still experimental, and the docs list limits like teammates not coming back after /resume and one team per session.
3. Named sessions + messages. Each session keeps its memory for as long as you keep it around, and sessions send messages to each other by name. Built for day-to-day development split by role.
If you want each role to accumulate knowledge across days, option 3 is the most direct. That's what I use.
The shape: one chief, three workers
- chief: the lead. Splits work, assigns it, makes decisions. Nothing else.
- impl: the implementer. One per feature works even better.
- check: the verifier. Runs tests, builds, checks the simulator or browser, reviews screenshots.
- pr: pushes branches, opens PRs, tells you what's ready to merge.
Each worker keeps its own conversation. impl remembers why the code is shaped the way it is. check remembers what broke last time.
Three rules, or it's just more tabs
Rule 1: chief never does the work
The moment chief starts writing code, its context fills up with implementation details and it loses the big picture. So chief gets exactly four jobs:
- Break the work into tasks
- Decide who gets each one
- Answer workers when they escalate
- Report to you
Rule 2: workers don't decide
If a worker quietly picks a spec, nobody notices until it's merged. So workers stop and ask chief whenever something is ambiguous. All decisions flow through one place, and the direction stays consistent.
Rule 3: filter what reaches you
You'll be staring at the chief window all day. If every worker update lands there, you'll drown. So reports go in three tiers:
- Always report: anything that needs a human decision
- One line: finished tasks
- Never report: chatter between chief and workers
Once these three rules hold, you get the thing that actually matters: you leave the chief window open and several pieces of work finish in parallel.
Setting it up
This is what I ran on macOS with Claude Code 2.1.33x.
1. Define the roles
Role instructions use the same format as subagents and live in .claude/agents/ in your project. The implementer, for example:
---
name: impl
description: "Implementer. Builds the features chief asks for."
model: sonnet
---
You are impl. Requests arrive from chief via SendMessage.
- Implement only what was asked
- Don't make decisions. If anything is unclear, stop and ask chief
- When done, report to chief in 5 lines or less
The model line lets you put a smart model on chief and a cheaper one on the workers.
2. Start the workers in the background
claude --bg -n myapp-impl --agent impl --permission-mode auto --autocompact 150000 "Wait until chief sends you a request"
- --bg runs it as a background session with no window
- -n myapp-impl names it. The name is the address other sessions send to
- --agent impl loads the role you defined
- --permission-mode auto sets how much it can do without asking
- --autocompact 150000 summarizes the conversation once it nears that many tokens
Start check and pr the same way with their own names.
3. Open chief and talk to it
chief is the only one you open in your own terminal:
claude -n myapp-chief --agent chief --permission-mode auto
Then just say what you want: "Add a show-password button to the login screen." chief uses SendMessage to hand tasks to workers by name.
To test it, I asked chief: "Have impl read the first line of the README, and have check try to append a line to it."
- chief read nothing itself. It sent one message to each worker
- impl read the line and replied in one line
- check has no edit tools, so it didn't append. It told chief "I couldn't. I could do it with Bash, should I?"
- chief brought that decision to me, with a recommendation
Workers do the work, chief makes the calls, I make the final call. Exactly the flow I wanted.
4. Watch and stop
claude agents # list running sessions
claude logs myapp-impl # recent output of a worker
claude attach myapp-impl # jump into a worker and talk to it
claude stop <id> # stop it (the conversation is kept)
Keep workers' context small
Workers live for days, so their conversations grow. I start them with a smaller --autocompact so they get summarized early and stay light, carrying only what matters for their role. The value has to be at least 100k tokens.
chief keeps the default. I want it to remember the whole story.
Gotchas I hit
Use the same permission mode everywhere. Per the docs, a message from a session with a different permission mode is held for human approval on the receiving side. Nobody is watching a background worker, so it just sits there. Start chief and every worker with the same --permission-mode.
Stop by ID, not by name. claude logs and claude attach accept names. claude stop only accepted the short ID from claude agents.
Prefix names per project. Messages are routed by name. Two projects with an "impl" and you won't know which one got the task. Use myapp-impl, shop-impl and so on.
Trust the folder first. In a folder you've never opened Claude Code in, --bg refuses to start until you confirm trust. Open claude normally once, accept, then start the workers.
Removing edit tools doesn't stop Bash. I block Edit and Write for check with disallowedTools. It can still write files with echo >>. check needs Bash to run tests, so I spell it out in the role: "don't modify files through Bash either."
It won't necessarily save tokens. You stop paying to re-explain the project, and chief's context stays clean. But the docs also say more parallel sessions means more tokens. Don't start workers you don't need, and keep idle workers idle.
Wrap-up
- Subagents are disposable contractors. However many you define, none of them builds up knowledge.
- Long-lived named sessions connected with SendMessage do.
- chief doesn't work, workers don't decide, and reports are filtered. Those three rules make it run.
Looking at it, chief's job is just a human manager's job. To get AI to manage, you have to design the management. Once it's set up, though, you toss a problem into the chief window and things get done.
Over to you: how do you run multiple agents today: subagents, parallel sessions, or one big conversation? And what broke first? I'd love to hear in the comments.
Want the whole org in one paste?
Thanks for reading this far! If you're itching to try a chief that never codes on your own project, I packaged the full setup.
All the commands are above. But when you actually run it, there are lots of small decisions: how to word chief's instructions so it really doesn't start coding, the report format for each role, keeping permission modes in sync, avoiding name collisions, stopping only this project's workers. The kit handles all of that. I ran it end to end before publishing this.
- Four role definitions (chief, impl, check, pr) with the three rules built in
- One script that starts all workers with the same permission mode, skips ones already running, and can start one implementer per feature
- It prints the exact chief command with your workers' names filled in
- One script that stops only this project's workers (it looks up IDs from names for you)
If you can wire this up yourself from the steps above, you don't need it. It's for people who'd rather start handing work to chief today.
👉 Get the kit: https://pastereadyengineer.gumroad.com/l/claude-org
📦 claude-org is also part of the Claude Code Workflow Kit: 5 Claude Code skills (claude-org, scout, local-worker, skill-folderize, split-commits) for $29 instead of $45.
If this was useful, a ❤️ and a follow would mean a lot. I write about practical ways to put AI to work in indie development.
Top comments (0)