[BUG] Auto-compaction causes context switch from documentation to coding mode

Resolved 💬 4 comments Opened May 30, 2025 by tezelcelebi Closed Dec 7, 2025
  • Platform :
  • Claude Code 1.0.6 (Claude Code) using Sonnet 4.0
  • Operating System: Linux 6.8.0-60-generic
  • Terminal: Ubuntu 22.05

Bug Description

Auto-compaction causes incorrect context switch from documentation task to coding task, leading to
unwanted code modifications when user expects documentation work to continue.

Steps to Reproduce

  1. Complete a coding task (Qt desktop application development)
  2. User explicitly shifts to documentation mode to document completed work
  3. Begin documenting the completed work using Read tools to review files
  4. Auto-compaction triggers during documentation session
  5. Assistant incorrectly resumes coding instead of continuing documentation

Expected Behavior

After auto-compaction, assistant should maintain current task context and continue documenting the
completed Qt desktop application work.

Actual Behavior

After auto-compaction, assistant reverts to previous coding context and starts making unwanted code
changes (widget spacing modifications) instead of continuing documentation work.

Additional Context

This occurred during a Qt desktop application development session where work had been completed and
user wanted to document the achievements. The context switch caused confusion and unwanted
modifications to working code. Session involved reading documentation files and reviewing completed
work, but auto-compaction caused assistant to incorrectly interpret the situation as needing to
resume development work.

The bug breaks user workflow when transitioning between development and documentation phases of a
project.

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗