claude-code - 💡(How to fix) Fix Auto-compact not triggering until <10% context remaining

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…

Auto-compact failed to trigger in two separate sessions today (2026-05-31), both hitting 10% or less context remaining before the feature activated. In both cases, /compact was run manually to recover.

Root Cause

Auto-compact failed to trigger in two separate sessions today (2026-05-31), both hitting 10% or less context remaining before the feature activated. In both cases, /compact was run manually to recover.

RAW_BUFFERClick to expand / collapse

Summary

Auto-compact failed to trigger in two separate sessions today (2026-05-31), both hitting 10% or less context remaining before the feature activated. In both cases, /compact was run manually to recover.

Steps to reproduce

  1. Run a long session involving heavy tool use (docker logs, large file reads, shell output)
  2. Continue until context is nearly exhausted
  3. Auto-compact does not trigger — context hits ~10% with no automatic compaction

Expected behavior

Auto-compact should trigger well before 10% context remaining, preserving the session.

Actual behavior

Auto-compact did not trigger. Two sessions hit the limit on the same day:

  • Session 1: hit 10%, manually ran /compact
  • Session 2: hit 11% (99% used), manually ran /compact

Context

Both sessions involved significant tool output volume (docker exec, docker logs, large shell commands). It's possible the heuristic underestimates context consumption when tool results are large.

Environment

  • Platform: macOS (darwin 25.5.0)
  • Shell: zsh

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…

FAQ

Expected behavior

Auto-compact should trigger well before 10% context remaining, preserving the session.

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-compact not triggering until <10% context remaining