claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

[BUG] /rate-limit-options command repeatedly auto-executes after session reset, causing excessive token consumption

Open kalinzt opened this issue 4 weeks ago • 19 comments

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?

Issue Description:

After a session reset (context limit reached), the /rate-limit-options command is automatically and repeatedly
executed without user intervention, causing significant issues:

Problems:

  1. Terminal interference: The repeated command execution causes constant terminal refreshes, disrupting workflow
  2. Forced compact operation: User is forced to run /compact to clear the repetitive messages
  3. Excessive token consumption: The forced compact operation consumes 20%+ of available tokens
  4. Workflow disruption: The combination of auto-refreshing terminal and forced compact makes it difficult to continue work

What Should Happen?

Expected Behavior:

  • Session should reset cleanly without auto-executing commands
  • /rate-limit-options should only execute when user explicitly requests it
  • Session continuation should not require forced compact

Actual Behavior:

  • /rate-limit-options auto-executes repeatedly after session reset
  • Terminal becomes unusable due to constant refreshing
  • User must waste 20%+ tokens on compact to continue working

Error Messages/Logs


Steps to Reproduce

Steps to Reproduce:

  1. Work on a project until session context limit is reached
  2. Session automatically resets/compacts
  3. Observe /rate-limit-options command being executed repeatedly
  4. Terminal continuously refreshes with rate limit option outputs
  5. User must run /compact to regain control
  6. Compact operation consumes significant tokens

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

No response

Claude Code Version

2.0.67 (Claude Code)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

VS Code integrated terminal

Additional Information

Impact:

  • High: Severely disrupts workflow and wastes tokens on non-productive operations
  • Makes long coding sessions impractical due to token waste

Environment:

  • Claude Code CLI
  • Session continuation after context limit/reset

kalinzt avatar Dec 16 '25 07:12 kalinzt

I'm having the same issue while using Claude Code CLI outside of VS Code too.

aterveus avatar Dec 16 '25 15:12 aterveus

When auto-compact happens due to context limits, /rate-limit-options is included in the compacted conversation history and becomes part of the project context. This causes the conversation to stop and get disrupted. The /rate-limit-options should be excluded from auto-compact operations so it doesn't interfere with the actual conversation context when resuming. It should be treated as a system/diagnostic command, not part of the conversation history.

benzntech avatar Dec 17 '25 06:12 benzntech

Having a similar issue - the same command pops basically almost every time I toggle between verbose output and normal mode. Upon return to normal I can see that "I have already sent" this exact command

radimt8 avatar Dec 18 '25 12:12 radimt8

Extremely annoying bug, please fix ASAP.

istvan-ujjmeszaros avatar Dec 18 '25 15:12 istvan-ujjmeszaros

Having the same issue here.

aniltan avatar Dec 18 '25 18:12 aniltan

same, didnt see this issue. one thing to note for me is I got it while I was RDPd into computer

https://github.com/anthropics/claude-code/issues/14505

hqvisionsadmin avatar Dec 18 '25 18:12 hqvisionsadmin

Same problem. As soon as I hit the rate limit in a discussion, everytime I switch between thoughts explicit or not (ctrl-o by default) the /rate-limit-options is spammed. Claude loses precious tokens trying to understand what I mean, and its context & train of thought gets polluted. This is extremely frustrating !

myrtillecomte-arch avatar Dec 18 '25 20:12 myrtillecomte-arch

I just experienced this issue using Claude Code v2.0.72. I hit my rate limit and then enabled extra usage. After adding $5 to my account, it started spamming the model with "/rate-limit-options" repeatedly and then pretty much burned through my extra usage. Reloading the app fixed it.

taylorasdfjkl avatar Dec 18 '25 21:12 taylorasdfjkl

Press Ctrl + C to interrupt the current task, then use claude -r to resume the task; this can temporarily circumvent this problem.

gcc4444 avatar Dec 19 '25 07:12 gcc4444

same issue - claude version 2.0.73 running cli on Mac

rstoddard24 avatar Dec 19 '25 20:12 rstoddard24