Critical: Conversation compaction fails for conversations started under previous Claude Code versions

Resolved 💬 8 comments Opened Dec 3, 2025 by joshcreter Closed Dec 9, 2025

Summary

Claude Code 2.0.57 cannot compact conversations that were started under previous versions, resulting in a 400 API error. This effectively freezes ongoing work in those conversations with no recovery path.

Error Message

API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.1.content.160: `thinking` or `redacted_thinking` blocks in the latest assistant message cannot be modified. These blocks must remain as they were in the original response."},"request_id":"req_011CVjFJq2S3oRkQTSqBVYaX"}

Impact

Severity: Critical (P1)

  • Conversations at 0% context cannot proceed without compaction
  • Compaction fails, making these conversations permanently unusable
  • All accumulated context and work-in-progress is lost
  • No user-side workaround exists (this is an API validation error)

Environment

  • Claude Code version: 2.0.57
  • Previous version: Unknown (conversation started before upgrade)
  • Platform: macOS (Darwin 24.5.0)

Root Cause Hypothesis

The compaction process modifies message structure in a way that changes thinking blocks from previous assistant turns. The current API enforces that thinking/redacted_thinking blocks must remain byte-identical to original responses, causing validation failure.

Expected Behavior

Conversations started under previous Claude Code versions should remain functional after upgrade, including compaction. This is a basic backward compatibility expectation for production software.

Suggested Fixes

  1. Migration: Automatically migrate old conversation format on upgrade
  2. Compaction handling: Modify compaction to preserve thinking blocks exactly as stored
  3. Graceful degradation: If compaction fails, offer user options (export context, start fresh with summary) rather than hard failure

User Impact Statement

"Claude Code is not experimental software at this point. As a product owner, I would expect a clean transition from local file formats and/or API stability. Imagine if Microsoft Word didn't open previous documents!"

This breaks the fundamental contract of being able to continue previous work sessions.

View original on GitHub ↗

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