Feature request: automatic context clearing (in addition to auto-compact)
Status Open
Maintainer reply None cached
Activity 0 comments · opened Jul 30, 2026
Currently Claude Code only supports automatic compaction (summarizing conversation history as it nears the context limit). There's no way to automatically clear (fully wipe) context — /clear is manual-only, and hooks can't invoke slash commands to trigger it on a schedule or condition.
Requesting a way to auto-clear context, e.g.:
- A configurable trigger (turn count, idle time, or explicit task boundary) to run an automatic
/clear - Or a
settings.jsonoption to opt into this behavior
Use case: long-running or repetitive sessions where old context is irrelevant to the next task and full compaction still carries unwanted history forward.