claude-code - 💡(How to fix) Fix [BUG] Thought/Thinking for counter is broken [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#45317Fetched 2026-04-09 08:08:09
View on GitHub
Comments
1
Participants
2
Timeline
6
Reactions
0
Author
Timeline (top)
labeled ×4closed ×1commented ×1

Error Message

Error Messages/Logs

RAW_BUFFERClick to expand / collapse

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?

When we try to use thinking mode with any provider including claude, the thinking for / thought for counter seems to be buggy. It does not reflect the true time it is taking for thinking or it took for the thinking. Instead, everytime you toggle the visibility of the thinking, the counter increments - and this happens across all previous thoughts of the model in current conversation (time in each of the previous thoughts also keeps incrementing everytime you toggle thinking visibility)

What Should Happen?

Thinking for should increment in real time. Thought for should show true time consumed / spent in thinking mode for a particular tool_call or query.

Error Messages/Logs

Steps to Reproduce

  1. Open a new Claude Code session on VSCode
  2. Enable thinking mode
  3. Send a prompt involving some reasoning effort - observe the thinking dropdown.
  4. Toggle the visibility of the thinking process (you will notice that the time for thought keeps incrementing only when you toggle the visibility but it affects all previous thoughts as well)

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

No response

Claude Code Version

2.1.96

Platform

Other

Operating System

macOS

Terminal/Shell

VS Code integrated terminal

Additional Information

https://github.com/user-attachments/assets/73ac0b32-a430-438f-b08c-ad76bcce7ab8

extent analysis

TL;DR

The issue can be addressed by investigating and fixing the logic that updates the thinking time counter when toggling the visibility of the thinking process.

Guidance

  • Review the code that handles the thinking mode and visibility toggling to identify why the counter increments incorrectly.
  • Verify that the time calculation logic is correct and only updates when the thinking process is active.
  • Check for any event listeners or callbacks that might be triggering the incorrect counter updates when visibility is toggled.
  • Consider adding logging or debugging statements to track when and why the counter is being updated.

Example

No specific code snippet can be provided without access to the relevant codebase, but an example of how to debug this issue might involve adding console logs around the counter update logic to see when and why it's being triggered.

Notes

The issue seems to be related to the way the thinking time counter is updated when the visibility of the thinking process is toggled. Without access to the code, it's difficult to provide a more specific fix. The fact that this is a regression suggests that a recent change may have introduced the bug.

Recommendation

Apply a workaround by avoiding toggling the visibility of the thinking process until the underlying issue is fixed, as this seems to trigger the incorrect counter updates.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING