How to run coding agents in parallel: Grok Build workflows vs Claude Code subagents, teams and worktrees

Running coding agents in parallel in Grok Build (workflows in JavaScript, agent messaging, worktrees, the agent dashboard) and in Claude Code (subagents, agent teams, worktrees, background sessions, /batch). What each one does, limits, cost, and which fits which job.

· 7 min read

Running several coding agents at once has gone from a trick to a headline feature. On November 30, 2026, the day Cursor became Grok Build, its terminal app got workflows that "run them across hundreds of agents in parallel" and agents that message each other, and its desktop app was rewritten "for managing dozens or hundreds of agents in parallel". Claude Code gets there through subagents, agent teams, worktrees and background sessions.

The tools differ more in shape than in power. Grok Build puts a scripted fan-out at the center. Claude Code gives you several smaller pieces to combine. This page compares them from each side's docs, read on November 30, 2026: Grok Build's workflows, subagents, worktrees and agent dashboard pages, and Claude Code's subagents, agent teams, worktrees and agent view pages.

#What are the ways to run agents in parallel?

JobGrok BuildClaude Code
Delegate a side task, get a summarySubagents (general-purpose, explore, plan, your own)Subagents (Explore, Plan, your own in .claude/agents/)
Split a big task across many agents, one reportWorkflows: a JavaScript file, up to 1,024 agents per run/batch, or a script with claude -p or the Agent SDK
Agents that talk to each otherAgent messaging, on in every sessionAgent teams, experimental and off by default
Separate checkouts so agents don't collidegrok -w, under ~/.grok/worktrees/claude --worktree, under .claude/worktrees/
One screen for every sessionAgent dashboard (Ctrl+\)Agent view (claude agents, research preview)
Keep going with the laptop closedCloud send (&), cloud agentsCloud sessions at claude.ai/code

#Grok Build: workflows, messages and the dashboard

#Workflows

A workflow is a JavaScript module that starts subagents in the background and returns one result. Your session stays free while it runs. You save it as .grok/workflows/<name>.js in a trusted repository, or in ~/.grok/workflows/ for every project, and start it with /<name>. Inside, host.agent(prompt, options) starts an agent and .wait() returns its answer. The options set a label (shown under a phase in the run view), readonly: true for an agent that only reads, a JSON schema for its answer, and a model.

You don't have to write the file. Ask in plain words ("use a workflow to review each feature in this PR"), and Grok writes a script and runs it without saving it. The announcement groups this under "code mode and workflows". /create-workflow writes a saved one for you, and /deep-research is built in.

Limits worth knowing: a run starts as many agents as its code asks for, so cap it with --agent-budget N (1 to 1,024). A stopped run can't be resumed, and quitting Grok stops every unfinished run. Workflows start only in agent mode.

#Agents that message each other

In Grok Build 2.0, agents in one session can message each other while they work. The main agent can correct a subagent without stopping it, subagents can pass each other what they found, and you can open a running subagent and write to it yourself. Each message shows as a row in the transcript.

#Worktrees and the dashboard

grok -w starts a session in its own checkout under ~/.grok/worktrees/<repo>/<name>, from your current HEAD including uncommitted changes, and subagents can ask for one when the parent delegates parallel work. Worktrees older than seven days are cleaned up automatically, except those that still hold uncommitted or unpushed work.

The agent dashboard (Ctrl+\ or grok dashboard) lists every session by state: Needs input, Working, Idle, Completed, Failed. Select one to peek and reply, and dispatch new sessions into worktrees from its input bar.

On the desktop, the rewritten Agents Window is built for many agents at once. It's in open beta on November 30.

#Claude Code: subagents, teams, worktrees and background sessions

#Subagents

A subagent is a second Claude with its own context, instructions and tools. It does the noisy part of a job and returns a summary. Up to 20 run at once by default (CLAUDE_CODE_MAX_CONCURRENT_SUBAGENTS changes it), each can work in its own worktree with isolation: worktree, and they can spawn their own, three layers deep. They don't talk to each other or to you while they work. Full guide: Subagents in Claude Code.

#Agent teams

Claude Code's agents-that-talk feature. A lead session and teammates, each a full Claude Code instance, share a task list and message each other by name. It's experimental and off by default: turn it on with CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1. The docs list its limits (interactive sessions only, one team per session, teammates not in worktrees, /resume doesn't bring them back), and Anthropic's costs page puts a team at about 7 times the tokens of one session. More in Claude Code agent teams.

#Worktrees, background sessions and /batch

claude --worktree feature-auth starts a session in .claude/worktrees/feature-auth/ on a new worktree-feature-auth branch. Background sessions (claude --bg "task") keep running without a terminal, and agent view (claude agents) shows them all by state, in research preview. Background sessions that edit files move into a worktree first. For one large mechanical change, /batch splits it across subagents, each in its own worktree. See git worktrees with Claude Code and running several Claude Code sessions at once.

For a fixed pipeline, claude -p in a shell script or the Agent SDK chains runs in code. That's the closest thing to a Grok Build workflow file, without the run view.

#What does Grok Build do better?

  • Fan-out as a first-class feature. A workflow file with phases, schemas, a per-agent model, an agent budget and a run view is more than Claude Code ships in one piece. Saving it in the repository makes it repeatable for a team.
  • Agents that talk, on by default. Messaging between agents in one session works without an experimental flag, and you can steer a running subagent directly.
  • Scale on the desktop. The new Agents Window and cloud agents aim at dozens or hundreds of agents, with Projects shared across a team.

#What does Claude Code do better?

  • Smaller pieces you can combine. Subagents, worktrees, background sessions and scripts each do one thing, and each is documented with its limits.
  • Predictable cost on a plan. Parallel sessions cost one session each, on your Pro or Max plan. A workflow that starts hundreds of agents costs hundreds of agents. In Grok Build, Claude and other third-party models are billed at API price from prepaid credit, by its models page.
  • Worktrees in the repository. .claude/worktrees/ sits next to your code on a named branch, easy to find and review.

#Which approach fits which job?

  • One feature, a few side questions: subagents, in either tool.
  • Three independent features: worktrees, one session each. You merge.
  • Audit every route, review each file of a PR: a Grok Build workflow, or Claude Code's /batch or a claude -p loop.
  • A hard bug with several plausible causes: agents that debate, so Grok Build's messaging or Claude Code's agent teams.
  • More than four or five sessions: whichever tool, the hard part becomes knowing which one is waiting for you. Use the dashboard or agent view.

#FAQ

How many agents can run at once?

A Grok Build workflow can start up to 1,024 per run with --agent-budget. Claude Code runs up to 20 subagents per session by default, and parallel sessions are limited by your machine and your plan's usage.

Do parallel agents edit the same files?

They can, in one checkout. Put each in a worktree: grok -w or claude --worktree.

Are Claude Code's agent teams the same as Grok Build's agent messaging?

Close in idea: agents message each other. Claude Code's are experimental, off by default, and limited to interactive sessions. Grok Build's are on in every 2.0 session.

Does running agents in parallel cost more?

Yes, roughly in proportion to the number of agents. Anthropic puts an agent team at about 7 times the tokens of one session. A Grok Build workflow's cost depends on how many agents it starts and on their model.

#More on the Grok Build change

#In Relais

Relais is a Mac app built on Claude Code, for the parallel sessions part. It runs many Claude Code sessions sorted by project, each in a worktree if you want, and puts what waits for you in one Needs you list. When a Claude seat hits its limit, the same session carries on with your next one. Workflows, a YAML file in your project, chain Claude sessions, shell commands and your reviews, with steps running at once when they can. It doesn't run Grok Build. See Relais vs Grok Build and Compare.

Your AI team,
on your Claude plan.

$14.99 a month, everything included. On your Mac or on Linux, on your Claude Pro or Max plan. Cancel any time.