[FEATURE] Add configurable context limit threshold (or option to disable)
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
Claude Code stops accepting input at approximately 85% context usage (observed at 84% / 169k of 200k tokens). This is a hardcoded safeguard that cannot be configured or disabled.
For users who:
- Have disabled autocompact intentionally
- Implement their own session management protocols
- Use MCP tools like should_close_session for context monitoring
This hardcoded limit wastes ~14% of available context (28k tokens) without providing value, since context management is already handled externally.
Proposed Solution
Add a configuration option to control this behavior. For example in settings.json:
{
"contextLimitThreshold": 0.95
}
Or to disable entirely for power users:
{
"contextLimitSafeguard": false
}
Alternative Solutions
_No response_
Priority
Medium - Would be very helpful
Feature Category
Configuration and settings
Use Case Example
Users with custom session protocols (e.g., documented in CLAUDE.md) who explicitly manage context boundaries should be able to use the full context window and decide for themselves when to close a session.
Additional Context
_No response_
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗