[BUG] Claude Code Auto Compact Feature is broken

Resolved 💬 3 comments Opened Jan 28, 2026 by SJSudharshan Closed Jan 31, 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?

<img width="1708" height="135" alt="Image" src="https://github.com/user-attachments/assets/aeeb04fa-ecaf-4b4c-8c72-f7616bb64291" />

Claude code having issues compacting conversation sometimes ,

Its running pre compact hooks and errors out

What Should Happen?

Claude code should successfully run pre compact hook

Error Messages/Logs

Steps to Reproduce

NA

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

2.1.20

Claude Code Version

2.1.21

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

Windows Terminal

Additional Information

_No response_

View original on GitHub ↗

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