Skip to content

插件每一分钟请求一次claude的ai接口,会导致429报错 #6

Closed

Description

@RowgerGo

插件每一分钟请求一次claude的ai接口,会导致429报错
进入/usage命令完全不可用了,需要等冷却

话说 claude本身就支持命令行查看使用量,还要通过接口请求的方式去获取,不会导致封号吗?

Activity

  1. HandyS11 commented on Nov 1, 2026

    @HandyS11
    Owner

    Thanks for the report.

    For what it's worth, I have been running this implementation for months without hitting the limit myself, but your report is consistent with what other tools have seen: the /api/oauth/usage endpoint allows only a handful of requests per window, and that budget is shared with Claude Code's own /usage screen (see anthropics/claude-code#30930 and anthropics/claude-code#31637). Polling it every 60 seconds was too aggressive, so I have decided to improve it.

    #7 changes the behaviour:

    • The plugin now calls the endpoint at most once every 5 minutes, no matter how many tabs are open or how often you click refresh.
    • On HTTP 429 it honours Retry-After when present, otherwise backs off 5 → 10 → 20 → 40 → 60 minutes before trying again.
    • While it waits, the last good reading stays on screen, marked as stale with the reason, instead of blanking the gauges.

    On your second question: nothing in the upstream reports suggests any account action from calling this endpoint. The 429 only affects the usage readout; normal model requests on the same token keep working. The plugin only reads the access token and never touches the refresh token.

    I will merge #7 shortly. If you still see 429s after updating, please reopen with the interval and the error shown in the tab.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions