Add context usage warning before auto-compact
Status Closed — duplicate
Maintainer reply None cached
Activity 6 comments · opened Aug 13, 2025 · closed Aug 19, 2025
Feature Request: Context Usage Warning Before Auto-Compact
Problem: Users aren't warned before auto-compact happens, losing conversation context unexpectedly during long coding sessions.
Proposed Solution: Add a configurable warning when context usage reaches a specified threshold (e.g., 90%).
Use Case:
- Long debugging sessions where conversation history is critical
- Complex multi-step implementations where losing context breaks flow
- Users who want to proactively use /memory before auto-compact
Suggested Implementation:
- Setting:
CLAUDE_CODE_CONTEXT_WARNING_THRESHOLD=0.9(default 90%) - Display: "⚠️ Context 90% full - consider using /memory to save important info"
- Optional: Show current context usage percentage in status
Benefits:
- Prevents unexpected context loss
- Encourages proactive memory usage
- Improves user experience for power users
Alternative: Could also be implemented as a status indicator showing current context usage percentage.
This issue has 6 comments on GitHub. Read the full discussion on GitHub ↗