anthropics / anthropics/claude-code

[BUG] Session/weekly limit shows 100% used with 0 actual tokens ($0.0000 cost)

Đang mở
#93,807 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
area:cost bug platform:macos platform:windows
Ngôn ngữ chính
Python
Star
145k
Fork
23.1k
Chỉ số merge pull request
Chỉ số pull request đang chờ

Mô tả

### Preflight Checklist

- [x] I have searched [existing issues](https://github.com/anthropics/claude-code/issues?q=is%3Aissue%20state%3Aopen%20label%3Abug) 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?

Current session limit shows 100% used immediately after a fresh 5-hour window
starts, and in brand-new chats with no prior context — even though /usage
reports zero actual consumption:

Total cost: $0.0000
Total duration (API): 0s
Usage: 0 input, 0 output, 0 cache read, 0 cache write

Despite this, "Current session" bar shows 100% used and the session is blocked.

Reproduces identically across three separate clients on the same Max account:
- Claude Code (terminal)
- Claude Code (desktop app)
- Claude Code (VSCode extension)

All MCP connectors are disabled. Issue was first noticed in a chat with a long
history, but reproduced in brand-new chats as well — blocked before any
real work starts.

Current week (all models): 16% used
Current week (Fable): 29% used

Note: account has the active +50% weekly limits promo (runs through Sep 13, 2026).
The problem started after Max paid for the plan on 2.1.241 claude version. Within one minute of a 5-hour window, all tokens burn. All my chats are manually switched to the Opus model, but tokens are burned out of the weekly Fable limit and spended my entire session limit. Yesterday, this was repeated several times and played on two different laptops - MacBook and Lenovo IdeaPad on Windows.

### What Should Happen?

Expected: session usage % should reflect actual recorded token consumption; a session with $0.0000 cost should not be blocked.

### Error Messages/Logs

```shell
No stack trace
```

### Steps to Reproduce

I don’t know what steps to take to reproduce this behavior. I can only describe what happened.
What I've observed so far:

- Happened after a fresh 5-hour session window reset.
- Also happened in a brand-new chat with no prior history.
- In both cases: /usage showed "Current session: 100% used" while
Total cost / input / output / cache all read 0.
- Reproduced across 3 separate clients (terminal, desktop, VSCode) on the
same account within the same day.

### Claude Model

Opus

### Is this a regression?

Yes, this worked in a previous version

### Last Working Version

Last working version 2.1.241

### Claude Code Version

2.1.269

### Platform

Anthropic API

### Operating System

Other

### Terminal/Shell

VS Code integrated terminal

### Additional Information

Image

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Hướng nghiên cứu

Begin with the /usage output and fresh 5-hour session reset behavior, comparing version 2.1.241 with 2.1.269 across the terminal, desktop, and VSCode clients. Confirm whether zero-cost usage is recorded as consumed and identify deterministic reproduction steps; done means a fresh zero-usage window is not blocked and displayed percentages match recorded tokens.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Lĩnh vực
api, backend
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Sôi nổi
Độ rõ ràng
Cần làm rõ
Mức phù hợp với người mới
30/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.