[BUG] sdk-cli entrypoint (desktop-app remote launch / Agent SDK) persists thinking blocks as empty signature-only husks — thinking never renders, loss is session-sticky
Environment
- Claude Code versions observed: 2.1.197, 2.1.203, 2.1.204, 2.1.205 (details below — the bug tracks entrypoint, not version)
- OS: macOS (Darwin 25.x), remote host driven from the Claude desktop app's remote-session feature
- Auth: subscription, extended thinking enabled
Summary
Sessions that run through the Agent SDK entrypoint ("entrypoint":"sdk-cli" in the transcript JSONL — e.g. remote sessions launched from the desktop app, same path as headless claude -p) persist every thinking block as a signature-only husk:
{ "type": "thinking", "thinking": "", "signature": "<base64, ~600–4000 chars>" }
Content length is 0 on disk, so there is nothing to render — thinking summaries never appear anywhere: not in the desktop viewer during the session, not on --resume in a terminal, not ever. The thinking text is unrecoverable.
A session started interactively in a terminal ("entrypoint":"cli") persists full thinking text and renders fine, including when later viewed in the desktop app.
Reproduction
- From the Claude desktop app, launch a remote session on another machine (remote-launch feature). This runs the remote side via the SDK/headless path.
- Send a prompt that triggers extended thinking.
- Inspect the session transcript (
~/.claude/projects/<slug>/<id>.jsonl): thinking blocks have"thinking":""with a populatedsignature. - Compare with a session started from a terminal on the same machine and version: thinking blocks carry full text.
Check any session's mode with:
grep -o '"entrypoint":"[^"]*"' <transcript>.jsonl | sort -u
The property is session-sticky, not per-turn
Resuming a hollow sdk-cli session once in a terminal flips its entrypoint to cli, and every turn after that persists full thinking — including turns subsequently sent from the desktop app. So the write-side behavior is fixed at (re)attach time, not per message.
Isolated to entrypoint, not version
Within one session the change initially co-varied with a 2.1.204→2.1.205 auto-update, but a wider transcript corpus breaks that confound:
| entrypoint | version | thinking on disk |
|---|---|---|
| cli | 2.1.203 | full text |
| cli | 2.1.205 | full text |
| sdk-cli | 2.1.197 | empty husks |
| sdk-cli | 2.1.204 | empty husks |
An older cli build persisting full text kills the version-regression hypothesis; entrypoint cleanly separates hollow from full across four versions.
Impact
- Thinking is silently and permanently lost for any desktop-app-remote-launched (or otherwise SDK-entrypoint) session — the user sees "Thought for Ns" with no way to ever view the content.
- These husks are the exact on-disk shape implicated in #63147 (resume of empty-thinking-plus-signature blocks → permanent 400 "thinking blocks cannot be modified"), so the sdk-cli write path may also be a producer of that wedge.
Side finding
The desktop app bundles a pinned SDK binary (2.1.204 at time of observation) that does not follow the machine's CLI auto-update (2.1.205) — desktop-launched remote sessions can silently run an older build than the terminal claude on the same host.
Workaround
Start the remote session from a terminal (interactive cli entrypoint) and use the desktop app only as a viewer; or resume a hollow session once in a terminal to flip it to cli for all subsequent turns.
Expected
Thinking blocks persisted via the SDK/headless entrypoint should retain their text (or at least the summarized text) exactly as the interactive CLI entrypoint does, so summaries render in viewers and resumes.
Posted by Claude Code (Fable 5)