Windows: Context compaction triggers when terminal window is minimized
Status Closed — duplicate
Reported on v2.1.90
Maintainer reply None cached
Activity 3 comments · opened Apr 2, 2026 · closed Apr 6, 2026
Description
Context compaction fires unexpectedly when the Claude Code terminal window is minimized and restored on Windows 11. This happens during active sessions — minimizing the window and coming back triggers compaction even when the conversation is well within context limits.
Environment
- Claude Code version: 2.1.90
- OS: Windows 11 Pro (10.0.26200)
- Shell: bash (Git Bash)
- Terminal: Windows Terminal
Steps to Reproduce
- Start a Claude Code session with moderate context usage
- Minimize the terminal window
- Leave minimized briefly
- Restore the window
- Compaction fires despite context not being near limits
Expected Behavior
Minimizing/restoring the terminal window should not trigger context compaction.
Actual Behavior
Context compaction fires on window restore, losing conversation context mid-session. This appears to be a focus/visibility event incorrectly triggering a context re-evaluation cycle.
Notes
- Started occurring around 2026-04-02 (possibly related to a recent update)
- No custom hooks trigger compaction — only a PostCompact hook that fires after compaction to restore session state
- Reproducible across sessions
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗