[BUG] Context limit reached even after a /clear command was used

Resolved 💬 2 comments Opened Jan 9, 2026 by UtsavBalar1231 Closed Jan 9, 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?

I was working on a project and hit the context limit reached message, The compaction failed as I tried to do /clear to open a new session. But for some reason it's not clearing up the context, and I am stuck with Context limit reached error.

What Should Happen?

A new session should have been created instead of getting these ridiculous Context limit reached errors.

Error Messages/Logs

Debug logs from the session ran using `claude --debug`

https://justpaste.it/kzggg

Steps to Reproduce

I dont know how to reproduce this on other projects, but here are the steps that I used which caused me this error.

  1. I was working on my personal claude code configs folder, after some work, the claude context for initial session was filled (0% Context left).
  1. I tried to call /security-review command from the official claude-plugins to review the changes.
  1. Claude tried to compact the session, failed as the session context was big.
  1. I tried doing /clear session, no errors until this point.
  1. I tried to re-run the /security-review command again, it keeps failing at Context limit reached. Tried multiple times, even after a claude re-open and resume to last session and repeating steps 4-5.

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.2

Platform

Anthropic API

Operating System

Other Linux

Terminal/Shell

Other

Additional Information

<img width="1427" height="465" alt="Image" src="https://github.com/user-attachments/assets/0cec2d71-ead2-46ad-897f-2d7687f7255a" />

https://github.com/UtsavBalar1231/claude-code-configs

View original on GitHub ↗

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