[BUG] Agent view's primary agent `claude` is offered as an Agent tool subagent type, where it's told a job-list classifier reads its output
Preflight
- [x] I have searched existing issues; the closest is #63039 (closed, stale), which asked for
subagent_type: "claude"to be documented. It doesn't question whetherclaudebelongs in the Agent tool at all. - [x] This is a single bug report
- [x] I am using the latest version of Claude Code (2.1.283)
Summary
The built-in claude agent is agent view's primary agent. Jobs dispatched from claude agents without an agent name run as --agent claude, and in the 2.1.283 binary, claude is tied to the agent view feature: it's left out of the built-in agents only when agent view is turned off with the disableAgentView setting or CLAUDE_CODE_DISABLE_AGENT_VIEW. Agent view is on by default, so claude is registered in every session, whether or not agent view is ever opened. Its prompt is the set of conventions those jobs need, and its definition sets appendSystemPrompt, so on the main thread the conventions are appended to Claude Code's full system prompt:
{agentType:"claude",whenToUse:"Catch-all for any task that doesn't fit a more specific agent. FleetView's default when no agent name is typed.",tools:["*"],source:"built-in",baseDir:"built-in",appendSystemPrompt:!0,getSystemPrompt:()=>e}
The Agent tool also offers it as a subagent type, listed first:
- claude: Catch-all for any task that doesn't fit a more specific agent. FleetView's default when no agent name is typed. (Tools: *)
Launched that way, the appendSystemPrompt flag is ignored and the job conventions become the subagent's whole role prompt. They open:
This session is a background job. The user may be live or away — respond naturally either way. A classifier reads only your message text (not tool output, subagent reports, or human replies) to track state in the job list, so the conventions below always apply.
They go on to tell the agent to narrate as it works and to finish with a result: line, "the only completion signal" (or needs input: or failed:). A subagent has no job list and no classifier. The Notes block appended to every subagent says the opposite: "the parent agent reads your text output, not files you create". The subagent is given two conflicting accounts of who reads its final message.
The description shows the same origin. It names "FleetView", agent view's internal name, which means nothing to a model choosing a subagent type.
Reproduction
- In any session on 2.1.283, read the Agent tool's list of agent types.
- Result: the
claudeline quoted above, listed beforegeneral-purpose.
- Point
ANTHROPIC_BASE_URLat a local proxy that logs request bodies, then runclaude -pasking the model to launch two subagents in parallel with the same prompt, one withsubagent_type: "claude"and one withsubagent_type: "general-purpose". The subagent requests carrycc_is_subagent=truein the billing header block.
- Result: the two subagent requests differ only in
system. Every other field matches, includingmessages(which carry CLAUDE.md, the skill listing and the environment) andtools(67, identical). In theclauderequest, the role text is the job conventions quoted above, followed by the standard subagent preamble ("Messages from the agent that launched you …") and the Notes block. In thegeneral-purposerequest, the role text is the general-purpose prompt ("… respond with a concise report covering what was done and any key findings — the caller will relay this to the user …").
- For comparison, capture an interactive
claude --agent claudesession the same way. It must be interactive:claude -p --agent claudedoesn't apply a built-in agent's prompt at all.
- Result: Claude Code's full system prompt, with the same job conventions appended as its final section. This is the context the conventions were written for.
Scope
- Agent view is fine. Jobs dispatched from
claude agentswithout an agent name run--agent claudeon the main thread and get the intended prompt. - The defect is that the Agent tool offers
claudeat all, even though the sub-agents docs currently describe it as a subagent ("a catch-all with every tool available to subagents").
Why this matters
The listing presents claude first, as the catch-all for any task, which is the role general-purpose already fills. A model that picks it gets an agent whose role prompt says a classifier reads its text and that a result: headline is its only completion signal. Capable models follow such text literally, so we'd expect narration and a one-line headline shaped for a job list that isn't there, rather than a report for the calling agent.
We haven't observed damage. No agent in our sessions has chosen claude (0 of about 1,400 Agent launches). We found this while auditing the built-in agent types, and now deny it with "permissions": {"deny": ["Agent(claude)"]}. That removes it from the listing and refuses launches ("Agent type 'claude' has been denied by permission rule 'Agent(claude)' …"). Agent view is unaffected, because its dispatch starts --agent claude processes and main-thread agent selection doesn't check Agent(...) rules.
Expected
claude isn't offered by the Agent tool: it's left out of the tool's list of agent types and can't be launched through it, while it stays agent view's primary agent. The sub-agents docs drop it from the built-in subagents.
Related issues
- #63039 (closed, stale): asked for
subagent_type: "claude"to be documented - #30730 (closed, stale): the Notes block appended to every subagent conflicts with custom agent prompts; same class of problem, where model-facing text assumes a context the agent isn't in
Is this a regression?
I don't know. The claude definition and its job conventions are the same in every build I have installed (2.1.277, 2.1.278, 2.1.282 and 2.1.283), and I captured prompts only on 2.1.283. claude has been launchable through the Agent tool since at least 2.1.153, whose changelog fixes a subagent_type: 'claude' bug.
Environment
- Claude Code: 2.1.283
- OS: macOS 26.4.1 (Darwin 25.4.0)
- Terminal: Terminal.app
- Model: claude-opus-5-5 (session); the captures used claude-sonnet-5 for the parent and both subagents