Auto-compact warning is nearly invisible — needs color/styling customization
Resolved 💬 3 comments Opened Feb 23, 2026 by mydandyandy Closed Feb 27, 2026
Problem
The "Context left until auto-compact: XX%" warning message is displayed in such a dim, low-contrast style that it's effectively invisible — especially when running multiple terminal windows simultaneously. Auto-compaction is one of the most impactful events in a Claude Code session (potential context loss, background task disconnection, workflow disruption), yet its warning is the quietest element on screen.
Current Behavior
- The warning appears in dim/muted text somewhere in the terminal
- No color customization, no bold, no ANSI styling options
- Users must actively hunt for it across multiple terminal windows
- By the time you notice it, auto-compact may have already fired
Requested Behavior
At minimum, one or more of:
- Make the warning visually prominent by default — red, bold, or high-contrast text as context usage increases (similar to how battery warnings escalate on mobile devices)
- Allow
settings.jsoncustomization of the warning's appearance — ANSI color codes, bold, threshold for when styling changes - Expose a hook or notification type (e.g.,
context_warning) that fires at configurable thresholds, so users can trigger custom alerts (sound, toast notification, custom status line update, etc.) - Allow threshold configuration —
CLAUDE_AUTOCOMPACT_PCT_OVERRIDEexists but isn't documented well. A propersettings.jsonfield likeautoCompactWarningThresholdwould be cleaner.
Why This Matters
Power users who:
- Run multiple Claude Code sessions simultaneously
- Use custom status lines and hooks for workflow automation
- Rely on pre-compaction summaries to preserve context
- Have background tasks (file watchers, etc.) that disconnect on compaction
...need adequate warning to prepare. The current implementation treats auto-compaction as a minor footnote when it's actually a major session event.
Context
- Multiple related issues exist (#11819, #14160, #12297, #12995) requesting compaction threshold customization — all closed as not planned
- The
PreCompacthook helps but only fires AFTER the decision to compact, not as an early warning - Custom status lines (via
settings.jsonstatusLine) can show context %, but they're a workaround for what should be a first-class feature - This is arguably an accessibility concern — dim text on terminal backgrounds is hard to read for many users
Environment
- Windows 11, multiple terminal windows
- Claude Code with custom statusLine, hooks, and background watchers
- Heavy daily usage with frequent compaction cycles
---
Session: Tank (0894)
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗