[BUG] /clear doesn't reset "Context limit reached" state; full process restart required
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?
"Context limit reached · /compact or /clear to continue" persists after /clear, even
though /context shows the majority of the window is free. Running /clear does not
reset whatever internal state is triggering the block — only fully exiting and
restarting the Claude Code process resolves it.
Steps to reproduce:
- Hit the context limit block during a normal session.
- Run /clear.
- Continue working (e.g. invoke a skill) — the same "Context limit reached" error
reappears immediately.
- Run /context — shows only ~9-11% of the 200k token window used, ~73-75% free space.
- Exit the terminal entirely and start a new Claude Code process — the exact same
query now succeeds normally.
Expected: /clear should fully reset any internal context-limit state, not just the
visible conversation history. Alternatively, the limit check should be consistent
with what /context reports.
Possibly related to #46318, #17054, #20455, #57862 — those describe the same
mismatch between /context's reported free space and the block triggering anyway.
What Should Happen?
Expected: /clear should fully reset any internal context-limit state, not just the
visible conversation history. Alternatively, the limit check should be consistent
with what /context reports.
Possibly related to #46318, #17054, #20455, #57862 — those describe the same
mismatch between /context's reported free space and the block triggering anyway.
Error Messages/Logs
Claude Code version: 2.1.220
Installed via: dnf (official RPM repo, downloads.claude.ai/claude-code/rpm/latest)
OS: RHEL 9 (kernel 5.14.0-687.30.1.el9_8.aarch64)
Model: Opus 4.8 (us.anthropic.claude-opus-4-8)
/context output before and after /clear (paste as a code block)
Before /clear (first block):
18.2k/200k tokens (9%) used, 148.8k free (74.4%)
After /clear + skill load (second block, same session — still blocked):
21.1k/200k tokens (11%) used, 145.6k free (72.8%)
If there's a field for "Debug logs" — you don't strictly need to attach any, this is reproducible enough from the /context numbers alone. Let me know if the actual template has different field names once you're on the page and I can adjust wording to fit.
Steps to Reproduce
Steps to reproduce:
- Hit the context limit block during a normal session.
- Run /clear.
- Continue working (e.g. invoke a skill) — the same "Context limit reached" error
reappears immediately.
- Run /context — shows only ~9-11% of the 200k token window used, ~73-75% free space.
- Exit the terminal entirely and start a new Claude Code process — the exact same
query now succeeds normally.
Claude Model
Opus
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.220
Platform
AWS Bedrock
Operating System
Other Linux
Terminal/Shell
Other
Additional Information
Claude Code version: 2.1.220
Installed via: dnf (official RPM repo, downloads.claude.ai/claude-code/rpm/latest)
OS: RHEL 9 (kernel 5.14.0-687.30.1.el9_8.aarch64)
Model: Opus 4.8 (us.anthropic.claude-opus-4-8)
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗