pub const DEFAULT_AGENTS: &[EmbeddedAgent];Expand description
The 33-agent dispatchable default roster, embedded at compile time
(Slice E3, #2958, plus pm added for #3437 and ticketing for #4027):
tcode’s original 3 defaults plus pm plus the 29 tm roster agents. The 5
BASE-* extends templates in EMBEDDED_TM_AGENT_SOURCES are
deliberately NOT entries here — they are extends-sources only, never
dispatchable — and trusty-mpm’s own engineer agent is excluded from the
roster upstream (#2958’s roster decision) precisely because it would
collide with tcode’s engineer below;
assets::tests::no_name_collisions_across_the_33_agent_roster pins that
no collision exists in the final table.
Why: gives agents::load_all_agents’s embedded-fallback branch a fixed,
ordered table to parse when the disk .claude/agents/ directory is empty
or absent. pm specifically fixes #3437: task::protocol::task_run
defaults an omitted agent_name to the literal "pm"
(task/protocol.rs), which resolved against NEITHER a disk
~/.claude/agents/pm.md NOR this table before #3437 — so every
daemon-default (including every GUI-initiated, agent-name-omitting) run
failed agent resolution before a single turn executed.
What: engineer (general implementation, full read/write tool set),
qa-agent (verification — read/inspect/run only, no write_file/edit,
hands bugs back to the engineer rather than fixing them), code-reviewer
(adversarial, read-only review, no bash), pm (orchestrator/default —
delegates when delegate_to_agent is available, executes directly
otherwise; see assets/agents/pm.md) — all four EmbeddedAgent::Direct.
Then the 29 EmbeddedAgent::Composed roster agents, alphabetical,
matching EMBEDDED_TM_AGENT_SOURCES’s roster ordering. Four of them
(qa, code-critic, code-analyzer, web-qa) carry a tcode-only
restrictive tools: override in their .md source — see this module’s
“Tools-restriction deviation” doc section above.
Test: assets::tests::default_agents_parse_and_names_match,
assets::tests::base_templates_are_never_dispatchable,
assets::tests::no_name_collisions_across_the_33_agent_roster,
assets::tests::ticketing_is_dispatchable_for_cross_product_delegation,
assets::tests::restricted_reviewer_agents_carry_read_only_tools,
assets::tests::documentation_and_research_remain_unrestricted,
assets::tests::default_task_run_agent_resolves_against_default_agents,
assets::tests::every_embedded_agent_model_normalizes_to_a_valid_slug.