Riko switched Claude off in Providers, and magpie still ran
`claude auth status --json` about every minute. Off only kept the
gateway from routing to it. Every page and request lists accounts,
which re-asked the CLI, and the background loops went on reading
allowances, renewing, switching, warming, checking in and fetching lists.
The same held for each sibling with a CLI or account check: Cursor
(`cursor-agent about`), Devin (`devin auth status`) and the rest.
What changed:
- left_alone.go: leftAlone(id), true for a provider that is Off or
Hidden (account removed).
- account.go claudeIdentity and cli_identity.go get (Cursor, Devin): the
CLI isn't asked; what it said last (memory or cli-identity.json) is
served, so the account stays listed to switch on again.
- subscription_usage.go: claude, cursor and grok are checked as hidden
before their account is looked up (the look-up ran the CLI).
- login_usage.go loginUsageAt, keepalive.go RenewLogins,
codex_switch.go NextLogin, codex_warmup.go keepWarm: leftAlone where
only accountRemoved (or nothing) was checked.
- models.go newDue: a provider that is off has no list fetched.
- checkin.go: each check-in account knows its card's provider; the loop
skips one that is left alone, a press still checks it in (minimax,
trae, qoder, workbuddy, plugin check-ins set it).
- docs/subsystems/providers-accounts.md says so.
Not covered: KeepPluginsListed lists every plugin at once in the host. A
Cursor switched off that was never asked who is signed in isn't listed
until switched on.
What was run:
- TestLeftAloneRunsNoCLI: fake claude, cursor-agent and devin on PATH log
each run; with claude and cursor off and devin removed, All, Hidden,
fetchSubscriptionUsage, LoginUsage, RenewLogins, SwitchWhenSpent and
FetchNew run three times over stale caches and no CLI is run; switched
back on, all three are asked again.
- Break check: with the source changes reverted it fails with
"switched off or removed, the CLIs were run: [claude_auth_status_--json
cursor-agent_about_--format_json devin_auth_status ...]"; with only the
claude gate removed only claude is logged, with only cliIdentity's only
cursor and devin.
- go test -tags nogui -timeout 45m ./internal/provider ./internal/gateway:
ok (399s, 1271s).
- gofmt -l: clean. go vet (darwin), GOOS=linux go vet -tags nogui ./...,
GOOS=windows go vet ./...: clean, under set -o pipefail.
Qoder and Qoder CN campaigns run on [startAt, endAt) windows that cross Beijing midnight, so a campaign claimed yesterday could stand in for the whole new day and the next campaign was never claimed.
- A campaign is active by its upstream window, so one still open after Beijing midnight can be claimed.
- A saved result records the campaign's end in `until`, and is reused only on the same Beijing day, within 30 minutes and before that end; after that the list is read again (about 48 list reads per account per day, `inactive` included).
- Manual check-in always verifies upstream; failures and older records without `until` keep the old retry behaviour.
- Only Qoder sets `recheck`; WorkBuddy, Trae CN and MiniMax keep their once-a-day settlement.