Subagent's first response echoes spawn-time system-reminder fragments and stops with 0 tool calls
Environment
- Claude Code version: 2.1.201
- Platform: macOS (Darwin 24.6.0)
- Subagents spawned via the Agent (Task) tool — both custom agent types (
.claude/agents/*.md) and built-ins, models opus/sonnet
Bug description
Intermittently, a freshly spawned subagent ends its very first assistant turn with zero tool calls, and its final text is an echo of harness-injected boilerplate (system-prompt / system-reminder fragments) instead of any task output. The task prompt is ignored entirely.
We have logged 9 occurrences over two days (2026-07-09 to 2026-07-10) across multiple sessions. In one session, 2 of 3 fresh spawns failed this way. Every occurrence has the exact same signature:
- first spawn of the agent (never on resumed agents),
- exactly one assistant turn,
- zero tool uses,
- final text = verbatim or near-verbatim harness boilerplate.
Examples of echoed content (each occurrence echoed a different fragment)
- The available-agents list:
# Available agents,...subagent types are available,specify a subagent_type parameter... - MCP notice:
The user's request may need one of the following MCP servers to complete. <connected_mcp_servers>... - Auto-memory instructions:
auto-memory files may contain...,check the index MEMORY.md... - Skills notice:
Only the following skills support arguments: ... When passing args to other skills, they will be ignored. - Model/knowledge-cutoff lines:
This session's model knowledge cutoff is January 2026. - Fragments of the subagent's own system prompt
Hypothesis
System-reminder blocks injected at spawn time (skills list, agents list, MCP servers, memory instructions) appear to land in a position where the model treats them as the most recent user message, so it responds to them and stops, instead of executing the task prompt.
Recovery / workaround
- Re-sending the task to the same agent as a follow-up message recovers it every time (8/8 confirmed, 9th in progress) — the agent then executes normally, which suggests the task prompt is present in its context but was outranked on the first turn.
- We now run a
SubagentStophook that detects the structural signature (single assistant turn + 0 tool uses) and blocks the stop with a "perform your original task" reason. Content-based grep detection failed repeatedly because each occurrence echoes a different fragment.
Ask
Investigate spawn-time reminder injection ordering/positioning for subagents. Happy to provide sanitized transcript excerpts of the 9 occurrences.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗