claude-code - 💡(How to fix) Fix [BUG] Thinking text empty / "Thought for Xs" not expandable on Opus 4.7+ in VS Code extension — fallback thinking-config branch omits `display`

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…

In the VS Code extension, the "Thought for Xs" label is not expandable and shows no thinking text when using an Opus model (4.7 / 4.8). Only durationMillis comes back; the thinking content itself is empty. The same session on Sonnet shows thinking text correctly, which is the tell that this is model-dependent rather than a general breakage.

Root Cause

The extension's thinking-config builder has a fallback branch that constructs the config without a display field. In the current minified bundle it looks structurally like:

// fallback branch — note: no `display`
PB = s0 === 0 ? { type: "disabled" } : { type: "enabled", budgetTokens: s0 };

…whereas the switch…case "enabled" branch does carry it (display: K0.display). Downstream, the CLI flag is only pushed when display is truthy:

if (... && L.display) p.push("--thinking-display", L.display);

So via the fallback branch, --thinking-display is never passed. The server-side default for display on Opus models appears to be omitted (Sonnet appears to default to summarized), so on Opus the thinking content is stripped — which is why this only reproduces on Opus.

(Minified identifiers PB/s0 are from one local 2.1.154 build and drift between versions; the structural pattern is the stable part.)

Code Example

// fallback branch — note: no `display`
PB = s0 === 0 ? { type: "disabled" } : { type: "enabled", budgetTokens: s0 };

---

if (... && L.display) p.push("--thinking-display", L.display);

---

PB = s0 === 0 ? { type: "disabled" } : { type: "enabled", budgetTokens: s0, display: "summarized" };
RAW_BUFFERClick to expand / collapse

Summary

In the VS Code extension, the "Thought for Xs" label is not expandable and shows no thinking text when using an Opus model (4.7 / 4.8). Only durationMillis comes back; the thinking content itself is empty. The same session on Sonnet shows thinking text correctly, which is the tell that this is model-dependent rather than a general breakage.

Environment

  • Extension: anthropic.claude-code 2.1.154 (also reproduces on 2.1.143/2.1.145), win32-x64
  • OS: Windows 10
  • Model: Claude Opus 4.8 (claude-opus-4-8); also seen on Opus 4.7
  • prefersReducedMotion: true set globally (not related to the cause)

Steps to reproduce

  1. Select an Opus model (4.7 or 4.8) in the VS Code extension.
  2. Send any prompt that triggers extended thinking.
  3. Observe the "Thought for Xs" label appears but is not clickable / has no expandable thinking content.
  4. Switch to a Sonnet model and repeat → thinking text appears and expands normally.

Expected

The "Thought for Xs" label is expandable and shows the summarized thinking, regardless of model.

Actual

On Opus, the label is inert and the thinking payload is empty (only the duration survives).

Root cause

The extension's thinking-config builder has a fallback branch that constructs the config without a display field. In the current minified bundle it looks structurally like:

// fallback branch — note: no `display`
PB = s0 === 0 ? { type: "disabled" } : { type: "enabled", budgetTokens: s0 };

…whereas the switch…case "enabled" branch does carry it (display: K0.display). Downstream, the CLI flag is only pushed when display is truthy:

if (... && L.display) p.push("--thinking-display", L.display);

So via the fallback branch, --thinking-display is never passed. The server-side default for display on Opus models appears to be omitted (Sonnet appears to default to summarized), so on Opus the thinking content is stripped — which is why this only reproduces on Opus.

(Minified identifiers PB/s0 are from one local 2.1.154 build and drift between versions; the structural pattern is the stable part.)

Suggested fix

Set display explicitly in the fallback branch instead of relying on the per-model server default, e.g.:

PB = s0 === 0 ? { type: "disabled" } : { type: "enabled", budgetTokens: s0, display: "summarized" };

Verified locally: adding display:"summarized" to that branch restores the expandable thinking text on Opus 4.8. Valid values for the flag are summarized and omitted.

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

claude-code - 💡(How to fix) Fix [BUG] Thinking text empty / "Thought for Xs" not expandable on Opus 4.7+ in VS Code extension — fallback thinking-config branch omits `display`