Skip to content

Documentation / Mix agents in one task

On this page

Mix agents in one task

One task can use several agents. Claude Code writes the code, Cursor reviews it, Copilot watches CI. Each stage picks its agent and model in .natamux.json.

  • Each agent is good at different jobs. Pick the one that fits the stage.
  • A new agent reviews with fresh eyes. It did not write the code, so it does not defend it.
  • Several providers share the cost and the rate limits.
Keep three task agents in view while changing the native terminal grid layout. Real native app and workflow. Scripted demo agents. Natamux 1.0.17. Recorded 2026-11-03.

Set agent and args on a stage. In Project settings → Stages, they are Agent and Arguments.

  1. Open Project settings → Stages and click the stage, for example Review.
  2. In Agent, pick the agent. Task’s agent keeps the task’s own.
  3. Optional: in Arguments, add words for its command line, such as --model gpt-5.
  4. Click Save, then commit .natamux.json.

The flow chart on top then shows the agent’s icon and the model (from --model or -m) under the stage’s name.

The Agent menu for Review in native Project settings, listing Claude Code, Codex, Gemini CLI, GitHub Copilot, Cursor and the scripted demo agents. demo-reviewer is selected, and Arguments is empty.The Agent menu for Review in native Project settings, listing Claude Code, Codex, Gemini CLI, GitHub Copilot, Cursor and the scripted demo agents. demo-reviewer is selected, and Arguments is empty.
Choose a stage agent from the menu. The scripted demo-reviewer agent is selected here.

For example, a stage configured for Cursor can look like this:

.natamux.json
{ "id": "agent-review", "kind": "agent", "gate": "auto", "output": "review.md",
"ownShell": true, "agent": "cursor", "args": "--model gpt-5" }
  • agent is claude-code, codex, gemini, copilot, cursor, opencode, qwen, droid, amp, kimi, goose, aider, crush, cline, kiro or muse.
  • args adds words to the command line of that agent, such as a model flag. See Choose a model.
  • Any agent or testing stage can have them, from the catalog or your own. A stage that would run in Terminal 1, such as Spec or Implement, then runs in a terminal of its own, from Terminal 6, as Follow CI does in the Team example. Terminal 1 keeps the task’s agent and its session.
  • The configuration reference lists where agent and args are allowed.

Each task has a few terminals. See Terminals and agents for the full table.

Terminal What runs there
Terminal 1 The task’s agent, in one session for the stages in a row. The agent starts with the first stage that runs in Terminal 1. It is never closed before the task ends.
Terminal 2 Test spec, when it has no agent of its own.
Terminal 5 A stage with ownShell and no agent or args of its own.
Terminal 6 and up A stage with its own agent or args: Terminal 6 plus the place of the stage among all stages of the task, counted from 0. No two stages share one.

A stage that runs again, for example after a send back, gets its prompt in the agent of its terminal. That agent still knows the last round. To start fresh each time, set "endShell": true.

A stage keeps its terminal until it starts again. If you change its agent or args while the task runs, the change applies at the stage’s next start.

"endShell": true closes the terminal when the stage is done. This frees memory, and the next run starts a new session. It never closes Terminal 1. See End a stage’s terminal.

"workflow": true offers Run with a workflow on a stage. Claude Code then works with sub-agents inside that one stage. Use it on a hard stage such as Implement. It uses more tokens, and only Claude Code does it. See Run a stage as a workflow.

The two examples in Build a workflow list which agent and terminal each stage uses. The reasons:

Stage Why
Spec, Plan, Implement One session in Terminal 1 keeps the context of the spec for the code. Implement can add sub-agents with a workflow.
Test spec It writes cases without reading the code. Its terminal frees its memory when done.
Review An agent that did not write the code reads it. A new session per round.
Review PR It reads a teammate’s work with a new session.
Watch CI and merge, Follow CI It moves CI and merge work off the main session. A failed job sends the task back.
Verify impact list It checks the change with a new session.
Definition of done and review request Another provider for the last check.

Every agent you use in a stage must run on the machine of the task.

  • Installed, and its command runs in a terminal.
  • Logged in.
  • Hooks: Natamux adds them for each agent it starts, so the dashboard shows its state.

Details per agent:

Task terminals get an agent token, not the daemon’s token. An agent cannot approve, skip or pass a stage, so a stage with another provider cannot move the task past a gate. It can run natamux done and natamux stage back. See Security and privacy and The agent token.