[Bug] Unexpected Opus Usage Warnings While Using Sonnet Model
Bug Description
I did a planning session in Opus and then switched to Sonnet to execute the plan. After the some time, I got an Opus usage warining. When I asked what was going on, it confirmed I was using sonnet for the task. It is unclear why I was getting opus usage warinings.\
\
Why am I getting opus usage limit warnings?
⏺ You're getting Opus usage limit warnings because earlier in our conversation, you were using the Opus model (before
switching to Sonnet).
The system shows you were initially using Opus 4.1 (as indicated by "You are powered by the model named Opus 4.1" in the
environment details), but then you explicitly switched to Sonnet with the --model sonnet command.
Opus has more restrictive usage limits compared to Sonnet, so if you were doing extensive work with Opus earlier, you
may have hit those limits. Now that you're on Sonnet, you shouldn't encounter those same usage limit warnings going
forward.
I got the warning after you just did what you were asked to do.
⏺ You're right - that's concerning. Even though you're using Sonnet (which you confirmed with --model sonnet), you
received an Opus usage limit warning after I completed the inventory module implementation. This suggests one of a few
possibilities:
- Account-level tracking: The usage limits might be tracked at your account level across all models, not just Opus
- Shared quota: There might be a shared quota system where extensive operations (like creating many files and running
multiple commands) count toward a general limit
- System bug: There could be an issue with the usage tracking system incorrectly attributing Sonnet usage to Opus
The inventory module implementation was quite extensive - it involved:
- Creating large schema files
- Multiple API routes
- Complex UI components
- Database migrations
- Multiple file operations
This substantial amount of work might have triggered usage warnings regardless of the model being used. If you're
consistently getting these warnings while on Sonnet, it might be worth reporting this as a potential issue.
Environment Info
- Platform: darwin
- Terminal: vscode
- Version: 2.0.5
- Feedback ID: 7ab78df4-9d61-47f3-aa6a-f393007ddf8c
Errors
[{"error":"Error: Command failed: /usr/local/lib/node_modules/@anthropic-ai/claude-code/vendor/ripgrep/arm64-darwin/rg --files --hidden /Users/tylerlibby/Desktop/Tyler/Coding Projects/ServiceTitan\ndyld[53542]: Library not loaded: /opt/homebrew/opt/pcre2/lib/libpcre2-8.0.dylib\n Referenced from: <442C4C14-85EA-39CB-A7B7-96A890396EFD> /usr/local/lib/node_modules/@anthropic-ai/claude-code/vendor/ripgrep/arm64-darwin/rg\n Reason: tried: '/opt/homebrew/opt/pcre2/lib/libpcre2-8.0.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/opt/pcre2/lib/libpcre2-8.0.dylib' (no such file), '/opt/homebrew/opt/pcre2/lib/libpcre2-8.0.dylib' (no such file), '/usr/local/lib/libpcre2-8.0.dylib' (no such file), '/usr/lib/libpcre2-8.0.dylib' (no such file, not in dyld cache)\n\n at genericNodeError (node:internal/errors:983:15)\n at wrappedFn (node:internal/errors:537:14)\n at ChildProcess.exithandler (node:child_process:417:12)\n at ChildProcess.emit (node:events:519:28)\n at ChildProcess.emit (node:domain:489:12)\n at maybeClose (node:internal/child_process:1101:16)\n at Socket.<anonymous> (node:internal/child_process:456:11)\n at Socket.emit (node:events:519:28)\n at Socket.emit (node:domain:489:12)\n at Pipe.<anonymous> (node:net:346:12)","timestamp":"2025-10-10T00:18:51.051Z"},{"error":"bv1: Insufficient permissions for global npm install.\n at qq0 (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:2194:1029)\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n at async cY1 (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:2204:43)\n at async file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:3177:8694","timestamp":"2025-10-10T00:18:52.491Z"},{"error":"bv1: Insufficient permissions for global npm install.\n at qq0 (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:2194:1029)\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n at async cY1 (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:2204:43)\n at async file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:3177:8694","timestamp":"2025-10-10T00:23:32.595Z"},{"error":"Error: Command failed: /usr/local/lib/node_modules/@anthropic-ai/claude-code/vendor/ripgrep/arm64-darwin/rg -l . /Users/tylerlibby/Desktop/Tyler/Coding Projects/ServiceTitan\ndyld[56748]: Library not loaded: /opt/homebrew/opt/pcre2/lib/libpcre2-8.0.dylib\n Referenced from: <442C4C14-85EA-39CB-A7B7-96A890396EFD> /usr/local/lib/node_modules/@anthropic-ai/claude-code/vendor/ripgrep/arm64-darwin/rg\n Reason: tried: '/opt/homebrew/opt/pcre2/lib/libpcre2-8.0.dylib' (no such file), '/System/Volumes/Preb
Note: Error logs were truncated.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗