Claude Code: Rewind and Compaction No Longer Lose Files or Summary Text

Claude CodeView original changelog

Claude Code 2.1.331 fixes a rewind that deleted files after a failed restore, and a compaction bug that could drop part of the conversation summary when it quoted certain XML tags. It also fixes @file#10-12 mentions attaching the whole file instead of the chosen lines.

Key Takeaways

  • A rewind no longer deletes files after a restore has failed.
  • /compact and auto-compact keep the full summary even when it quotes certain XML tags.
  • @file#10-12 now attaches only those lines, not the entire file.
  • Notebooks with null or traceback-less error outputs can now be read.
  • Workflow agents no longer leave background shells and MCP servers running.
  • Claude is told when a queued subagent message was dropped by permission rules.

Rewind no longer deletes files after a failed restore

A rewind could delete files after its restore step had failed. Version 2.1.331 fixes this, which matters for anyone who relies on rewind as a safety net during long editing sessions.

Compaction keeps the whole summary

/compact and auto-compact could lose part of the conversation summary when the summary quoted certain XML tags. The summary is now preserved, so the context Claude carries forward is complete.

Line ranges in @-mentions

Mentions written as @file#10-12 attached the whole file instead of lines 10 to 12. They now attach only the requested lines, which keeps prompts focused and saves tokens.

Other correctness fixes

Claude can now read a notebook that has a null output or an error output with no traceback. A Workflow agent's background shells and MCP servers are no longer left running after it hands back its report. Claude is told when permission rules on the Agent tool dropped its queued message to a subagent that had already ended.

Claude Code Fixes Rewind File Loss and Compaction | Yet Another Changelog