Skip to content

perch switch <group> refuses on a five-day-old exhausted figure whose reset has passed, while every --refresh of it is rate-limited #461

Open

Description

@ollioddi

Area

Switching and Cycling, including which Account gets picked

Perch version

perch 0.3.9

What the user ran

Starting state: two Accounts. <account 2> is the only Account in Group <group 1> and has no Alias; its cached figures were last read five days earlier (5-hour 100%, 7-day 32%). <account 1> is in no Group, active, and current. No Watcher Service installed.

  1. perch status --refresh — exit 0
  2. perch switch <group 1> — exit 17
  3. perch list <group 1> --refresh — exit 0
  4. perch switch <account 2> — exit 0
  5. perch status --refresh — exit 0

The same sequence appears in the Trail on 2026-10-02 at 19:09 (switch <group 1> exit 17, then switch <account 2> exit 0), so this has been the state for at least three days.

What they expected

That perch switch <group 1> would switch to <account 2>, which has usage left: Claude Code's own usage screen for it showed the current session at 47% used.

What happened instead

$ perch switch <group 1>
Every Account in Group `<group 1>` is exhausted.
Every reset any of them cached has already passed, so they may be free now. `perch list <group 1> --refresh` reads current figures.

exit 17

The suggested refresh cannot read it:

$ perch list <group 1> --refresh
<account 2>: Anthropic is rate-limiting Perch, so nothing about this Account could be read.
Group `<group 1>`
  Account        Alias  State  Headroom   Utilization
  <account 2>    -      -      exhausted  5-hour 100%  (as of 5d ago)
                                          7-day   32%  (as of 5d ago)

Reserve: none of 1 Account has Headroom (1 exhausted)
Read 5d ago at the oldest.

exit 0

Switching by email works, and status --refresh on the now-active Account is rate-limited the same way:

$ perch switch <account 2>
Switched to <account 2>.
Utilization   5-hour 100%  (as of 5d ago)
              7-day   32%  (as of 5d ago)

$ perch status --refresh
<account 2>: Anthropic is rate-limiting Perch, so nothing about this Account could be read.
Account       <account 2>
Plan          team
Utilization   5-hour 100%  (as of 5d ago)
              7-day   32%  (as of 5d ago)

exit 0 for both

Diagnosis

A dead end built from two behaviours, each reasonable alone:

  1. The Group switch treats a figure whose reset has passed as exhausted. The only window at 100% is the 5-hour one, read five days ago, so its reset is long past. Perch knows this, since its refusal says "Every reset any of them cached has already passed, so they may be free now". It refuses with exit 17 anyway. A window whose cached reset has passed is not known to be exhausted.
  2. The refresh that the refusal recommends never succeeds for this Account. Every --refresh of <account 2> across at least three days was answered with "Anthropic is rate-limiting Perch", exited 0, and left the five-day-old figure in place. With (1), the user cannot get out of this through Perch's suggested path. Only a switch by email, which skips the Headroom check, gets them to the Account.

Established:

  • The Trail shows the pattern on 2026-10-02 and 2026-10-05.
  • The probe reports no findings, and every assumption it reached held.
  • <account 1> refreshes normally on the same machine at the same times (as of just now), so the rate-limiting is specific to <account 2> (a Team-plan Account) rather than the machine or the network.
  • Claude Code itself reads <account 2>'s usage fine (47% of the current session).

Not established:

  • Why Anthropic rate-limits Perch's read for this one Account, and whether it would clear with time.
  • What the registry holds for <account 2>. It was not read during triage.
  • The two exit-15 invocations in the Trail (upgrade on 10-05, switch <alias> on 10-03) were not reproduced, and their messages were not captured. They may be unrelated.

Impact

The user cannot get to an Account they need

perch probe

Findings      nothing Perch would refuse over

Perch         0.3.9 (linux x86_64), installed by installer
Binary        <home>/.local/bin/perch
Claude Code   2.1.287, at <home>/.local/bin/claude
Home          <home>/.config/perch, Registry version 6
Active        <account 2>
Holdings      2 Accounts in 1 Group, 0 Quarantined, 0 Disabled
Watcher       no Service installed
Trail         71 lines, last written 2026-10-05 14:43:21Z

Assumptions
  held     Claude Code is installed and reports a version
  held     a Credential is kept in the keychain namespace, or the file, that the config directory derives
  held     the keychain item is stored under the login name
  held     the credential store holds a claudeAiOauth block
  held     the identity file holds an oauthAccount block
  unread   a session marker names its process and when the session started

Trail
  14:42:03  status --refresh  exit 0
  14:42:07  switch <group 1>  exit 17
  14:42:14  list <group 1> --refresh  exit 0
  14:42:28  list  exit 0
  14:42:36  upgrade  exit 15
  14:42:41  upgrade --check  exit 0
  14:42:46  status  exit 0
  14:42:49  switch <group 1>  exit 17
  14:42:59  list <group 1> --refresh  exit 0
  14:43:15  switch <account 2>  exit 0
  14:43:21  status --refresh  exit 0

Evidence

2026-10-02T19:09:00Z  list <group 1> --refresh   exit 0
2026-10-02T19:09:30Z  switch <group 1>           exit 17
2026-10-02T19:09:52Z  switch <account 2>         exit 0
2026-10-02T19:09:58Z  status --refresh           exit 0
2026-10-05T14:42:07Z  switch <group 1>           exit 17
2026-10-05T14:42:14Z  list <group 1> --refresh   exit 0
2026-10-05T14:42:49Z  switch <group 1>           exit 17
2026-10-05T14:42:59Z  list <group 1> --refresh   exit 0
2026-10-05T14:43:15Z  switch <account 2>         exit 0
2026-10-05T14:43:21Z  status --refresh           exit 0

Related issues

Anything that got the user moving again

perch switch <account 2>: switching by email skips the Headroom check. An Alias on the Account would serve the same way.

Filed by

Claude Code, claude-opus-5-5

Activity

  1. added
    bug
    needs-triage
    on Oct 5, 2026
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

    bugfiled-by-agentneeds-triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions