claude-code - 💡(How to fix) Fix Auto-compaction blocks session for several minutes mid-task [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#52972Fetched 2026-04-25 06:15:51
View on GitHub
Comments
2
Participants
3
Timeline
5
Reactions
0
Timeline (top)
labeled ×3commented ×2

Auto-compaction blocked my session for roughly 7 minutes today while conversation history was being summarized. During this window the session was unresponsive — no output, no tool calls executing.

Root Cause

Auto-compaction blocked my session for roughly 7 minutes today while conversation history was being summarized. During this window the session was unresponsive — no output, no tool calls executing.

RAW_BUFFERClick to expand / collapse

Summary

Auto-compaction blocked my session for roughly 7 minutes today while conversation history was being summarized. During this window the session was unresponsive — no output, no tool calls executing.

Environment

  • Claude Code
  • Platform: macOS (Darwin 25.2.0)
  • Date observed: 2026-04-24

Impact

I was querying a live production database during an active trading session. A multi-minute freeze mid-task is disruptive — /clear is faster but destroys context I still needed.

Requests

  1. Run compaction earlier / in smaller chunks so it doesn't stall the session all at once.
  2. Show a progress indicator or ETA during compaction.
  3. Allow new commands to run against trimmed context while compaction continues in the background.

extent analysis

TL;DR

Implementing auto-compaction in smaller chunks with a progress indicator could mitigate session freezes.

Guidance

  • Investigate the current compaction algorithm to determine the feasibility of running it in smaller chunks without significant performance overhead.
  • Consider implementing a progress indicator or ETA display during compaction to improve user experience and provide transparency.
  • Evaluate the possibility of allowing new commands to run against a trimmed context while compaction continues in the background, potentially using threading or asynchronous processing.
  • Assess the trade-offs between compaction frequency, session responsiveness, and context preservation to find an optimal balance.

Example

No code snippet is provided due to lack of specific implementation details.

Notes

The effectiveness of these suggestions may depend on the underlying architecture of the Claude Code platform and the specifics of the auto-compaction process.

Recommendation

Apply workaround: Implement auto-compaction in smaller chunks with a progress indicator, as this approach addresses the primary concerns of session responsiveness and user experience while minimizing potential disruptions.

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

claude-code - 💡(How to fix) Fix Auto-compaction blocks session for several minutes mid-task [2 comments, 3 participants]