Skip to content

Concepts · pi-setup

Pi Setup ​

Pi is devkit's first delegate choice for explore, implement, review and architecture. It keeps the same tools and hooks across provider subscriptions. Claude Code remains available behind it; review independence is enforced by rejecting the author's model, not by choosing a different harness.

Check readiness ​

Run devkit doctor --target pi (or the full devkit doctor). A ready login names claude-bridge or openai-codex. Pi must be on PATH, with at least one of these subscription logins.

An Anthropic API key or direct anthropic OAuth login does not count.

devkit sync installs Pi and its managed adapters and refreshes Pi's model catalog; --offline skips the refresh. The Pi adapter defaults to auto: enabled while Pi is installed. An explicit devkit config pi off still disables the adapter, but not the readiness notice.

Claude Code users ​

An existing Claude Code subscription login is reused automatically. If no supported login is ready, devkit pi login starts claude auth login when Claude Code is installed. Choose your subscription, not Console API billing. The claude-bridge provider uses that Claude Code login through the managed bridge; there is no need to copy tokens into Pi.

As of 2026-11-02, Anthropic announced and then withdrew an Agent SDK billing change; the bridge currently uses the regular subscription quota, according to its README.md.

Codex users ​

Pi delegates automatically reuse a supported Codex CLI subscription login. Devkit keeps the selected openai-codex provider, model and effort; Pi still owns inference, tools and hooks. No separate Pi login or interactive editor opens.

If neither subscription is ready, devkit pi login can start the native codex login flow. An existing Pi OAuth login remains a fallback.

A per-delegate loopback broker supplies short-lived access tokens in memory. Only Codex refreshes its native credential store; refresh tokens are never copied into Pi, and the delegate sandbox gains no credential write permission. The bridge supports Codex's file credential store; unsupported storage backends continue to require Pi's own OAuth login.

What the helper checks ​

The helper re-probes and refreshes $DEVKIT_HOME/pi-auth.json, exiting 1 if Pi is still not ready. It reports login failures and cache-write failures. Run devkit doctor --target pi again to check adapter and sandbox prerequisites.

SessionStart reads only the cached verdict, warns once per session while not ready, and refreshes in the background after six hours or a newer auth-file mtime. Wave workers do not repeat the notice.

Probes use claude auth status and pi auth check --provider openai-codex --json --no-refresh. Native Codex readiness additionally validates its stored subscription credential locally; health checks never refresh tokens or start inference. pi auth check on its own checks Pi's login, not Devkit's per-delegate native Codex bridge. An interactive login is an explicit request to the provider's own UI to sign in.

Primary Pi models use claude-bridge; every tier has an openai-codex fallback. Personal route and model overrides still take precedence. See Harness Setup for installation and execution limits.

Internal docs — onedot-devkit · devkit

devkitdevkit syncdevkit statusdevkit doctordevkit helpInternal docs · ONEDOT digital crew