rate-limit-guard: detect an account switch and tell the model the new account's limits
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 38/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- shell
調査の方向性
Start from the rate-limit-guard plugin and how it records usage for a session (the prompt.submit hook context described in the issue). Read current Claude Code docs for auth/status/usage signals and which hook fires after a switch; also read docs/conventions/hook-precision for the stay-quiet test. Done means a switch notice with the new account's limits on the next turn, no old windows after the switch, and no notice when the account is unchanged.
索引モデルが issue の本文から書いたものです。
説明
Problem
When the operator rotates to another Claude account mid-session, the model keeps acting on the
previous account's usage limits. rate-limit-guard's notices still report the old account's
windows, and nothing tells the model the account changed, so it throttles fan-out, defers work
"until the reset", or suggests handoffs that the new account does not need.
Observed 2026-10-05 in a session on feat/upstream-docs-cache (PR #6348): after the operator
switched accounts, the prompt.submit hook context still said "rate-limit-guard: 7-day window at
or above 90%, resets at 2026-10-07 03:00 UTC", and the session planned around that reset until the
operator corrected it by hand.
Ask
- Detect an account switch: the signed-in account identity (or organization) differs from the one
the guard last recorded for this session or machine. - On a switch, invalidate the cached usage snapshot and re-read the limits for the new account.
- Inject one notice into the session on the next turn, for example: "Account switched to
; current limits: 5-hour window N%, 7-day window N%, resets at ...; earlier limit
notices in this session no longer apply." - Stop emitting the previous account's numbers once the switch is seen.
Open questions
- Which signal identifies the account reliably and locally (the auth state Claude Code exposes to
hooks or mods, a status payload, the usage endpoint's response)? Needs a check against current
Claude Code docs before design. - Which hook or mod event fires early enough after a switch (UserPromptSubmit, a status-line tick,
SessionStart on resume)? - Should context-guard take the same notice, so the model can tell a context-size warning from a
usage warning?
Acceptance
- After an account switch, the next model turn carries a notice naming the switch and the new
account's current limits. - No notice after the switch reports the old account's windows.
- A stay-quiet test: no switch notice when the account is unchanged
(docs/conventions/hook-precision).
- 主要言語
- Shell
- スター
- 22
- フォーク
- 2
- 平均マージ
- 8時間 25分
- マージ済み PR(30日)
- 944
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
melodic-software/claude-code-plugins のほかの issue
-
good first issue priority: low
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
melodic-software/claude-code-plugins#7530 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
needs-human priority: medium
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
melodic-software/claude-code-plugins#7455 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
priority: medium
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
melodic-software/claude-code-plugins#7351 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
agent-ready priority: high work-class: scoped
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
melodic-software/claude-code-plugins#7312 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
priority: medium
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
melodic-software/claude-code-plugins#7288 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
melodic-software/claude-code-plugins の issue をすべて見る
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
-
needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
gke-labs/kube-agents#3394 ·
メンテナーはふだん 1 日以内に返信
-
area:cli bug good first issue priority:medium
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
メンテナーはふだん 1 日以内に返信
-
review-bot
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
bashclub/zamba-lxc-toolbox#158 ·