Skip to content

Commit 4752971

Browse files
phase3devclaude
andcommitted
docs: server-side x-cc-atis experiment blanks Opus 4.8 summaries (2026-07-07)
On claude-opus-4-8 only, a remote experiment assignment cached in ~/.claude.json (experimentKey claude_code_attic_parcel_experiment) is sent as an x-cc-atis request header, and with it present the API returns thinking blocks with a valid signature and an empty thinking string even when the request carries display:"summarized". The launcher's flag injection cannot override it; single-variable A/B runs (header stripped in flight, and assignment purged + DISABLE_GROWTHBOOK=1) restore populated summaries. - README: dated warning in the workaround list, full 2026-07-07 update section (scope, effect on the fix, expectations, verified two-step mitigation, status), troubleshooting entry, compatibility note - TECHNICAL: full mechanism + evidence section, historical note scoping the pre-2.1.202 root cause, base-URL-proxy replication warning (also noted on Option 3) - fixes/thinking-summaries + launcher docs/headers: limitation notes - No behavior changes; launcher edits are header comments only Upstream: anthropics/claude-code#63358 (background); dedicated issue pending. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent df322bc commit 4752971

6 files changed

Lines changed: 230 additions & 3 deletions

File tree

‎README.md‎

Lines changed: 96 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,18 @@ Not affiliated with or endorsed by Anthropic. A future Claude Code update could
66

77
## Workarounds
88

9-
1. **Empty thinking summaries (Opus 4.7 / 4.8)** [updated 2026-06-10].
9+
1. **Empty thinking summaries (Opus 4.7 / 4.8)** [updated 2026-07-07].
1010
Thinking summaries render empty in the VS Code extension and headless `-p`/SDK paths, even with `showThinkingSummaries` enabled. Fix via the launcher (recommended), a one-line extension patch, or a local proxy.
1111
-> [details](#workaround-1-thinking-summaries)
1212

13+
> **2026-07-07 - new Opus 4.8 regression, upstream and server-side.** On
14+
> `claude-opus-4-8` only, the API now returns an empty summary even when the
15+
> request correctly asks for one, so the launcher's flag is no longer sufficient
16+
> on that single model. It is gated on an experiment-assignment header the CLI
17+
> sends. Every other model is unaffected and the launcher remains the fix for
18+
> them. There is a mitigation.
19+
> -> [2026-07-07 update](#2026-07-07-update-opus-48-and-the-experiment-header)
20+
1321
<img alt="A populated Thinking summary in the VS Code chat instead of an empty block" src="media/thinking.png" style="max-width: 100%; height: auto;">
1422

1523
2. **Missing context-usage icon (1M context window)** [updated 2026-06-10].
@@ -87,6 +95,91 @@ Extended-thinking summaries stopped appearing with Opus 4.7 and remain unavailab
8795
* <https://github.com/anthropics/claude-code/issues/49322>
8896
* <https://github.com/anthropics/claude-code/issues/63358>
8997

98+
## 2026-07-07 update: Opus 4.8 and the experiment header
99+
100+
**What changed.** On 2026-07-07 thinking summaries on `claude-opus-4-8` went
101+
from populated to empty mid-day with no client change involved: the same CLI
102+
binary produced multi-thousand-character summaries in one session and 0-char
103+
summaries in the next. The cause is server-side and request-provable. Claude
104+
Code's built-in feature-flag client cached a new experiment assignment in
105+
`~/.claude.json`:
106+
107+
```json
108+
"experimentKey": "claude_code_attic_parcel_experiment",
109+
"atis": "attic-parcel-meridian"
110+
```
111+
112+
The CLI attaches that value to every first-party API request as an `x-cc-atis`
113+
header. With the header present, the API returns Opus 4.8 thinking blocks with
114+
a valid `signature` and an **empty** `thinking` string - even when the request
115+
explicitly carries `thinking: {type: "adaptive", display: "summarized"}`.
116+
Strip the header (or purge the cached assignment) and the byte-identical
117+
request returns populated summaries. Full evidence and the single-variable
118+
A/B runs are in [TECHNICAL.md](TECHNICAL.md#2026-07-07-update-server-side-experiment-blanks-opus-48-summaries).
119+
120+
**Scope.**
121+
122+
* Affected model: `claude-opus-4-8` only (all alias spellings, with and without
123+
`[1m]`). In the same test matrix, Opus 4.7, Sonnet 5, Haiku 4.5, and Fable 5
124+
returned populated summaries.
125+
* Affected surfaces: all of them - the header is attached in the CLI's shared
126+
fetch layer (verified on headless `-p` and the VS Code extension path; the
127+
interactive TUI uses the same layer).
128+
* Affected installs: only those whose `~/.claude.json` carries the assignment.
129+
No `atis` entry in the config means not enrolled (yet); assignment arrives
130+
through the client's periodic remote feature refresh.
131+
132+
**Effect on this repo's fix.** The launcher's `--thinking-display summarized`
133+
injection addresses the original, client-side gap and still does exactly that.
134+
It cannot help here: the request already asks for summaries correctly and the
135+
server withholds the text anyway. On Opus 4.8, with the assignment cached,
136+
summaries stay empty **with or without** the launcher. (Separately, extension
137+
`2.1.202`+ now maps `showThinkingSummaries` into the launch flags itself, so on
138+
current builds the launcher's thinking injection is a redundant no-op there;
139+
its no-double-inject guard makes that harmless, and the launcher's other fixes
140+
are unaffected.)
141+
142+
**What to expect.** Populated summaries on every model except Opus 4.8; on
143+
Opus 4.8, empty "Thinking" sections whenever the assignment is cached. The
144+
reasoning still runs and still consumes tokens - only the human-readable text
145+
is withheld. Because assignment is remote and server-evaluated, Anthropic can
146+
widen, narrow, or end this at any time without any version changing on your
147+
machine.
148+
149+
**Mitigation (verified 2026-07-07).** Two steps, both required - the env var
150+
alone is not enough (the cached value is still sent; measured), and the purge
151+
alone lasts only until the next feature refresh re-enrolls you:
152+
153+
```sh
154+
# 0) Diagnose: is this install enrolled? (empty output = not enrolled)
155+
jq '.clientDataCacheSlots // {} | to_entries
156+
| map(select(.value.data.atis != null) | .value.data | {experimentKey, atis})' \
157+
~/.claude.json
158+
159+
# 1) Purge the cached assignment (backup first)
160+
cp ~/.claude.json ~/.claude.json.bak-cc-workarounds
161+
jq '.clientDataCacheSlots |= (if . then with_entries(select(.value.data.atis == null)) else . end)
162+
| del(.clientDataCache.atis)' \
163+
~/.claude.json > ~/.claude.json.tmp && mv ~/.claude.json.tmp ~/.claude.json
164+
165+
# 2) Prevent re-assignment on the next feature refresh
166+
export DISABLE_GROWTHBOOK=1 # set wherever Claude Code launches: shell profile,
167+
# or VS Code's claudeCode.environmentVariables
168+
```
169+
170+
Then reload the VS Code window. Caveats: `DISABLE_GROWTHBOOK=1` opts the
171+
install out of Claude Code's client-side feature gating entirely (no other side
172+
effects observed so far, but they are possible); on Windows the file is
173+
`%USERPROFILE%\.claude.json` - if `jq` is unavailable, hand-edit the slot
174+
entries containing `"atis"` out of `clientDataCacheSlots`.
175+
176+
**Status.** Undocumented upstream: no CHANGELOG entry through `2.1.204`
177+
mentions it, and there was no notice, no opt-in, and no documented opt-out. The
178+
documented `showThinkingSummaries` setting is silently overridden while the
179+
assignment is active. Background thread:
180+
<https://github.com/anthropics/claude-code/issues/63358>. Dedicated upstream
181+
issue for this finding: pending (link will be added here once filed).
182+
90183
There are technically three workarounds; only the launcher is maintained:
91184

92185
1. **Launcher (recommended).** A small wrapper that launches Claude Code and adds the missing flag. It fixes the VS Code extension and headless CLI, and it survives Claude Code updates.
@@ -295,6 +388,7 @@ Setup is otherwise identical to Option 1. This is unrelated to the fixes above.
295388

296389
## Troubleshooting
297390

391+
* Summaries suddenly empty again, but only on Opus 4.8 (since 2026-07-07): the launcher is not broken and neither is your setup - your install is likely enrolled in a server-side experiment that blanks Opus 4.8 summaries at the API. No launch flag can override it. Diagnose and mitigate per the [2026-07-07 update](#2026-07-07-update-opus-48-and-the-experiment-header).
298392
* Thinking still empty after setup: Reload the VS Code window after changing the setting. Confirm the setting points to the launcher's full absolute path. On Windows, confirm the path uses double backslashes.
299393
* Context icon still missing after setup: It may take two reloads the first time (see the first-run note above). Confirm `CC_PATCH_CONTEXT_ICON` is not set to `0` and `CC_WORKAROUNDS` is not set to `0`.
300394
* `could not find the real 'claude' binary`: Set `CLAUDE_REAL_BIN` to its full path. Use `which claude` on Linux/macOS or `where claude` on Windows.
@@ -336,7 +430,7 @@ pkg launcher/claudemax.win.js --targets node18-win-x64 --output claudemax.exe
336430

337431
Confirmed on Opus 4.7 and Opus 4.8 with VS Code extension builds `2.1.169` through `2.1.172` (native-binary CLI), via the `claudeCode.claudeProcessWrapper` setting, on Windows 11 and Ubuntu 24.04.
338432

339-
* **Thinking fix:** earlier builds (`2.1.165` / `2.1.167`) signaled thinking with `--thinking adaptive`; `2.1.169` and later use `--max-thinking-tokens` on the VS Code path. The launcher keys off either, plus `-p`/`--print` for headless. The `--thinking-display` flag and the request field are stable levers; the Option 2 minified strings can change between releases (the script matches generically and skips if not found).
433+
* **Thinking fix:** earlier builds (`2.1.165` / `2.1.167`) signaled thinking with `--thinking adaptive`; `2.1.169` and later use `--max-thinking-tokens` on the VS Code path. The launcher keys off either, plus `-p`/`--print` for headless. The `--thinking-display` flag and the request field are stable levers; the Option 2 minified strings can change between releases (the script matches generically and skips if not found). **2026-07-07:** extension `2.1.202`+ maps `showThinkingSummaries` into the launch flags itself (the launcher's injection becomes a harmless no-op there), and on `claude-opus-4-8` a server-side experiment can blank summaries regardless of the flag - see the [2026-07-07 update](#2026-07-07-update-opus-48-and-the-experiment-header). The flag remains correct and sufficient for other models and for un-enrolled installs.
340434
* **Context-icon fix:** the `>50% used` gate has been observed with different minified names (`Z/U` in `2.1.108` and `2.1.131`, `t/c` in `2.1.170` and `2.1.172`). The patch matches the guard-pair shape with variable-name captures and records the matched names in its ownership marker, so it patches and reverts cleanly regardless of the names; if a future build changes the guard shape itself, the launcher safely no-ops and the anchor needs updating.
341435
* **Markdown copy/export fix:** the copy controls are appended to the webview bundle and re-applied each launch. The injection is anchored on stable structural markers and skips cleanly if the bundle shape changes.
342436

‎TECHNICAL.md‎

Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
Full root-cause analysis and design notes behind the workarounds in the [README](README.md).
44

55
* [Workaround 1: empty thinking summaries](#workaround-1-empty-thinking-summaries)
6+
* [2026-07-07 update: server-side experiment blanks Opus 4.8 summaries](#2026-07-07-update-server-side-experiment-blanks-opus-48-summaries)
67
* [Workaround 2: missing context-usage icon](#workaround-2-missing-context-usage-icon)
78

89
Both fixes live in one launcher per platform (`launcher/claudemax` and `launcher/claudemax.win.js`), each fix independently switchable by an environment variable (see [`launcher/README.md`](launcher/README.md) for the toggle table). The node launcher compiles to a single `claudemax.exe` with `pkg` - one binary per platform carrying every fix, down from one exe per fix. The standalone per-fix tools under `fixes/` cover the non-launcher delivery paths.
@@ -19,8 +20,21 @@ The Messages API `thinking.display` field decides whether summarized thinking is
1920

2021
There is no raw/full thinking mode: the only valid `display` values are `"summarized"` and `"omitted"`.
2122

23+
> **2026-07-07:** a second, unrelated mechanism now exists that blanks Opus 4.8
24+
> summaries **even when the request carries `display: "summarized"`** - a
25+
> server-side experiment keyed on an `x-cc-atis` request header. The flag below
26+
> remains necessary-and-sufficient everywhere else, but cannot override that
27+
> experiment. See [the 2026-07-07 update](#2026-07-07-update-server-side-experiment-blanks-opus-48-summaries).
28+
2229
## Root cause (from the installed CLI)
2330

31+
> **Historical note (added 2026-07-07):** the analysis in this section
32+
> describes builds up to `2.1.201`. As of extension `2.1.202` the extension
33+
> maps `showThinkingSummaries` into `--thinking-display` itself (the string
34+
> `"summarized"` now appears in `extension.js`), closing the client-side gap
35+
> below upstream. Kept for reference and for older builds; the launcher's
36+
> no-double-inject guard makes it a harmless no-op on fixed builds.
37+
2438
The request builder inside the CLI picks `display` like this (function names from a native-installer 2.1.x binary; logic is the same across install types):
2539

2640
```js
@@ -116,6 +130,8 @@ Toggle idea (untested): changing the line to `l.display || (process.env.CC_THINK
116130
### Option 3: local proxy (design)
117131
118132
> **Unmaintained and untested.** A design and a working starting point, not a turnkey fix; it sits in the path of your live auth token. The launcher (Option 1) is the supported fix.
133+
>
134+
> **2026-07-07:** on current builds, overriding `ANTHROPIC_BASE_URL` makes the CLI build a *different* request (it detects a non-first-party base URL), so this proxy is no longer a byte-faithful passthrough - see the [replication warning](#replication-warning-base-url-proxies-change-the-request).
119135
120136
The most thorough fix: a small localhost forward proxy that injects the field at the wire level, so it is surface-agnostic (VS Code + CLI + SDK), needs no install edits, and survives updates. It works because every Claude Code surface resolves the API host as:
121137
@@ -151,6 +167,109 @@ Status: provided as a working starting point but not extensively tested, so vali
151167

152168
Confirmed on Opus 4.7 / 4.8 with VS Code extension `2.1.169` (native-binary CLI), via the `claudeCode.claudeProcessWrapper` setting, on Windows 11 and Ubuntu 24.04; earlier confirmations were on `2.1.165` / `2.1.167` (which signaled thinking with `--thinking adaptive`). The CLI flag and the request field are stable levers, but the exact minified strings used by [`patch-extension.sh`](fixes/thinking-summaries/patch-extension.sh) (Option 2) can change between extension releases (e.g. the array variable `B` -> `q`); the script matches the variable generically and, if the surrounding pattern isn't found, skips and tells you to inspect manually. Options 1 and 3 don't depend on internal strings.
153169

170+
**2026-07-07:** on `claude-opus-4-8` only, a server-side experiment can blank summaries regardless of the flag; see the next section. The flag remains correct and sufficient for other models and for installs not carrying the assignment.
171+
172+
## 2026-07-07 update: server-side experiment blanks Opus 4.8 summaries
173+
174+
A second, independent mechanism, discovered 2026-07-07 (times below are HST,
175+
UTC-10). It is unrelated to the client-side `display` gap above: here the
176+
request provably carries `display: "summarized"` and the server withholds the
177+
summary text anyway - on exactly one model.
178+
179+
### Symptom and timeline
180+
181+
* Same machine, same account, same CLI binary (`2.1.202` native): sessions
182+
through 19:12 returned multi-thousand-character summaries on Opus 4.8;
183+
the next session at 19:58 and everything after returned `thinking` strings of
184+
length 0 with valid signatures. No client component changed in between
185+
(`2.1.203`/`2.1.204` behave identically; version-chasing was a red herring).
186+
* Claude Code's feature-flag client (a remote-eval gating client refreshed at
187+
session start and on a 6-hour timer) cached a new experiment assignment in
188+
`~/.claude.json` at **19:12:18** - the exact break boundary:
189+
190+
```json
191+
"experimentKey": "claude_code_attic_parcel_experiment",
192+
"atis": "attic-parcel-meridian"
193+
```
194+
195+
### Mechanism (from the 2.1.204 native binary)
196+
197+
The cached value is read back and attached as a request header on every
198+
first-party API call, in the CLI's shared fetch wrapper (all surfaces):
199+
200+
```js
201+
Yvi = "x-cc-atis"
202+
function Xvi(){ let e = cL()?.atis; return typeof e === "string" && e.length > 0 ? e : void 0 }
203+
// fetch wrapper, first-party path:
204+
if (o) { let m = Xvi(); if (m !== void 0) a.set(Yvi, m) }
205+
// cL() reads clientDataCacheSlots / clientDataCache from ~/.claude.json
206+
```
207+
208+
With `x-cc-atis: attic-parcel-meridian` present, the API returns Opus 4.8
209+
thinking blocks with a valid `signature` and an empty `thinking` string. The
210+
reasoning still runs and still consumes tokens; only the text is withheld.
211+
212+
### Evidence (single-variable A/B, one binary `2.1.204`, one account, minutes apart)
213+
214+
Request body in every run below carried `thinking: {type: "adaptive", display: "summarized"}`
215+
(wire-observed through a local forwarder that logged only the body's `model` +
216+
`thinking` fields and response thinking lengths - never headers):
217+
218+
| Run | `x-cc-atis` on the wire | Opus 4.8 `thinking` length |
219+
| --- | --- | --- |
220+
| Direct, assignment cached | yes | **0** (sig present; repeated: sig 512/540/564/836) |
221+
| Identical request, header stripped in flight | no | **226** |
222+
| Assignment purged from config + `DISABLE_GROWTHBOOK=1`, direct-shape request | no (verified) | **65** |
223+
| `DISABLE_GROWTHBOOK=1` alone (cache not purged) | yes | **0** |
224+
225+
Model scope, same flags, same account, direct path: Opus 4.7 -> 179 chars,
226+
Sonnet 5 -> 253, Haiku 4.5 -> 528, Fable 5 -> populated (VS Code path), Opus
227+
4.8 -> 0. All Opus 4.8 alias spellings (`opus`, `[1m]` variants) behave the
228+
same. Transport was ruled out (HTTP/1.1 and HTTP/2 upstream legs, and
229+
`accept-encoding` forwarded verbatim, all behave the same once the header is
230+
controlled for).
231+
232+
### Why no launch flag or env var can override it
233+
234+
* The flag path is intact: `--thinking-display summarized` still lands in the
235+
request (`display` is wire-confirmed present). The server ignores it while
236+
the header is present, so argument injection - this repo's Option 1 - cannot help.
237+
* On first-party auth the CLI hard-forces `thinking.type: "adaptive"` for
238+
Opus 4.8 (capability-gated; the only override hook is a server-rejection
239+
retry), and the `ANTHROPIC_*_SUPPORTED_CAPABILITIES` override envs are
240+
disabled on first-party. There is no request shape the client can be
241+
configured into that avoids the behavior.
242+
* `DISABLE_GROWTHBOOK=1` stops future refreshes but the already-cached value is
243+
still read and sent (measured above), hence the two-step mitigation.
244+
245+
### Replication warning: base-URL proxies change the request
246+
247+
`ANTHROPIC_BASE_URL` pointing anywhere but `api.anthropic.com` flips an
248+
internal "first-party base URL" check, and the CLI then builds a *different*
249+
request: different system-prompt sections, no `x-client-request-id`, **no
250+
`x-cc-atis`**, and a separate feature-eval context that (currently) does not
251+
carry the assignment. A naive forwarding proxy therefore appears to "fix" Opus
252+
4.8 without doing anything - the client simply stopped sending the trigger. Set
253+
`_CLAUDE_CODE_ASSUME_FIRST_PARTY_BASE_URL=1` if you need the CLI to build the
254+
real first-party request shape through a local forwarder. (This also means
255+
Option 3 below is not the byte-faithful passthrough its design assumed on
256+
current builds.)
257+
258+
### Mitigation
259+
260+
See the [README's 2026-07-07 update](README.md#2026-07-07-update-opus-48-and-the-experiment-header)
261+
for the verified two-step mitigation (purge the cached assignment, then launch
262+
with `DISABLE_GROWTHBOOK=1`) and its caveats. Server-side assignment can be
263+
widened, narrowed, or ended by Anthropic at any time without a client update.
264+
265+
### Status
266+
267+
Undocumented: no CHANGELOG entry through `2.1.204`, no notice, no opt-in, no
268+
documented opt-out; the documented `showThinkingSummaries` setting is silently
269+
overridden while the assignment is active. Background:
270+
<https://github.com/anthropics/claude-code/issues/63358>. Dedicated upstream
271+
issue: pending (link will be added here once filed).
272+
154273
---
155274
156275
# Workaround 2: missing context-usage icon

‎fixes/thinking-summaries/README.md‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,16 @@ section otherwise renders empty in the VS Code extension and in headless `-p` /
77
SDK runs. The fix injects `--thinking-display summarized` into the launch args -
88
the one lever that is not interactivity-gated. It edits no files.
99

10+
> **2026-07-07 limitation:** on `claude-opus-4-8` only, a server-side
11+
> experiment (an `x-cc-atis` request header sourced from a cached assignment in
12+
> `~/.claude.json`) blanks summaries even when the request carries
13+
> `display: "summarized"`, so this fix cannot restore them there. Other models
14+
> and un-enrolled installs are unaffected. Diagnosis and mitigation:
15+
> [README 2026-07-07 update](../../README.md#2026-07-07-update-opus-48-and-the-experiment-header);
16+
> mechanism: [TECHNICAL.md](../../TECHNICAL.md#2026-07-07-update-server-side-experiment-blanks-opus-48-summaries).
17+
> Also note extension `2.1.202`+ maps `showThinkingSummaries` into the launch
18+
> flags itself, so on current builds this injection is a harmless no-op.
19+
1020
## Standalone usage
1121

1222
The launcher (option 1) is what most people want. These standalone tools cover

0 commit comments

Comments
 (0)