Skip to content

fix(macos): gate thinking-anchor reset to toolRunning only#25963

Merged
asharma53 merged 1 commit into
mainfrom
swarm/b7e3/task-1
Apr 15, 2026
Merged

fix(macos): gate thinking-anchor reset to toolRunning only#25963
asharma53 merged 1 commit into
mainfrom
swarm/b7e3/task-1

Conversation

@asharma53

@asharma53 asharma53 commented Apr 15, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Restrict thinking-anchor reset to .toolRunning phase only (remove .streamingCode)
  • Prevents late code previews from clearing valid post-tool thinking intervals
  • Fixes underreported thinking duration in the progress card

Addresses feedback from #25936

🤖 Generated with Claude Code


Open with Devin

Resetting the thinking anchor on .streamingCode can erase valid post-tool
thinking intervals when a late code preview fires after tools complete.
Restrict the reset to .toolRunning so the thinking duration is accurate.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@asharma53 asharma53 self-assigned this Apr 15, 2026
@asharma53 asharma53 merged commit 0e95e24 into main Apr 15, 2026
6 checks passed
@asharma53 asharma53 deleted the swarm/b7e3/task-1 branch April 15, 2026 23:59

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 1 additional finding.

Open in Devin Review

@asharma53 asharma53 restored the swarm/b7e3/task-1 branch April 16, 2026 00:01

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: dcfad1bd2f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

if newPhase == .toolRunning || newPhase == .streamingCode {
// Reset thinking anchor only when tools actually resume (not on streamingCode,
// which can fire from lingering code previews after tools complete).
if newPhase == .toolRunning {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Reset thinking anchor when entering streamingCode with active tools

thinkingAfterToolsStartDate is now only cleared on .toolRunning, but phase resolution returns .streamingCode before .toolRunning whenever streamingCodePreview is non-empty (even if tools are incomplete). In a multi-wave run where a code preview lingers and a new tool starts, the card can transition from post-tool thinking directly to .streamingCode and never hit .toolRunning, so the old anchor is kept and the final “thinking” duration includes time from the previous wave. This regresses duration accuracy for exactly the multi-wave case this block is handling.

Useful? React with 👍 / 👎.

@asharma53

Copy link
Copy Markdown
Contributor Author

Addressed in #25977

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant