tmux for Claude Code
Course
Using tmux for Advanced Claude Code
Module 5 of 14

Why Multi-Agent Changes Everything

The context window problem, four failure modes of single agents, and why coordination beats isolation

What you'll learn

Explain why context window limits force multi-agent architecture for complex tasks
Identify the four failure modes of single-agent work: sequential bottleneck, context pollution, coordination failure, and the scaling wall
Articulate the coordination spectrum — from no coordination (single agent) to isolated (sub-agents) to full (agent teams)
Judge when a single agent is sufficient versus when a team is the right architectural choice

The Context Window Is Your Most Precious Resource

Context usage meter: healthy, monitor, critical, compaction zones

You've spent the last module building tmux muscle memory — creating sessions, splitting panes, scrolling through history. Before you use those panes to run agent teams, you need to understand the problem those panes exist to solve.

Every Claude Code session runs inside a context window. Everything the agent reads, every tool call it makes, every response it generates — all of it accumulates inside that window. The window is finite. And as it fills, things get worse in a specific and predictable way.

The agent doesn't suddenly forget everything at once. It degrades. Early decisions start to carry less weight. Connections between distant parts of the codebase become fuzzy. The agent starts referencing the schema it read 40 minutes ago with less precision than it referenced the file it read 2 minutes ago. Then, around 95% capacity, auto-compact kicks in — the session summarizes its history to free space. Useful, but lossy.

This is like trying to write a novel with a whiteboard that can only hold 20 sentences. You keep erasing the beginning to make room for the end.

The context window isn't a bug in the system. It's a hard architectural reality that shapes every decision about how you use Claude Code at scale. Once you internalize it, multi-agent architecture stops being "advanced" and starts being obvious.

Exercise: See It For Yourself

Before moving on, try this. Open Claude Code — not inside tmux yet, just a normal session. Ask it to read 10 files in a project you know well, one at a time. After each file, ask it to recall a specific detail from the first file you had it read.

Watch what happens. The first few recalls will be accurate. By file 7 or 8, the precision will have dropped. You won't need to hit the compaction limit for the degradation to be visible — the recall will start hedging, paraphrasing, or occasionally confusing details.

That's not a fluke. That's the fundamental problem this course is about solving.

Four Failure Modes of Single-Agent Work

Four failure modes: sequential bottleneck, context pollution, coordination failure, scaling wall

The context window is the root cause. We organize its effects into four failure patterns — a framework we use throughout this course to identify when you need multi-agent architecture. These aren't official Anthropic categories, but they map to real problems you'll encounter:

Failure Mode 1
Sequential Bottleneck
Your agent can only do one thing at a time. Reading the database schema, then writing the API layer, then building the frontend components, then writing tests — each step waits on the last. A 4-agent team can run all four in parallel. The work that takes a single agent 40 minutes takes a coordinated team 12.
Failure Mode 2
Context Pollution
Your agent is writing frontend components, but it's still carrying the full mental load of the database migration it performed 20 minutes ago — the old schema, the migration script, the rollback plan. That context is consuming window space and creating noise. A frontend agent that starts fresh with only frontend context is faster and more precise. Separate agents have clean, focused contexts by design.
Failure Mode 3
Coordination Failure
You've learned to use sub-agents to parallelize work — but sub-agents can't communicate with each other. Agent A changes the shape of an API response. Agent B is building the frontend against the old shape. Neither agent knows. You find out when the integration breaks. This is parallelism without coordination, and it creates a specific class of subtle, hard-to-debug errors that appear only at the seams between agents.
Failure Mode 4
The Scaling Wall
Some projects are simply too large for one context window to hold coherently. A full-stack feature that touches the database schema, three API endpoints, four frontend components, test suites for each layer, and documentation exceeds what any single session can process with full fidelity. You don't hit a hard error — you hit a soft ceiling where quality silently degrades and the agent starts making small mistakes that compound.

What Single Agents Do Well

Being clear-eyed about the failure modes doesn't mean single agents are the wrong tool. They're the right tool in a significant majority of cases.

  • Focused, single-file tasks — Refactoring one component, fixing a specific bug, adding a field to a form. The task fits in one context and doesn't require parallel execution.
  • Research and exploration — Reading through a codebase to understand its structure, investigating a library, generating a summary of options. Sequential by nature, and benefits from one continuous thread of reasoning.
  • Isolated bug fixes — When the scope of a fix is well-defined and contained, a single agent with full context on that area is the cleanest solution.
  • Quick scripts and utilities — Generating a migration script, writing a one-off data transformation, building a small CLI tool.

If the task fits in one context and doesn't need coordination, a single agent is simpler and cheaper. Don't reach for a team when you don't need one. The goal is judgment, not maximalism.

The Coordination Spectrum

Coordination spectrum: Single Agent to Sub-Agents to Agent Teams

Every task you bring to Claude Code sits somewhere on a spectrum of coordination need. Learning to read where a task falls on that spectrum is the core skill this module is building toward.

No Coordination
Single agent, one context window, sequential execution. Simplest possible setup. Correct choice for most tasks.
Isolated Coordination
Sub-agents running in parallel, each with their own context. Faster than sequential, but no peer communication. Agent A cannot learn from Agent B mid-execution. Good for embarrassingly parallel tasks with no shared state.
Full Coordination
Agent teams with a shared task list and peer-to-peer messaging. Parallel execution AND inter-agent communication. The right choice when parallel work needs to stay synchronized across shared interfaces or contracts.

This spectrum is the core architectural decision you'll make for every non-trivial task. Module 8 goes deep on the tradeoffs between isolated and full coordination. For now, the important thing is recognizing that the spectrum exists and that you have a choice at each point.

Connect Back to tmux

Remember those four panes you built in the last module? Each one is a viewport into a running process. That's exactly the structure you'll use for agent teams.

The lead agent lives in your original pane — the orchestrator. It receives your request, creates the task list, and coordinates at a high level. Each teammate gets its own pane: a database agent, a backend agent, a frontend agent. Each one owns a domain, runs in an isolated context, and communicates through the shared task list and messaging system.

You — watching from tmux — can scroll any agent's history to see what it decided and why. You can switch to any pane and talk directly to any agent. You can watch the task list update in real time as work is claimed and completed.

The panes aren't decoration. They're the observation layer that makes coordination legible to a human.

In the next module, you'll enable agent teams and configure your environment. In Module 5, you'll run your first team across those panes.

The Scale of What's Possible

To close out the theory: the ceiling on multi-agent work is not the model. The model is capable of far more than any single context window can express. The ceiling is your ability to orchestrate.

Anthropic's own research team ran a 16-agent system to reproduce a C compiler — a project spanning hundreds of thousands of lines, with agents specialized for parsing, code generation, optimization, and testing, all coordinated over days of execution. The cost was around $20,000. The alternative would have been months of human engineering time.

At a smaller scale: agent teams building full-stack features in minutes where a single agent would take an hour. Code review pipelines running security analysis, quality checks, and test coverage agents in parallel, each reporting to a synthesis agent that produces a unified review. Refactoring campaigns where a planning agent creates a task list and 6 execution agents work through it simultaneously.

None of that requires anything beyond what you already have: Claude Code, tmux, and a clear understanding of when coordination is worth the overhead.

Knowledge Check
I can explain the context window problem in my own words — what fills it, how degradation shows up, and why compaction is lossy
I can name and describe all four single-agent failure modes: sequential bottleneck, context pollution, coordination failure, and the scaling wall
I understand the difference between no coordination (single agent), isolated coordination (sub-agents), and full coordination (agent teams)
I can identify scenarios where a single agent is the right choice versus scenarios that require a coordinated team