[FEATURE]Feature Request: Auto-Compact / Checkpoint Prompt Before Context Limit in Claude Code
Preflight Checklist
- [x] I have searched existing requests and this feature hasn't been requested yet
- [x] This is a single feature request (not multiple features)
Problem Statement
Subject: Feature Request: Auto-Compact / Checkpoint Prompt Before Context Limit in Claude Code
Hi Anthropic team,
I'd like to suggest a feature for Claude Code that would significantly improve continuity during long sessions.
The Problem:
When working on extended tasks — debugging, multi-file refactoring, verification workflows — the context window limit is often hit mid-session. There's currently no warning before it happens, and no structured way to resume from where things left off. This causes delays and forces users to manually reconstruct context, often from scratch.
The Proposed Feature:
Add proactive context management to Claude Code in one or both of these forms:
- Auto-Compact Mode — When the context window reaches a threshold (e.g., 80% full), automatically summarize older parts of the conversation while preserving the most recent and relevant work. This would happen silently in the background, similar to how some editors handle undo history.
- Checkpoint Prompt — Before the limit is hit, proactively notify the user and offer to generate a structured summary (files changed, decisions made, pending tasks, current state) that can be pasted into a new session to resume seamlessly.
Why It Matters:
- Avoids broken workflows mid-task
- Reduces time spent re-explaining context in new sessions
- Especially valuable for long verification, review, or refactoring tasks
- Similar functionality exists in tools like Cursor and is well-received
Suggested Behavior:
- Threshold warning at ~80% context usage
- Option to auto-compact or manually trigger a checkpoint summary
- Checkpoint output formatted for easy paste-back into a new session
This would be a meaningful quality-of-life improvement for anyone using Claude Code for sustained, complex work. Thanks for considering it!
Proposed Solution
Suggested Behavior:*
- Threshold warning at ~80% context usage
- Option to auto-compact or manually trigger a checkpoint summary
- Checkpoint output formatted for easy paste-back into a new session
Alternative Solutions
At any point mid-session in Claude Code I am manually adding-
"Summarize everything we've done so far — what files were changed, what's working, what's pending — in a format I can paste back as context in a new session."
This gives a manual checkpoint you can use when you start fresh.
Priority
Critical - Blocking my work
Feature Category
CLI commands and flags
Use Case Example
_No response_
Additional Context
_No response_
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗