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.
npx agentmods add agents/zeroclaw-labs/zeroclaw/delegationgit clone --depth 1 https://github.com/zeroclaw-labs/zeroclawWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00000 | $0.06892 |
| Opus 5 | $0.00000 | $0.03446 |
| Sonnet 5 | $0.00000 | $0.01378 |
| Haiku 4.5 | $0.00000 | $0.00689 |
Grade A, and why
delegation 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.
How it starts
The opening of the file, as written. The whole thing — 240 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Delegation & SubAgents
A SubAgent is an ephemeral child run spawned by a parent agent that inherits the parent's identity by default: same agent alias, same SecurityPolicy, same memory allowlist, same configured model provider, same tool registry. Auditable as a child via a tracing span agent.<alias>.subagent.<run_id>.
SubAgents are not a separate configuration concept. There is no [subagents.*] block in the schema. Every SubAgent's identity is whichever parent's agent loop spawned it.
When to use spawn_subagent vs delegate
Two tools sit nearby. They are not interchangeable.
spawn_subagent: runs the SAME agent again under its own identity for a focused subtask. The child sees the parent's full permissions envelope minus any narrowing. Use when the parent wants to scope an internal subtask out of its main conversation history without changing identity.delegate: hands the request off to a DIFFERENT configured agent (named by alias). The target agent runs under its own identity and model provider, but delegation is gated: the caller's risk profile must setdelegation_policy mode = "allow"(default is"forbidden"), and the target must be reachable as either a same-profile peer or an explicitdelegatesentry. Explicit entries choosemode = "bounded"ormode = "independent", which determines whether the caller's tool ceiling still applies. Use when another configured specialist should own the work. See Delegation gating below.
This page documents spawn_subagent end to end. delegate lives at crates/zeroclaw-runtime/src/tools/delegate.rs and is a separate surface.
How a SubAgent is instantiated
Two spawn sites converge on SubAgentSpawn (crates/zeroclaw-runtime/src/subagent/mod.rs:97):
- From an agent loop: the model calls the
spawn_subagenttool with apromptstring. The tool is registered like any other in the registry (crates/zeroclaw-runtime/src/tools/mod.rs,SpawnSubagentTool::new). - From cron:
JobType::Agentjobs run throughrun_agent_job(crates/zeroclaw-runtime/src/cron/scheduler.rs) which builds the sameSubAgentContextbut flags the child as a top-level run (not a SubAgent) so it can itself spawn one level of subagent.
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.
- yesterday First seen · 240 lines · 0 tokens per session scan A f69e666619db
delegation is an agent published in the GitHub repository zeroclaw-labs/zeroclaw (32,680 stars, last pushed yesterday), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 6,892 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-30.
Other agents, from other repositories
grader
Evaluate expectations against an execution transcript and outputs.
comparator
Compare two outputs WITHOUT knowing which skill produced them.
implementer
Milestone executor. Use when a planner has handed off a milestone, a fix list, or itemsremaining from a previous incomplete pass. Codes, tests, repairs. Returns what's done, what's remaining, and a completion score. Never replans, never judges.
planner
Planning agent. Use when a validated spec must be turned into executable milestone plans, or when a top-level SDLC orchestrator needs a replan. Writes plans and decisions only. Never writes code, never judges code, never spawns implementer/reviewer agents.
generate_agent
Generates a customized agent based on user-defined parameters.
Explore
Fast read-only codebase & docs exploration. Returns structured findings, never raw file dumps.