OAuth is a runtime concern
The Agent SDK can run on the OAuth token from claude login — perfect for personal apps and Pro/Max-funded production. Production discipline: know where the token lives (Keychain on macOS, file on Linux), how to refresh it, what happens when it expires, and how to recover without manual intervention.
The Anthropic API key is reserved scaffolding
cwkPippa's stance: the Anthropic API key path exists as code (for symmetry, future switching) but is intentionally NOT a runtime path. The env value is forbidden from the running process so the sk-ant-* pattern cannot leak into JSONL logs. OAuth-only is a privacy posture, not just a billing one.
What 'OAuth failed' looks like
When the OAuth token is invalid or expired, the SDK raises an auth error. Handle it: log the failure, alert the operator, do not retry blindly. Token refresh is interactive (Anthropic decides when), so production needs an operator path — not a silent crash loop.