---
title: "How to reduce token usage when running several coding agents at once · Cork"
description: "Several Claude Code, Codex or Cursor agents at once multiply token spend. Cut it with lean shared context, cheaper models, less rediscovery and less rework."
canonical: "https://corkcli.com/blog/reduce-token-usage-multiple-coding-agents"
last_updated: "2026-11-14"
published: "2026-10-03"
author: "Kevin Vera"
---

# How to reduce token usage when running several coding agents at once

Several Claude Code, Codex or Cursor agents at once multiply token spend. Cut it with lean shared context, cheaper models, less rediscovery and less rework.

By Kevin Vera · October 3, 2026 · [Guides](https://corkcli.com/blog/c/guides) · 5 min read

Running several coding agents at once multiplies token spend because each agent has its own context window and rediscovers the same codebase on its own. To reduce it, keep the context every agent loads small (a short shared `AGENTS.md`, few always-on tools), give simple agents cheaper models and lower effort, keep each agent's task narrow so it reads fewer files, clear sessions between tasks, and cut rework from collisions, because an agent that has to redo work after a teammate's rename pays for the task twice. The last two items, duplicate discovery and rework, are the ones that grow fastest as you add agents.

## Where the tokens go with N agents

With one agent, cost is roughly context size times number of requests. With several agents, add three multipliers:

1. **Fixed context per agent.** Every agent loads its instruction files, tool definitions and system prompt. Anthropic's cost guide notes that agent teammates load `CLAUDE.md`, MCP servers and skills automatically, and that agent teams use roughly 7x more tokens than standard sessions when teammates run in plan mode.
2. **Duplicate discovery.** Agent A greps for the billing module, reads four files and learns the call graph. Agent B, two minutes later, does the same. Neither can see the other's context.
3. **Rework.** Agent A renames a function; Agent B, unaware, writes code against the old name; tests fail; B rereads the files and fixes it. The fix costs a full extra cycle of reads and edits.

## 1. Shrink what every agent loads

Whatever is in the always-loaded context is paid once per agent per request.

- Keep `AGENTS.md` (read by Codex, Cursor and Claude Code) and `CLAUDE.md` short. Claude Code's docs recommend under 200 lines; Codex caps the combined `AGENTS.md` chain at 32 KiB by default.
- Move workflow-specific instructions into skills (Claude Code) or nested `AGENTS.md` files in the directories they apply to, so they load only where needed.
- Disable MCP servers an agent does not need. In Claude Code, tool definitions are deferred by default, but server instructions and names still load.

## 2. Use cheaper models where you can

Not every parallel agent needs the strongest model. In Claude Code, set `model: haiku` or `model: sonnet` in a subagent's frontmatter for simple or mechanical tasks, and lower effort with `/effort`. Anthropic's guidance for agent teams is to use Sonnet for teammates. In Codex, `/model` switches models and `/status` shows token usage for the session.

## 3. Narrow each agent's task

An agent told "fix the checkout flow" explores. An agent told "in `web/checkout/Cart.tsx`, make `applyDiscount` reject expired codes" reads one file. Split work by directory or module (see our guide on splitting work across parallel agents), and say in the prompt which files are in scope.

## 4. Reset context between tasks

Long-lived agents accumulate stale context that is resent on every request. In Claude Code use `/clear` between unrelated tasks and `/compact` when you need continuity. In Codex, `/new` starts a new chat in the same CLI session and `/compact` summarizes the visible chat to free tokens. Shut down agents (and Claude Code agent teammates) when their task is done; idle agents with scheduled check-ins or loops keep spending.

## 5. Stop agents from rediscovering what another agent already found

This is the multiplier that grows with every agent you add. Approaches:

- **Pre-computed context**: a codebase overview skill or a short architecture section in `AGENTS.md` so each agent does not map the repo from scratch.
- **Session-start hooks**: a `SessionStart` hook (Claude Code and Codex both support it) can print the relevant module map or recent commits, so agents start informed.
- **Code intelligence**: Claude Code's code intelligence plugins let agents jump to a definition instead of grepping and reading candidate files.
- **Shared knowledge between agents**: a [coordination layer](https://corkcli.com/blog/coordination-layer-ai-coding-agents) that passes what one agent learned to the next.

## 6. Prevent rework from collisions

Rework is the most expensive token waste because it repeats a whole cycle. Separate worktrees (`git worktree add ../app-b -b agent-b/task`) prevent live overwrites. They do not prevent an agent from building on a function another agent just renamed. For that, agents need to hear about each other's changes while they work, or at least before they push: merge in order, rebase, and rerun tests before the next agent lands.

## How Cork helps

Steps 1 to 4 make each agent cheaper. Steps 5 and 6 need the agents to share what they know, which none of them do by default. Cork is the coordination layer for [multiplayer coding agents](https://corkcli.com/blog/multiplayer-coding-agents): it keeps Claude Code, Codex and Cursor agents, on one machine or across a team's machines, from overwriting each other on one codebase, and hands each agent what the others already learned.

Where that saves tokens:

- **Briefing**: when an agent starts or gets a prompt, it is handed the exact signatures, callers and recent changes of the code it is about to touch, so it searches less (Step 5).
- **Live awareness and [write gate](https://corkcli.com/blog/write-gate)**: when another agent changes code yours depends on, your agent hears it on its next step, and an edit against code another agent is changing right now is held until your agent has their version (Step 6).
- **No extra model calls**: the hooks run the protocol themselves.
- **recap** reports what happened and what it cost.

In Cork's published benchmark (12 Claude Code agents at once on one repository, hard tasks), agents with Cork used 53% fewer tokens than the same agents without it. Cork Free covers unlimited agents on one machine; agents across a team's machines is the paid plan. Install:

```bash
curl -fsSL https://corkcli.com/install.sh | sh
```

## Frequently asked questions

### Do parallel coding agents share context with each other?

No. Each Claude Code, Codex or Cursor session has its own context window. Subagents return a summary to their parent, but sibling agents do not see each other unless you add a shared channel.

### Is it cheaper to run one agent longer or several agents in parallel?

Parallel agents usually cost more in total tokens because each loads its own context and rediscovers the code. They finish sooner. Shared context and narrow tasks shrink the gap.

### What uses the most tokens when running multiple agents?

Long contexts resent on every request, duplicate exploration of the same code, and rework after collisions.

## Sources

- <https://code.claude.com/docs/en/costs>
- <https://code.claude.com/docs/en/sub-agents>
- <https://code.claude.com/docs/en/memory>
- <https://code.claude.com/docs/en/hooks>
- <https://learn.chatgpt.com/docs/agent-configuration/agents-md>
- <https://learn.chatgpt.com/docs/cli/slash-commands>
- <https://learn.chatgpt.com/docs/hooks.md>
- <https://git-scm.com/docs/git-worktree>
- <https://corkcli.com/benchmarks/study-5-twelve-agents-53-percent>

## Related reading

- [How to reduce Claude Code token usage](https://corkcli.com/blog/reduce-claude-code-token-usage): Cut Claude Code token usage with the official levers: /clear, /compact, /context, model and effort choice, a lean CLAUDE.md, subagents, hooks, fewer re-reads.
- [Why AI agents re-read the same files, and how to stop it](https://corkcli.com/blog/why-ai-agents-reread-same-files): Why Claude Code, Codex and Cursor agents keep re-reading the same files, and how to stop it: specific prompts, lean context, symbol lookups and briefings.
- [How to track AI coding agent costs per developer and per repo](https://corkcli.com/blog/track-ai-coding-agent-costs-per-developer-repo): Track Claude Code, Cursor and Codex spend per developer and per repository: /usage, OpenTelemetry with repo attributes, admin APIs, and tagging scripted runs.
- [Setting up Cork for a team of five](https://corkcli.com/blog/cork-team-of-five-setup): Set up Cork for a five-person team running Claude Code, Codex and Cursor agents: install, login, agent hours, AGENTS.md, working habits, and what it costs.

[All articles](https://corkcli.com/blog.md) · [Cork in Markdown](https://corkcli.com/index.md) · [llms.txt](https://corkcli.com/llms.txt)

This page in HTML: https://corkcli.com/blog/reduce-token-usage-multiple-coding-agents
