claude-code - 💡(How to fix) Fix [BUG] Bug: Context compaction reports actions as completed that were not actually executed [2 comments, 3 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#52346Fetched 2026-04-24 06:09:36
View on GitHub
Comments
2
Participants
3
Timeline
5
Reactions
0
Author
Timeline (top)
labeled ×3commented ×2

Error Message

Error Messages/Logs

RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

When a conversation exceeds the context limit and gets compacted, the generated summary incorrectly marks file deletion operations as completed, even though they were never actually executed on the filesystem.

Steps to reproduce:

  1. Start a long session with multiple file deletions via the Bash tool
  2. Let the context get compacted (conversation summary is generated)
  3. Continue the conversation — deleted files/folders are still present on disk

Expected behavior: The summary accurately reflects what was done.

Actual behavior: The summary says files were deleted, but they still exist on disk. This creates a false sense of completion and requires manually re-doing the deletions.

Impact: High — users cannot trust that operations performed before context compaction were actually executed.

Environment: Claude Code CLI, macOS

What Should Happen?

The summary accurately reflects what was done.

Error Messages/Logs

Steps to Reproduce

  1. Start a long session with multiple file deletions via the Bash tool
  2. Let the context get compacted (conversation summary is generated)
  3. Continue the conversation — deleted files/folders are still present on disk

Claude Model

Sonnet (default)

Is this a regression?

I don't know

Last Working Version

No response

Claude Code Version

1.0.123

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

No response

extent analysis

TL;DR

The issue can be mitigated by ensuring that file deletion operations are properly tracked and reflected in the conversation summary after context compaction.

Guidance

  • Verify that the conversation summary generation logic correctly handles compacted contexts and accurately reflects the state of file operations.
  • Check if there's a discrepancy between the expected behavior of file deletions via the Bash tool and how these operations are logged or tracked within the Claude Code system.
  • Investigate the impact of context compaction on the tracking of file operations to ensure that the summary does not incorrectly mark operations as completed.
  • Consider implementing a mechanism to re-check the filesystem after context compaction to ensure that the summary aligns with the actual state of files and folders.

Example

No specific code snippet can be provided without more details on the implementation, but ensuring that file operations are correctly logged and reflected in the summary could involve reviewing the logic around conversation summary generation.

Notes

The root cause seems to be related to how the system handles context compaction and tracks file operations, but without more specific details on the implementation, it's challenging to provide a precise fix.

Recommendation

Apply a workaround to manually verify the state of file operations after context compaction until a more permanent fix can be implemented, as the current behavior can lead to incorrect assumptions about the state of files and folders.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING