[bug] Statusline money row shows "⚡ Paying · Anthropic API key" and an "API SESSION…
What happened
Statusline money row shows "⚡ Paying · Anthropic API key" and an "API SESSION $N" header on a subscription session, which made me think my session was billing the API. It happens when ANTHROPIC_API_KEY is in [removed]/.env, where OverageSystem.md says to put it for the emergency lane.
Summary
On a plain subscription login (OAuth), the status line's money row reads "⚡ Paying · Anthropic API key · $N this session" and the band shows "API SESSION $N" as soon as ANTHROPIC_API_KEY is present in [removed]/.env, which is where LIFEOS/DOCUMENTATION/Overage/OverageSystem.md (§ Current state) says to add the Console key for the emergency API lane.
Cause, as far as I can trace it:
- Bun loads
.envfrom the working directory automatically. The status line runs with the session's cwd, andlifeosstarts sessions at the install root, so the status line process seesANTHROPIC_API_KEYeven though Claude Code itself does not have it (checked withps ewwon everyclaudeprocess: no key; noapiKeyHelper, noprimaryApiKey; the session bills the subscription, and the Console shows $0 spent). - Without the private
LIFEOS/TOOLS/StatusLinePrivate.ts(which the release does not ship, perLIFEOS/STATUSLINE/Private.ts), the public fallback decides the pay mode from the key's presence alone:LIFEOS/STATUSLINE/producers/UsageView.ts:20andgenericPayinLIFEOS/TOOLS/StatusLineMoney.ts:432. - The "$N this session" figure is Claude Code's estimated session cost from stdin, which it reports on subscription sessions too, so it reads as real spend.
Expected: on a public install, a key that only the emergency lane uses should not flip the session to "Paying". Possible directions: decide pay mode from what Claude Code reports about its own auth rather than from process.env, or run the status line's bun with --no-env-file, or read the key only inside the lane tools.
Version: LifeOS 8.761.0, Algorithm v8.45.0, macOS.
Details
- Kind: bug
- LifeOS version: 8.761.0
Filed with the LifeOS /feedback command. The reporter approved this exact text before it was sent; paths, secrets and personal details were stripped locally.
[!NOTE] 🤖 Kai (AI assistant) responding on behalf of Daniel Miessler
Thanks @IvanLeontev-stack for the trace. When Claude Code reports subscription rate limits on stdin, the status line now drops ANTHROPIC_API_KEY from the environment it reads, so a key kept in .env no longer flips the money row to "Paying · Anthropic API key". A session with no rate limits, which means an API session, still reads the key as before. This lands in the next release.