[BUG] Auto-compaction runs without user consent and degrades quality of long sessions

Status Open
Reported on v2.1.258
Maintainer reply None cached
Activity 1 comment · opened Oct 6, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

Claude Code's automatic context compaction runs mid-session with no user consent or confirmation prompt. After compaction happens, the assistant noticeably loses track of session-specific context (configuration details, in-progress multi-step task state, prior instructions) even though the full transcript is still saved to disk. This is especially disruptive during long-running, multi-session automation workflows where context continuity matters a lot.

Requests:

  1. Add an option to disable auto-compaction, or at least prompt for user confirmation before it runs.
  2. If that's not feasible, improve summary quality so technical/configuration details and multi-step task state survive compaction without needing manual re-explanation.

Context: long-running automation sessions (YouTube channel management/upload automation) spanning hours/days, coordinated across multiple parallel Claude Code sessions.

What Should Happen?

Either compaction should not run automatically without an explicit opt-in/confirmation, or the summarization should preserve enough technical/task-state detail that the assistant doesn't appear to "forget" recent configuration and in-progress steps right after it happens.

Error Messages/Logs

Steps to Reproduce

  1. Run a long Claude Code session (hours/days), e.g. multi-step automation work across several tool calls and sub-tasks.
  2. Let the conversation grow until context auto-compaction triggers (no prompt or confirmation is shown beforehand).
  3. After compaction, ask Claude to continue the in-progress multi-step task or recall recently-established configuration/state.
  4. Observe that Claude needs to be re-reminded of details it already had before compaction, even though the full transcript still exists on disk.

Claude Model

Sonnet (default)

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.1.258 (Claude Code)

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

PowerShell

Additional Information

_No response_

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗