A delegation policy for Claude Code's main conversation, plus three subagents it can hand work to. The policy is not a pipeline: the main model works inline by default, and most tasks need no agents. Nothing in it depends on which model runs the main conversation, and it is not a bridge to another vendor's CLI.
flowchart LR
U([Request]) --> M{Main conversation}
M -->|"quick, conversational, or<br>slower to specify than to do"| I[Work inline]
M -->|"substantial work,<br>fully specified up front"| E["executor<br>opus · edits assigned files"]
M -->|"many files, logs<br>or web pages to read"| R["researcher<br>sonnet · read-only"]
M -->|"large, risky, or<br>untested finished work"| V["verifier<br>opus · read-only"]
G[["readonly_guard.py<br>denies git-state and dependency changes"]] -.-> R
G -.-> V
| Agent | Does | Model, effort | Tools |
|---|---|---|---|
executor |
Implements one self-contained unit end to end inside assigned files | opus, high |
Read, Grep, Glob, Bash, PowerShell, Edit, Write |
researcher |
Answers one high-volume research question with evidence | sonnet, high |
Everything except Edit, Write, NotebookEdit, Agent (MCP tools included) |
verifier |
Independently checks completed work; returns a verdict | opus, high |
Read, Grep, Glob, Bash, PowerShell |
The policy itself is one short file: rules/orchestration.md.
Needs Claude Code v2.1.251 or later.
As a plugin (recommended). Agents are namespaced as delegate:executor and
so on, and the read-only guard comes with it:
/plugin marketplace add kurcontko/delegate
/plugin install delegate@delegate
As plain files. Copies the agents to ~/.claude/agents/ and the policy to
~/.claude/rules/, for every project, without touching any CLAUDE.md:
git clone https://github.com/kurcontko/delegate
./delegate/install.sh # re-run to update
./delegate/install.sh --uninstallThe installer tracks what it wrote in ~/.claude/.delegate-manifest. It refuses
to replace a file it did not write or one you edited since (--force
overrides), and --uninstall removes only files that still match. An install
made under the old name, fable-orchestrator, is picked up and moved over. This
route does not install the guard hook; see
the guard notes to add it yourself.
For one project only, copy agents/*.md to .claude/agents/ and
rules/orchestration.md to .claude/rules/ in that repo.
/contextlists the three agents under Custom Agents.- While a worker runs,
/tasksshows the model and effort it runs on.
researcher and verifier have no edit tools but keep a shell, because a
verifier has to run tests and a researcher has to read git history. A
PreToolUse hook, scripts/readonly_guard.py, checks every shell command from
those two agents:
- Git is an allow list. Read-only subcommands (
status,log,diff,show,blame, …) run; everything else, includingfetchand anything the guard has never heard of, is denied. - Dependency changes are denied (
npm install,pip install,cargo add,go get, …), also throughuv run,npxand the like. Test runners are left alone. - It is not a sandbox. File writes such as
rmor a redirect, and network calls, cannot be told apart from legitimate work by reading a command line, so for those the rule remains an instruction. - It fails open if
python3is missing, and is best-effort on Windows.
The main conversation and the executor are never affected. Details, limits,
and the hook snippet for plain-file installs: docs/readonly-guard.md.
maxTurns(150 for the executor, 80 for the others) stops a runaway worker. Its output comes back marked partial and the main conversation can resume it.effortin an agent's frontmatter overrides the session's effort level, so workers run athigheven when the session runs lower. Drop the researcher tomediumto cap cost; it will search less.- The executor and verifier run on
opus. To cap cost, lower theirefforttomediumbefore switchingmodeltosonnet: on long coding tasks a stronger model at lower effort tends to cost less per finished task than a weaker one athigh. - An agent's
modelfield beatsCLAUDE_CODE_SUBAGENT_MODEL. Workers leave their configured model only if you setCLAUDE_CODE_SUBAGENT_MODEL_FORCE=1or your organization'savailableModelsallowlist blocks it.opusandsonnetare aliases, so each follows the current model of that tier. - To keep MCP tools away from the researcher, replace its
disallowedToolsline withtools: Read, Grep, Glob, Bash, PowerShell, WebSearch, WebFetch. - The plugin sets no
version, so installs track the latest commit.
evals/ holds a small claude plugin eval suite (needs v2.1.269) that compares
sessions with and without the plugin: quick requests stay inline, high-volume
research goes to the researcher, assessments leave every file untouched, and an
executor hand-off carries a complete packet. Every run is a real model call on
your account. What is covered, what is not, and how to run it:
docs/evals.md.
