sub-agents

A way for one coding agent to hand a self-contained task to another agent, wait for its response, and continue with the result. The second agent can have its own role, model, instructions, tools, and turn limit.

In plain words
What is it for?
Use it to delegate research, code review, image generation, or other focused jobs to a fresh agent session and receive its final answer.
Why use it?
It keeps specialised research, reviews, or other large intermediate tasks separate from the main conversation.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/yogasw/wick/sub-agents
Clone the repo
git clone --depth 1 https://github.com/yogasw/wick
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 10,425 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.10425
Opus 5 $0.00000 $0.05213
Sonnet 5 $0.00000 $0.02085
Haiku 4.5 $0.00000 $0.01043

Measured yesterday against content hash 4556d2bde8e3, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

sub-agents scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

docs/guide/agents/sub-agents.md · 721 lines

How it starts

The opening of the file, as written. The whole thing — 721 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Sub-agents

A sub-agent is another agent that your agent hands one self-contained task to, waits for, and gets an answer back from. Use it when a piece of work wants a different role — research, code review, image generation — or when the intermediate steps would flood the main conversation.

::: info Source Delegation core: internal/agents/delegation/run.go (spawn + turn counting), governor.go (limits), interrupt.go (stop). Rows: entity.AgentProfile, entity.AgentDelegation. Agent surface: the sub-agents connector. Web UI: internal/tools/agents/subagents.go. :::

Mental model

A profile is a reusable role: provider, model, system prompt, tool access, turn budget. A delegation is one call against that role. A profile is either global or owned by a project — see Scope.

The delegating agent (the leader) calls the delegate op (as the top-level wick_agent_delegate tool, or through the sub-agents connector). wick spawns a fresh session for the profile, feeds it the task, waits for it to answer, and returns the final text as the tool's result. The leader then carries on with that answer in hand.

leader session
      │  sub-agents.delegate(profile: "researcher", task: "…")
      ▼
isolated child session  ── clean context, same project/cwd
      │  runs its turns
      ▼
final text ──▶ returned to the leader as the tool result

Read the full file on GitHub · 721 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 721 lines · 0 tokens per session scan A 4556d2bde8e3

Subscribe to this mod's changes

sub-agents is an agent published in the GitHub repository yogasw/wick (5 stars, last pushed 4d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 10,425 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.