[FEATURE] Add opt-out config for thinking block clearing on idle session resume

Resolved 💬 4 comments Opened Apr 26, 2026 by tsobczynski Closed Jun 18, 2026

Preflight Checklist

  • [x] I have searched existing requests and this feature hasn't been requested yet
  • [x] This is a single feature request (not multiple features)

Problem Statement

The April 23 postmortem confirmed that clearing thinking blocks from sessions idle for over an hour was the intended design of the March 26 change — the bug was only in the implementation (clearing every turn rather than once). Now that the implementation bug is fixed, the design itself deserves scrutiny as a separate concern.

What the design does (when working correctly)

On session resume after ≥1 hour of idle time, Claude Code sends clear_thinking_20251015 with keep:1, discarding prior thinking history before the first post-resume request. The stated rationale is reducing resume latency and uncached token cost, because the prompt cache has already been evicted.

Why this is a problem even when it works as intended

1. Cache TTL is an infrastructure artifact, not a workflow signal.
Whether a session is "stale" is a semantic judgment that the user is best positioned to make. A 1-hour wall-clock idle threshold reflects Anthropic's cache eviction policy, not the user's intent. Pausing for a meeting, a meal, or overnight does not make the reasoning context obsolete.

2. The cost-saving tradeoff is made unilaterally.
Clearing thinking history saves the user some uncached token cost at resume. But that savings comes at the price of cold-starting the model's reasoning chain — the model loses provenance for why it made earlier edits and tool calls. Whether that tradeoff is worthwhile depends on the nature of the work. For complex, multi-session engineering tasks, preserving continuity is vital. Users are not given the choice.

3. "Resuming full reasoning history" does not restore what was cleared.
Post-resume turns accumulate new thinking history normally, but the reasoning record for pre-pause work is gone. The model cannot reason about why it made prior choices. This is a meaningful capability loss for work that spans a break.

4. No user visibility, no opt-out.
There is no notification that thinking history was cleared on resume. There is no setting to disable the behavior. Users have no way to detect or prevent it. This is a transparency failure independent of the quality impact.

Proposed Solution

Critical request:

Add a config option (e.g. clearThinkingOnIdleResume: false) to opt out of idle thinking clearing entirely. This applies to Claude Code, Claude Agent SDK, and Cowork — all three were identified in the postmortem as affected by the same underlying mechanism. If affected, it should also apply to Claude Chat.

Suggested optimizations (nice to have):

  • Surface a visible notice on resume when thinking history has been cleared, so users know the reasoning chain has restarted
  • Consider exposing the idle threshold as a configurable value for users who want the optimization but at a longer window

Alternative Solutions

Relationship to #42796

Issue #42796 established empirically that thinking continuity is vital for complex session quality. This issue is a narrower, design-level follow-on: not a request to change the default behavior, but to give users an opt-out and visibility into when it occurs.

Priority

High - Significant impact on productivity

Feature Category

Configuration and settings

Use Case Example

Scenario 1: Interrupted deep work
An engineer is mid-session on a complex refactor — Claude has reasoned across dozens of files, built up context about why certain architectural choices were made, and is tracking several interdependent edits. The engineer steps away for a one-hour meeting. On return, they resume the session, unaware that the reasoning history has been silently cleared. Claude proceeds but has lost provenance for its earlier decisions. The session produces subtly wrong results that are harder to diagnose because the reasoning trail is gone.

Scenario 2: Deliberate problem incubation
A thoughtful engineer hits a thorny design problem and intentionally sets it aside to think over lunch — a normal part of careful engineering. They return in the afternoon and resume, expecting continuity. Instead, the session has been silently degraded: Claude no longer knows why it was considering the approaches it was. The user has no indication this happened and loses time re-establishing context that already existed.

Scenario 3: Cowork parallel tasking
A Cowork user kicks off a complex, multi-step operation and steps away to focus on parallel work while it runs. The session pauses mid-operation on a permissions dialog. By the time they circle back and approve, the idle threshold has been crossed and the session resumes with cleared thinking history — silently, with no indication that the reasoning context for the work already in progress has been dropped.

In all three cases, the degradation is invisible to the user. The 1-hour threshold is not a signal that the user has abandoned the session or that continuity no longer matters — it is simply when Anthropic's prompt cache evicts.

Additional Context

_No response_

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗