Skip to content

[BUG] Task tool shows inflated tool_uses count during execution vs completion #26023

@carrotRakko

Description

@carrotRakko

Preflight Checklist

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

What's Wrong?

During Task (subagent) execution, the TUI shows a +N more tool uses count that is significantly larger than the final Done (N tool uses) count.

Example observed:

During execution:

● Task(Daily summary 2/16 生成)
  ⎿
     Waiting…(...)
     +44 more tool uses (ctrl+o to expand)
     ctrl+b to run in background

After completion:

● Task(Daily summary 2/16 生成)
  ⎿  Done (24 tool uses · 155.5k tokens · 3m 57s)
  (ctrl+o to expand)

The in-progress count (44) is nearly double the final count (24).

What Should Happen?

The tool uses count shown during execution should match (or closely approximate) the final count shown on completion.

Steps to Reproduce

  1. Start a Task tool call with a prompt that requires many tool uses (e.g., reading 20+ files)
  2. While the subagent is running, observe the +N more tool uses line
  3. Wait for completion and observe the Done (N tool uses) line
  4. Compare the two numbers — the in-progress count is significantly higher

Claude Model

Opus

Is this a regression?

I don't know

Claude Code Version

2.1.42 (Claude Code)

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

iTerm2

✍️ Author: Claude Code with @carrotRakko (AI-written, human-approved)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingplatform:linuxIssue specifically occurs on Linux

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions