AI subagents are independent AI worker instances your main agent spawns to handle subtasks in the background — so instead of one agent doing five jobs back-to-back while you stare at a frozen screen, a lead agent dispatches two or three workers that run at the same time and report back when done. When set up correctly, this parallel fan-out cuts task completion time by 36–50% on content and research workflows, and up to 3.7x on parallelizable tool-call benchmarks, compared to sequential execution (Hermes Agent delegation docs; LLMCompiler, ICML 2024).
The shift matters because it removes the single biggest complaint about running AI agents for real work: the blocking problem. You hand off a task, your entire chat window freezes, and you sit watching dots spin until the agent finishes. Background subagent mode — first shipped in Hermes Agent v0.17.0 "The Reach Release" on June 19, 2026 — returns control to you immediately while the workers run off to the side (NordSys; GitHub). If you've ever resorted to opening five separate terminal windows just to run five AI sessions at once, subagents are the cleaner answer.
- Subagents = isolated AI workers your lead agent spawns for parallel subtasks
- Background mode stops your chat from freezing while workers run
- Hermes: 3 concurrent by default (no hard ceiling); Claude Code: 20 concurrent, 200/session
- Research shows 36–50% faster wall-clock on content/research pipelines
- Best for: parallel research, batch content, code review + fix, multi-file refactors
- Pricing/limits change often — last checked
What Are AI Subagents?
AI subagents are specialized AI instances that your main (lead) agent spawns to handle pieces of a larger task. Each subagent operates with its own context window, its own tool permissions, and its own focused job — and it reports back a summary when finished. The lead agent combines those summaries into a final result.
The key idea is delegation with isolation: instead of one agent doing everything in one long conversation (flooding its own context with intermediate tool calls), the lead agent breaks the job into parts and hands each one to a fresh worker. Only the worker's final summary re-enters the parent's context, keeping token usage efficient (Hermes Agent docs).
This is not the same as opening multiple browser tabs with ChatGPT. Subagents share the same infrastructure — the same API keys, provider configuration, and credential pool as the parent — so they inherit your setup automatically. What they don't inherit is your conversation history.
How Do AI Subagents Work?
Subagent architectures share a common fan-out/fan-in pattern: a lead agent decomposes a goal, dispatches parallel workers, and synthesizes their results. Critically, each subagent starts with a completely fresh conversation — it has zero knowledge of the parent's prior tool calls, earlier messages, or anything discussed before delegation. The subagent's only context comes from the goal and context the parent passes when spawning it (Hermes Agent docs).
This isolation is the core design choice. It means:
- No context bleed: one worker's exploration doesn't pollute another's reasoning.
- The parent must pass everything: a vague instruction like "fix the error" fails because the subagent has no idea which error you mean. You have to spell it out.
- Only summaries return: the full tool-call transcript stays in the worker's session; the parent sees just the outcome.
The lifecycle looks like this:
- Decompose: You (or the lead agent) identify which parts of the job are independent.
- Dispatch: The lead agent spawns workers, one per subtask, each with a tight goal and full context.
- Execute: Each worker runs on its own thread, at the same time, using its own isolated context.
- Report: Each worker returns a structured summary — what it did, what it found, files modified, issues hit.
- Synthesize: The lead agent combines the summaries and hands you the final result.
In background mode (Hermes) or when explicitly asked to parallelize (Claude Code), the lead agent doesn't wait for step 3–4 to finish before letting you type. It posts the consolidated result as a new message whenever the workers complete.
How Much Faster Is Parallel AI Agent Execution?
Parallel agent execution delivers measurable speedups, but the gains depend heavily on how independent the subtasks are.
| Metric | Sequential (one agent) | Parallel (subagents) | Improvement | Source |
|---|---|---|---|---|
| Latency on parallelizable tool calls | Baseline | Up to 3.7x faster | 3.7x | LLMCompiler, ICML 2024 |
| Cost per parallelizable workflow | Baseline | Up to 6.7x cheaper | 6.7x | LLMCompiler, ICML 2024 |
| Wall-clock, content & research pipelines | Baseline | 36–50% reduction | ~1.5–2x | Zylos Research synthesis |
| Task accuracy (error propagation) | Baseline | ~9% improvement | ~9% | LLMCompiler, ICML 2024 |
The LLMCompiler framework — published at ICML 2024 by researchers at UC Berkeley and Squeeze AI Lab — applied classical compiler design (dependency analysis, parallel scheduling) to LLM tool calls. It introduced a three-stage pipeline: a Function Calling Planner, a Task Fetching Unit, and an Executor that dispatches independent calls in parallel. Benchmarked against the standard ReAct (reason-then-act) pattern, it achieved up to 3.7x latency reduction, 6.7x cost savings, and roughly 9% accuracy improvement (arXiv:2312.04511; ACM Digital Library).
A separate synthesis of production multi-agent pipelines found that the dominant bottleneck in 2026 AI agent systems is no longer model inference speed — it is sequential tool execution. An agent making five tool calls in turn pays the cumulative latency of every call. Parallel execution collapses that to the latency of the single slowest call, yielding 36–50% wall-clock reductions in common content and research workflows (Zylos Research).
Where parallelism clearly wins: tasks with low inter-dependency and high task count — large-scale refactors, test generation, multi-source research, documentation sweeps. The throughput gains compound directly because each worker runs independently.
Where it doesn't: heavily sequential tasks where step B depends on step A's output. If every tool call depends on the previous result, parallelism gives you nothing — you're paying for workers that sit idle.
Which AI Tools Support Subagents in 2026?
Three mainstream coding agents ship subagent/parallel-task features as of August 2026. Here's how they compare on the capabilities that matter for real work.
| Feature | Hermes Agent | Claude Code | OpenAI Codex CLI |
|---|---|---|---|
| Background subagents | Yes — default for top-level delegations | Yes — default as of v2.1.198 | Not native (per-run model) |
| Default concurrent workers | 3 (configurable, no ceiling) | 20 (CLAUDE_CODE_MAX_CONCURRENT_SUBAGENTS) |
N/A (one task per codex exec) |
| Max subagents per session | No hard limit documented | 200 (CLAUDE_CODE_MAX_SUBAGENTS_PER_SESSION) |
N/A |
| Nested delegation depth | 1 default (raisable via max_spawn_depth) |
3 default | N/A |
| Worker context isolation | Full — fresh conversation per worker | Full — fresh context per worker | Full — per-run isolation |
| Live agent tree view | /agents overlay with kill/pause per worker |
Tree view in TUI | Not available |
| Orchestrator role | Opt-in (role="orchestrator") |
Built-in nesting up to depth 3 | Not applicable |
| License / open source | MIT, open source | Proprietary (free to use) | Proprietary |
| Sources | Hermes docs; GitHub | Claude Code docs | Codex CLI docs |
Claude Code subagents run in the background by default as of v2.1.198, with a built-in concurrency cap of 20 and a per-session spawn limit of 200. Nesting is allowed up to three layers deep by default. Permission prompts from background subagents surface in your main session as of v2.1.186 (Claude Code docs).
Hermes Agent takes a different approach: top-level delegate_task calls run in the background automatically, returning a handle immediately. The default concurrency is 3 (configurable via delegation.max_concurrent_children or the DELEGATION_MAX_CONCURRENT_CHILDREN env var), with no hard ceiling. Orchestrator subagents that can delegate their own workers are opt-in — by default, delegation is flat to prevent runaway recursion. The /agents overlay shows a live tree view with per-branch cost, token, and file-touched rollups, plus kill and pause controls for individual subagents (Hermes docs).
For a deeper look at multi-agent coding comparisons across these tools, see our guide on multi-agent AI coding in 2026 and our Claude Code + Codex CLI two-model setup walkthrough.
How to Set Up AI Subagents in Hermes Agent
Hermes Agent — the open-source, MIT-licensed agent built by Nous Research — provides the most configurable subagent system. Here's how to get it working.
Step 1: Install or update Hermes
If you don't have Hermes yet:
curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash
hermes setup --portal
If you already run Hermes:
hermes update
That's it. No reinstall. As of v0.17.0 (June 19, 2026), background subagents are built in. The latest release, v0.20.0 (August 3, 2026), added durable background delegation — if the process restarts mid-run, results are restored and delivered instead of vanishing (GitHub releases; Hermes docs).
Step 2: Delegate a single task
The simplest pattern — one goal, one worker, background mode:
delegate_task(
goal="Debug why the tests fail",
context="Error: assertion in test_foo.py line 42. The project is at /home/user/myproject.",
background=true
)
Hermes returns immediately. You keep typing. The result re-enters your conversation as a new message when the worker finishes.
Step 3: Fan out a parallel batch
For multiple independent tasks, pass a tasks array:
delegate_task(tasks=[
{"goal": "Research competitor A's pricing", "context": "Focus on their public pricing page"},
{"goal": "Research competitor B's pricing", "context": "Check their enterprise tier"},
{"goal": "Draft a comparison table", "context": "Use the research findings to build a 3-column markdown table"}
])
Up to 3 workers run concurrently by default. Hermes posts one consolidated result after all children finish. Results are sorted by task index to match your input order regardless of which worker finishes first (Hermes docs).
Step 4: Configure concurrency and timeouts
Adjust the defaults in ~/.hermes/config.yaml:
delegation:
max_concurrent_children: 5 # raise from default 3
child_timeout_seconds: 600 # 10 min per worker (default)
model: "google/gemini-flash-2.0" # route subagents to a cheaper model
provider: "openrouter" # optional: different provider
Routing subagents to a cheaper or faster model is a powerful cost lever — you can keep your lead agent on a high-reasoning model like Claude Opus while workers handle routine work on a budget model.
Step 5: Monitor with /agents
Type /agents (or /tasks) in your session to see:
- A live tree view of running and finished subagents, grouped by parent
- Per-branch cost, token count, and files touched
- Kill and pause controls — cancel one worker without interrupting its siblings
- Post-hoc review: step through each subagent's turn-by-turn history after it returns
On the classic CLI, /agents prints a text summary. On gateway platforms (Telegram, Discord, Slack), it lists background delegations with live per-child activity (Hermes docs).
For more on running Hermes as a daily-driver agent, see our guide on plugging a large model into Hermes Agent and our walkthrough on running an AI agent operating system.
How to Use Subagents in Claude Code
Claude Code's subagent system is built around the Task tool (also called the Agent tool). You don't configure it — you ask for it.
Launch parallel subagents
Simply instruct Claude Code to parallelize:
Please execute the following 3 tasks in parallel using the Task tool:
1. Research competitor pricing across 5 vendors
2. Write API documentation for the auth module
3. Generate test cases for the payment handler
Claude Code spawns subagents that run in the background by default (as of v2.1.198). When a background subagent hits a tool call that needs permission, the prompt surfaces in your main session as of v2.1.186 — approve to continue, or press Esc to deny that one call without stopping the subagent (Claude Code docs).
Concurrent and session limits
| Limit | Default | Environment variable |
|---|---|---|
| Concurrent running subagents | 20 | CLAUDE_CODE_MAX_CONCURRENT_SUBAGENTS |
| Total subagents per session | 200 | CLAUDE_CODE_MAX_SUBAGENTS_PER_SESSION |
| Max nesting depth | 3 | Not user-configurable |
The concurrency limit prevents the Agent tool from spawning more while 20 are already running. The session limit counts every subagent ever spawned in that session — finished subagents still count toward the 200 cap. Run /clear to reset the count (Claude Code docs).
For our full setup guide, see how to run Claude Code for free in 2026 and our Orca parallel coding agents walkthrough.
How to Use Subagents in OpenAI Codex CLI
OpenAI Codex CLI takes a different approach. Instead of a Task tool that spawns workers inside a session, each codex exec call is its own isolated agent run:
codex exec "Research the WebAssembly ecosystem" &
codex exec "Analyze RISC-V server adoption" &
codex exec "Summarize quantum computing breakthroughs" &
wait
There's no built-in fan-out — you parallelize at the shell level. Each run is independent by design, which gives you full control but means you manually collect and synthesize results. For a detailed walkthrough, see our guide on running Codex CLI with free AI models.
When Should You Use Subagents (and When Shouldn't You)?
Subagents aren't a universal speed-up. They shine in specific patterns and can slow you down in others.
Best use cases
- Parallel research on independent topics. Fan out 3 workers to research three competitors at once — each gets a clean context, avoids cross-contamination, and returns a summary.
- Batch content production. Give a lead agent a list of 5 article topics; each worker writes one post in parallel. This is exactly how many shaam.blog articles get produced — each in its own Kanban workspace, handled by a content-writer worker.
- Code review + fix pipelines. One worker audits the auth module for security issues, another reviews the API layer, a third checks the database queries. Results merge into a single remediation plan.
- Multi-file refactoring. Delegate the whole refactor so the parent's context doesn't fill with 47 intermediate file diffs.
- Test generation campaigns. One worker per module writes tests; the parent collects them and runs the suite.
When to avoid
- Sequential dependencies. If step B literally cannot start without step A's output, parallelism wastes tokens. Run it as a single agent.
- Write conflicts on shared files. Multiple workers editing the same file simultaneously cause races. Route file writes through the orchestrator, or assign each worker a separate set of files.
- Simple one-shot questions. If the task is "summarize this article," spawning a subagent adds overhead. Just ask the agent.
- High cognitive load for review. Every subagent result comes back as a summary you need to review. More workers = more review surface. Start small — 2 or 3 — before scaling.
How to Write Good Subagent Goals (the #1 mistake)
The most common failure mode is vague delegation. Because subagents start with a completely fresh conversation, a goal like "fix the error" or "research the topic" gives them nothing to work with.
Bad:
delegate_task(goal="Fix the error")
Good:
delegate_task(
goal="Fix the TypeError in api/handlers.py",
context="""The file api/handlers.py has a TypeError on line 47:
'NoneType' object has no attribute 'get'. The function process_request()
receives a dict from parse_body(), but parse_body() returns None when
Content-Type is missing. The project is at /home/user/myproject
and uses Python 3.11."""
)
The rule: spell out everything the worker needs. File paths, error messages, versions, constraints, what "done" looks like. If you wouldn't hand this brief to a junior developer who just walked in with no context, it's not enough for a subagent either.
How to Route Subagents to Cheaper Models
One of the biggest cost levers in multi-agent orchestration is routing workers to lighter models while keeping the lead agent on a high-reasoning model.
In Hermes, set it in config.yaml:
delegation:
model: "google/gemini-flash-2.0" # cheaper model for subagents
provider: "openrouter"
If omitted, subagents use the same model as the parent (Hermes docs).
This is the "system over model" principle: you don't need every worker to be the smartest model available — you need the system to route the right level of intelligence to each job. Research gathering can run on a budget model; the final synthesis and review stays on the lead agent's high-reasoning model. For a deeper treatment of this approach, see our guide on building a multi-model AI coding workstation.
Is It Safe to Run Subagents in the Background?
Subagent systems are designed with multiple safety layers, though you should understand them before relying on them.
Default-denied risky tools. In Hermes, if a subagent tries to run something risky (a destructive shell command, for example), it gets denied automatically unless you explicitly turn that off. Subagents inherit the parent's enabled toolsets — the model cannot grant a child capabilities the parent doesn't have (Hermes docs).
Blocked tools for subagents. Leaf subagents (the default) cannot call: delegate_task (no recursive nesting), clarify (no user interaction — there's no live user to answer), memory, send_message, or execute_code in some configurations. This prevents runaway recursion and keeps workers focused (Hermes docs).
Stall detection. Hermes watches background subagents with a progress-based stall monitor — not a wall-clock timeout. It samples each worker's progress signals (API-call count, current tool, last-activity timestamp). A child that is making progress is never touched, no matter how long it runs. A child whose progress is completely frozen past a stale threshold (450 seconds idle, 1200 seconds inside a tool) gets interrupted and given a 120-second grace window to unwind (Hermes docs).
You review everything. Every subagent result comes back to the lead agent (and to you). You set the jobs, you review what lands. It's not autonomous chaos — it rides on the same rails as any background job with you holding the wheel.
What This Means for You
The practical takeaway: if you're using an AI agent for real work — writing, research, coding, content production — and you're still doing one task at a time, you're leaving the single biggest productivity lever on the table. The shift from "watching a frozen screen" to "dispatching a small crew and keeping going" fundamentally changes how a work day feels.
Start small: fan out 2–3 workers on a batch of research tasks or blog posts. Route the workers to a cheaper model. Let the lead agent do the splitting — give it one goal, let it decide how to decompose. Use /agents to watch them work. Review what comes back. Then scale up once you trust the system.
The research backs the intuition: parallel tool execution delivers 3.7x latency speedups on parallelizable workflows, 36–50% wall-clock reductions on content pipelines, and even ~9% accuracy improvements from reduced error propagation. The bottleneck isn't the model — it's sequential execution. Subagents fix that.
FAQ
Q: How many AI subagents should I run at once? A: Start with 2–3 concurrent workers and scale up once you trust the setup. Hermes defaults to 3 concurrent subagents (configurable with no hard ceiling), while Claude Code defaults to 20. More isn't always better — each worker's result needs your review, so the review surface grows with concurrency.
Q: Do subagents share my conversation history?
A: No. Subagents start with a completely fresh conversation and have zero knowledge of the parent's prior messages, tool calls, or context. The parent must pass everything the worker needs in the goal and context fields at delegation time. This isolation prevents context bleed between workers.
Q: Will a background subagent freeze my chat? A: No. In background mode (default for top-level delegations in Hermes, and default as of Claude Code v2.1.198), the agent returns control to you immediately and posts the result as a new message when the worker finishes. You can keep typing, planning, and working while the subagent runs.
Q: Can subagents spawn their own subagents?
A: It depends on the tool and role. In Hermes, only (opt-in) orchestrator subagents can delegate further, bounded by max_spawn_depth (default 1, meaning flat). Leaf subagents — the default — cannot. In Claude Code, subagents can nest up to 3 layers deep by default. Nested delegation is useful for review-then-fix pipelines where an orchestrator dispatches a fixer per finding.
Q: How do I stop a subagent that's going off the rails?
A: In Hermes, use the /agents overlay to see a live tree view of running subagents, with kill and pause controls per worker — cancel one without interrupting its siblings. In Claude Code, pressing /stop cancels running background delegations. Closing or resetting the owning session also interrupts its active children.
Q: Can I run subagents on a cheaper AI model?
A: Yes — in Hermes, configure a different model for subagents in config.yaml under delegation.model and optionally delegation.provider. If omitted, subagents use the same model as the parent. This is a powerful cost lever: keep the lead agent on a high-reasoning model while workers handle routine tasks on a budget model.

Discussion
0 comments