Skip to content

Subagents and coding agents

Some work does not belong in the main conversation — a wide codebase search that would flood the context window, or a multi-file refactor that deserves its own agent. The delegateTask tool hands that work off and brings back the result.

There are two delegation backends, and you pick one globally.

Yachiyo runs the subagent itself, using your configured provider. Four named agents, each with a fixed role:

AgentUse it for
ExploreFinding files, searching patterns, understanding how something works. Read-only. Run several in parallel when the modules are independent.
PlanA step-by-step strategy for a complex multi-file change, with the critical files identified.
ReviewA second opinion on uncommitted changes before you commit.
GeneralEditing, running commands, anything the read-only agents cannot do. The fallback.

All four are enabled by default. Which ones are available is set in Settings → Capabilities → Coding agents.

Each worker can run on its own model — Settings → Capabilities → Coding agents has a model selector per worker, defaulting to whatever model is making the call. Read-heavy Explore work on a cheap model while the main conversation stays on a strong one is the obvious use.

The other backend hands the task to an external coding agent over the Agent Client Protocol — Claude Code, Codex, or anything else speaking ACP. The agent runs as its own process with its own model and context, then reports back into the thread.

One profile ships preconfigured for it:

FieldValue
nameClaude Code
commandnpx
args["-y", "@zed-industries/claude-agent-acp"]
env{ "ACP_PERMISSION_MODE": "acceptEdits" }

In ACP mode, delegateTask is unavailable unless the workspace is a git repository. An external agent editing files with no way to diff or revert is not a trade worth making, so the tool refuses rather than degrading quietly.

Terminal window
yachiyo agent mode worker # or: acp
yachiyo agent list # current mode, plus any ACP profiles

ACP profiles take these fields:

FieldTypeNotes
idstringAuto-generated on add
namestringDisplay name
enabledbooleanDisabled profiles stay in config but are not offered
descriptionstringShown in the UI
commandstringExecutable — npx, node, an absolute path
argsstring[]Arguments
envRecord<string,string>Extra environment variables

Full details in the agent CLI reference.

Delegation is a judgement call, not a setting. For small, well-scoped changes the main agent doing the work itself is often faster than writing a task brief good enough for an agent that cannot see your conversation — so just ask for the change directly. If you want the boundary enforced rather than implied, Explore and Chat run modes drop delegateTask from the tool list entirely.