Blog · Guide · 21 November 2026

A Field Guide to Running Agent Teams

This is a handbook for running agent teams: several people, each with several coding agents, working in the same repositories. It is written for the person who has to keep that arrangement working. Forkit, the coordination system for agent teams, is used as the worked example throughout. Every Forkit figure below carries the condition it was measured under.

Does this sound familiar?

  • An agent has been waiting for an answer for an hour, in a terminal nobody is looking at.
  • Nobody can say what the team's agents are allowed to run, or what they cost last week.
  • Two agents rewrote the same file, and the second one did not know about the first.
  • An agent says the work is done, and nobody can verify which files it changed.
  • A swarm of fifty agents took one command to start and an afternoon to stop.

If two or more of these are true for your team, the rest of this guide is for you.

I. Why teams of agents stall

1.1 The symptoms

One agent beside one person works well. The person sees the terminal, answers the prompt and reads the diff. The trouble starts with the second agent, and grows with every one after it.

The five symptoms above have the same shape. In each, an agent needed something from outside itself and had no place to get it: someone to see its question, a record of what it used, knowledge of what other agents hold, a record of its changes that it did not write itself, or a switch that every agent obeys.

1.2 The one cause

There is one cause: the team has no shared place where agents ask, report and are answered.

Each agent has its own terminal, its own session and its own idea of the plan. The people have a chat channel and a pull request list. Nothing joins the two. A question asked in a terminal reaches whoever happens to look at that terminal. A permission granted on one laptop is unknown on the next. A file being edited is known only to the agent editing it.

More capable agents do not fix this. A better question still lands in an unwatched terminal.

The fix is a shared place with four properties. Part II takes them one at a time.

II. The four things a team of agents needs

Each section below gives the principle first, then how Forkit does it. The Forkit features in parts II and III are built. Where a number was measured, the text says where and how often.

2.1 See every agent

The principle. Every agent session should leave a record that people can read without opening its terminal: what it was asked, what it ran, what it changed, and what it is waiting for.

How Forkit does it. Each agent session becomes one thread. Hooks for Claude Code and Codex post each event to Forkit: a session starting, a prompt, a command, a changed file, the end of a turn. Other agents can be wrapped with forkit run. An API key belongs to one person, and the key's name is the agent's name, so every thread traces back to someone.

A thread has one of six states: working, waiting, review, blocked, idle or resolved. Some rules hold in every case:

  • Only a person can resolve a thread or decide a review.
  • A thread that is working with no event for 30 minutes is shown as quiet.
  • When an agent's turn ends with a question, the thread goes to waiting with that question as its note, so the question reaches the team's inbox and notifications.
  • With Claude Code, the hook then waits for a person's reply, 90 seconds by default, and hands the reply to the agent so it carries on.

This was run against production with real agents on 17 Nov 2026, one run each, with Claude Code and Codex 0.160.1: the start, a command, a changed file, a message and a question arrived.

2.2 Decide once

The principle. The same permission question should be answered one time, by the right party, and the answer should be kept. Routine requests should be settled by a rule. Requests that touch production, secrets or money should always reach a person, whatever the rules say.

How Forkit does it. An agent's permission request goes to Forkit, and the agent waits for the answer. Four layers answer in order.

Layer Who answers Notes
1. Command rules A glob on the command or the repository path A matching deny always wins
2. The orchestrator One agent that an owner picks Limited to the tools the owner ticks
3. A person The agent's own person, or a workspace owner Allow once, for an hour, always, or deny with a note
4. A timeout Nobody The agent asks in its own terminal, or is denied when it has none

"Always" adds a rule, so the next identical request is answered by layer 1. A member's rules cover only that member's own agents.

Two more rules matter for teams.

Production, secrets and money always reach a person. Allow rules and the orchestrator never answer these requests, and a person can only allow them once.

Identical questions are grouped. When many agents in one fan-out ask to use the same tool on the same subject in the same repository, the team sees one question. One person's answer settles all of them. Requests about production, secrets and money are never grouped.

A request that is pending puts the agent's thread in waiting and leads the inbox, because the agent is stopped until someone answers.

2.3 Keep agents apart

The principle. Two agents should not write to the same place without knowing it. Separation works at two levels: each agent gets its own copy of the code, and inside a shared copy each agent says which paths it is working on. What an agent changed should be recorded by the system that received the change, so a reviewer does not depend on the agent's own account.

How Forkit does it. There are three mechanisms.

A repository per agent. A fan-out can be started with a repository. Each agent in it asks Forkit with its own key and gets its own fork, with a write token that lasts at most 15 minutes. Forkit stores no token and writes none to disk.

Verified pushes. Every push to a fork is recorded by Forkit itself. It reads the trees before and after the push and writes the commits and the changed paths to the agent's thread, marked as verified. Reviews count these events, so approval rules apply to files Forkit verified.

File claims. Agents that share a checkout claim the paths they are working on. A claim is a path or glob with a time limit: 30 minutes by default, 4 hours at most. Claims expire, so a crashed agent does not hold a file forever. Activity on the agent's thread renews its claims, and the end of the session releases them. A claim that overlaps another agent's is still granted, and both agents get a conflict notice. The edit is what gets refused: an edit under another agent's exclusive claim is denied, and the denial names the holder.

For review, owners map path globs to approvers. An approval carries the last event the reviewer saw. If anything newer has arrived, such as a new commit or a failed check, the approval is refused, so nobody approves code they have not seen.

2.4 Know what it cost

The principle. Cost should be attached to the session that incurred it, in dollars, for whatever model the agent uses. A group of agents should have a budget that stops them when it is spent. Estimates should be labelled as estimates.

How Forkit does it. Claude Code and Codex report the tokens each session used, read from their own session files. Any other agent reports with forkit usage or the usage endpoint. Forkit turns tokens into dollars from three sources, in order:

  1. The agent's own figure, used as given when it reports one.
  2. A catalog of about 1,500 chat models, priced in dollars per million tokens and refreshed once a day.
  3. For a model nobody recognises, a high default price ($10 per million input tokens, $50 per million output tokens), with the model flagged.

The cost is added to the session's thread and to its fan-out. A fan-out started with a budget in dollars shows a warning at 80% of that budget and is stopped when it reaches it.

Every figure is an estimate. Prices are list prices. A fan-out can pass its budget by what its agents spend in about 20 seconds, because that is how often a working session reports. Part VII lists the other gaps.

III. Running a swarm

A swarm is many agents started together for one job: one agent per package, per test file or per hypothesis. Nobody sits beside these agents. Forkit calls this a fan-out.

3.1 Starting one

One request starts a fan-out and returns its keys, once:

curl -X POST https://forkit-mcp.com/api/v1/fanouts \
  -H "Authorization: Bearer $FORKIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "migrate-http",
    "agents": 200,
    "ttl_seconds": 3600,
    "max_tool_calls": 20000,
    "max_cost_usd": 50,
    "repo": { "url": "https://github.com/example/app" }
  }'

The command line form is forkit fanout create. What you get:

  • Up to 1,000 keys in one request, named <name>-001, <name>-002 and so on.
  • Keys that expire: after 1 hour by default, 24 hours at most.
  • Keys that act under the person of the agent that started them.
  • Keys that cannot start another fan-out and cannot be the orchestrator.

A workspace can have 20 fan-outs running at once, and one agent can start 10 in an hour.

3.2 Two budgets

Give every fan-out both budgets.

Budget Set with What happens at the limit
Tool calls max_tool_calls The fan-out is stopped. It can overshoot by a few calls.
Dollars max_cost_usd A warning at 80%, then the fan-out is stopped. It can overshoot by about 20 seconds of spending.

Use both. The tool call budget covers every agent, and an agent that reports no usage is invisible to the dollar budget.

3.3 One question for many agents

Agents doing the same job hit the same obstacle at the same moment. Two hundred agents that all need pnpm install should produce one question.

In Forkit, pending requests with the same fan-out, tool, subject and repository are shown as one. One person's answer settles all of them in one transaction: the requests and their threads change together.

A fan-out's agent has no terminal to fall back on. If nobody answers in time, its request is recorded as denied. A request from an agent that vanished, for example because its sandbox was torn down, is denied by a sweep that runs once a minute.

3.4 One Stop

A swarm needs one switch. A fan-out is stopped in any of these ways:

  • By the agent that started it.
  • By that agent's person, or a workspace owner, from the fan-outs page or the Mac app.
  • When its time is up.
  • When it reaches its tool call budget or its dollar budget.

After a stop, every request from the fan-out's keys is answered with a refusal that carries the reason. The hook tells the agent not to continue and refuses the tool in hand. Stopping also denies the fan-out's pending permission requests, releases its file claims, moves its working and waiting threads to idle, and gives its agents no new repository tokens. A manual stop revokes the tokens already handed out at once.

On staging, in one run on 13 Nov 2026, 200 of 200 runaway agents were stopped within 4 seconds.

3.5 Collecting and merging the work

Agents report results as handoffs: typed messages that go to the planner that started them. Messages between agents are limited by the server, for example 30 messages a minute per sending session, so a loop between two agents runs out instead of running on.

The code comes back through the forks. The agent that started the fan-out lists them, also after the fan-out has ended, and collects them:

forkit fanout collect <fanout-id> ./out --merge

This clones the base, fetches every pushed fork as a branch named agent/<name>, and merges them one by one into fanout/<name>. An agent whose work conflicts is left as a branch for a person to look at, and the command exits with code 3.

The forks and the base are deleted 7 days after the fan-out ends by default. You can set between 1 and 365 days, or delete them at once with forkit fanout clean after it has ended.

IV. Running it like a factory

The Forkit features in this part were built on 21 Nov 2026 and are newer than everything else in this guide. None of them has been measured at scale. The whole chain was run once on staging that day: a webhook asked for a run, a runner started two real agents in a shadow run, the one command that needed permission was refused and listed, and the run finished with its cost, about $0.21.

4.1 The idea

A fan-out is a one-off. Much of a team's work with agents is recurring: the weekly dependency update, the triage of new bug reports, the migration of one more service to the new client.

A common word in the industry for a recurring job done by a set of agents is a factory. Notion's guide "A new shape for work" uses "factories" for shared AI systems that are specific, shared and scrutinized. Those three words are a useful test:

  • Specific. It does one kind of work, with a fixed prompt and a fixed scope.
  • Shared. Anyone on the team can run it, without knowing how it was set up.
  • Scrutinized. Its results are checked, and its record is visible.

4.2 A saved factory

In Forkit, a factory is a named, reusable definition of a fan-out. It holds:

  • a prompt template,
  • how many agents,
  • the repository,
  • a budget in dollars and in tool calls,
  • whether it is a shadow run.

A teammate can run it without setting anything up.

4.3 Triggers

A factory is run in one of three ways:

Trigger How
On request An agent or a script asks, through the API or forkit factory run
By webhook An address with its own token, so a form, a CI job or a Notion automation can ask for a run
On a schedule At set times

A requested run waits in a queue until a runner picks it up and starts the agents. The runner is something your team operates. Forkit does not run agents itself. It coordinates the ones you start.

4.4 Shadow runs

A shadow run is a rehearsal. The agents work in their own forks, as in a real run. Everything that would need a person's permission is refused and listed.

The result is a list of what a real run would ask. Your team reads it before allowing anything.

4.5 Quality over runs

Each run records what it cost and how long it took. A person, or the runner, can mark a run good or bad. A factory then shows its pass rate and its cost per run.

That is the scrutiny in the definition.

V. Start small

Adopt this in five steps. Each one is useful without the next.

Step 1. One agent reporting. Connect one agent on one machine and work as usual for a day. Read its thread afterwards.

Step 2. Rules for the routine requests. Look at what the agent asked for. Requests you allowed every time, such as running the test suite, become allow rules. Commands you never want become deny rules. A matching deny always wins. Leave production, secrets and money alone: they reach a person in any case.

Step 3. One small fan-out with a budget. Pick a job that splits cleanly, such as one package per agent. Start five or six agents with a repository, a tool call budget and a dollar budget. Answer the grouped question when it arrives. Collect and merge.

Step 4. A shadow run of something recurring. Choose a job your team does every week. Run it as a shadow run and read the list of what it would have asked.

Step 5. A factory on a trigger. Save the job as a factory with its budgets. Give it a webhook or a schedule. Mark the first runs good or bad by hand, and watch the pass rate before you trust it.

VI. Evidence

Everything here comes from Forkit's own records. The load tests ran on staging, one run each. They used a test rig that behaves like agents. They did not use real coding agents. The two recorded runs used real Claude Code agents on staging, with a made-up team.

6.1 Load tests

The scenario for the 13 and 14 Nov runs: a planner migrates one package per agent. Each agent starts, takes a prompt, claims its package, makes 8 tool calls, asks for the same pnpm install, is refused when nobody answers, hands off and ends. Some never finish and are stopped.

Date and place Conditions Result
11 Nov 2026, production, one run each 1,000 agents waiting 65 s on one thread, woken by one message 1,000 woke, 0 errors, median 3.2 s, slowest 5.1 s
13 Nov 2026, staging, one run each 1,000 agents arriving 40 a second 1,000 of 1,000 starts, prompts and claims accepted. 800 of 800 handoffs read by the planner. 200 of 200 runaways stopped within 4 s. 69 of 10,717 tool calls were answered with a 503.
14 Nov 2026, staging, one run each 1,000 agents arriving 40 a second, after further changes Every request answered, no job dropped, 800 of 800 unanswered requests denied. Medians: start 0.36 s, claim 0.37 s, permission request 0.31 s, tool call 0.15 s. 95th percentile under 0.75 s for every step.
14 Nov 2026, staging, one run each 3,000 agents in three fan-outs at once, 120 arriving a second No job dropped, every handoff read. Medians: start 1.2 to 1.8 s, claim 1.5 to 6.7 s, tool call 0.37 s.

The 3,000-agent result has a caveat that belongs beside it. In both 3,000-agent runs, about one start in ten and 3% of tool calls never reached Forkit, because the test machine's connection attempts timed out after 10 seconds. The figures cover the requests that connected. None of those got a server error.

6.2 Two recorded real runs

Units CLI Penguins study
Date and place 17 Nov 2026, staging 20 Nov 2026, staging
Agents 6 Claude Code agents in one fan-out 12 Claude Code agents in one fan-out
Job Build a units CLI, one family of units each Test one hypothesis each about the Palmer Penguins dataset, each in its own fork
The question All 6 asked to run node --test within 46 s All 12 asked to run node run.js within 48 s, shown as one question
The answer One "Allow once" answered all 6 One answer went to all 12
Pushed All pushed 65 s after starting Every agent had pushed 69 s after starting
Merge 6 branches merged, no conflict 12 branches merged, no conflict
Outcome 28 of 28 tests pass after the merge 7 of 12 hypotheses supported, each with the commit of its result
Cost No figure recorded About $1.24 of a $10 budget, an estimate at list price

These are small runs: 6 and 12 agents, one run each. They are not a measurement at scale.

VII. What this does not do yet

This list is taken from Forkit's own records of what is not covered and not measured.

  • Several busy workspaces at once. The 1,000-agent and 3,000-agent runs used one workspace. More than one workspace under that load has not been measured.
  • A real fleet of hooks at scale. The load tests used a test rig. A fleet of real agents reporting through hooks at that size has not been measured.
  • A person answering a grouped question under load. In the load tests nobody answered. The grouped answer was shown with 6 and 12 agents.
  • Codex's trust step. Codex asks a person to run /hooks once to trust its hooks. In the run with real Codex sessions that step was bypassed with a flag, so /hooks itself is untested. Codex in a sandbox is not covered for the same reason.
  • Waking an idle session. Messages reach a running agent after its next tool call, at the end of its turn, or with its next prompt. Nothing wakes a fully idle session yet.
  • Cost is an estimate. Prices are list prices, tiered prices are not covered, and for Claude Code the tokens come from a transcript format its documentation calls internal.
  • Silent agents and dollar budgets. An agent that reports no usage is invisible to its fan-out's dollar budget. Set a tool call budget as well.
  • Private repositories are pushed, not imported. Forkit imports public repositories only and takes no repository token. For a private repository, the starting agent pushes its own checkout to an empty base, and the other agents wait until it is ready.
  • The sandboxes themselves. Stopping a fan-out stops its agents. It does not delete the machines they ran on.
  • Factories. Part IV describes features built on 21 Nov 2026. They have no measurements yet.

Closing

A team of agents stalls for one reason: there is no shared place where agents ask, report and are answered. Give it that place and four things follow. You can see every agent. A question is decided once. Agents stay out of each other's files. You know what the work cost.

Start with one agent. The steps in part V take a team from a single reporting agent to a factory on a trigger, and each step is worth having by itself.

To start: run npx forkit-cli init, get the Mac app at forkit-mcp.com, or point an agent at the MCP endpoint https://forkit-mcp.com/mcp.