[BUG] Auto-compaction causes context switch from documentation to coding mode
- 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
- Complete a coding task (Qt desktop application development)
- User explicitly shifts to documentation mode to document completed work
- Begin documenting the completed work using Read tools to review files
- Auto-compaction triggers during documentation session
- 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.
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗