[BUG] Tool results echo task name "Warmup" instead of executing, agent loops 1700+ times

Resolved 💬 4 comments Opened Jan 8, 2026 by sequoiayoav Closed Jan 12, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

When Claude Code spawns a subagent (sidechain), the tool execution layer returns the task description string as the tool_result instead of actually executing the tool and returning its output. This causes the agent to loop indefinitely, unable to make progress.

In my case, the task was "Warmup" and every tool call (Bash, Glob, Read) received "Warmup" as the result. The agent attempted 1,794 identical Glob calls over 2+ hours before the API key expired.

What Should Happen?

Tool calls from subagents should execute normally and return actual output (file listings, command results, file contents, etc.).

Error Messages/Logs

Tool result analysis from agent log:
Total tool_result entries: 1819
  - "Warmup": 1818
  - "<tool_use_error>File does not exist.</tool_use_error>": 1

  Sample sequence (lines 18-30):
  [18] assistant  tool: Glob -> {"pattern": "*", "path": "/home/ubuntu/remy"}
  [19] user       result: "Warmup"
  [20] assistant  tool: Glob -> {"pattern": "*", "path": "/home/ubuntu/remy"}
  [21] user       result: "Warmup"
  [22] assistant  tool: Glob -> {"pattern": "*", "path": "/home/ubuntu/remy"}
  [23] user       result: "Warmup"
  ... (repeated 1794 times)

Steps to Reproduce

Uncertain of exact trigger, but context:

  1. Started Claude Code session on /home/ubuntu/remy
  2. Gave task: "fix authorization escaping in system prompt"
  3. Claude Code spawned subagent with task "Warmup"
  4. Subagent's tool calls all returned "Warmup" instead of real output
  5. Agent looped until API key expired (~2 hours)

Key indicators in logs:

  • userType: "external"
  • isSidechain: true
  • All tool_result content = task description string

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.1

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

iTerm2

Additional Information

_No response_

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗