Skip to content

Week-one watchlist: multi-account production metrics #8

Open

Description

@longphamdev

Metrics to watch during the first week of multi-account production use

Collected from logs + /quota; feeds threshold decisions in #7.

1. AccountsBusyError rate

  • Cap is now maxInFlightPerAccount: 2, queue timeout 5s
  • Claude Code runs subagents in parallel — bursts of 5+ concurrent requests will queue and may time out
  • If rate is high: raise queueTimeoutMs to 20-30s (NOT the cap — the cap protects against upstream 429s, live-verified)

2. Account state flapping

  • Count state transitions per account per day (healthy ↔ exhausted ↔ cooling)
  • High flapping = misclassification somewhere (e.g. 1005 vs 429 confusion)
  • Log lines to watch: pool: account ... quota exhausted, account_rate_limited, account_expired

3. Real Retry-After values

  • Now forwarded verbatim on BOTH response paths (was dropped on passthrough)
  • Measured so far: upstream 429'd acc2 with 3 concurrent streams; cooling lasted >2min
  • Action: log the actual Retry-After seconds in account_rate_limited debug lines; with enough samples, finalize the clamp (currently 6h internal max)

4. Half-open probe success rate

  • First successful request after each half-open probe — is recovery real or does the account immediately re-exhaust?
  • Live observation so far: acc1 probed after ~30min → 1005 → re-exhausted (correct — it was genuinely dead). Watch for accounts that oscillate.

5. Balance endpoint reliability

  • Confirmed live: remainingUnits: 0 while requests succeed (claimed-plan entitlement doesn't surface)
  • Mitigation deployed: successful requests clear/flag stale 0 readings; /quota marks remainingUnreliable: true
  • Watch whether balances EVER appear for claimed plans — if never, the poller's remainingUnits for start-plan accounts is decoration only

Context

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions