Skip to content

Thinking block skipped on first response after context compaction, causing critical context loss #27954

@ppravdin

Description

@ppravdin

Description

After context compaction (or session continuation from a compacted conversation), the model's first substantive response can be generated without a thinking block. This causes critical task qualifiers and nuance from the summary to be dropped, even though the compaction summary correctly captured them.

Reproduction

  1. Have a long conversation with detailed task context (e.g., working on a multi-step task where specific qualifiers matter — like "create X for Y" where "for Y" is essential)
  2. Let the context compact / continue the session from summary
  3. The compaction summary correctly preserves the full task description including qualifiers
  4. Ask a question that requires the model to reason about what to do next
  5. The model produces a response with no thinking block
  6. Without the thinking step, the model drops qualifiers and defaults to a generic/surface-level interpretation of the task

Expected Behavior

The model should always use a thinking block when responding to substantive questions after context compaction, especially when the response involves decision-making. The thinking block is where the model would re-read the summary, extract the relevant details, and reason about the correct course of action.

Actual Behavior

The first response after compaction has no thinking block. The model appears to pattern-match on the surface level of the question without reasoning through the compacted summary's details. Critical qualifiers (that were correctly preserved in the summary) are silently dropped.

Impact

This is a high-impact bug because:

  • Context compaction happens in long, complex sessions — exactly the sessions where task details are most nuanced
  • The summary does its job correctly (details are preserved), but the model fails to use them
  • The user has no way to know the model skipped its reasoning step
  • The resulting action can be the opposite of what was intended (in our case, the model executed a task with inverted parameters compared to what the summary specified)

Possible Cause

This looks like it could be intentional behavior — "skip thinking on the first message of a new/compacted session" as an optimization. If so, it's a dangerous optimization because the first message after compaction is precisely when thinking is most needed — the model has just lost its full context and needs to re-orient from a summary.

Environment

  • Claude Code CLI
  • Model: claude-opus-4-6
  • Long multi-step session that triggered automatic context compaction

Metadata

Metadata

Assignees

No one assigned

    Labels

    staleIssue is inactive

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions