The goal is to juggle as few long-lived secrets as possible. Claude and Codex
authenticate against your own account over OAuth, gh uses the device flow, and MCP
servers register themselves and refresh their own tokens — dynamic
client registration, PKCE, automatic refresh. Pi is the exception: it takes a provider
API key, which you set once on the Inference page.
Which matters on the bad day. Agents read and write a lot of text, and sooner or later a
credential lands somewhere it shouldn’t — a log line, a transcript, a pasted diff. If it
was a long-lived API key, you get to choose between a permanent exposure and spending the
next five hours manually rotating every copy of it. If it was a short-lived token the
runtime already rotates, it expires on its own and you re-auth in a browser.