ConfigurationReference

Auth and OAuth

Credential sources, the /login OAuth profiles, Codex token detection, and where API keys live.

On this page
  1. Credential sources
  2. The /login dashboard
  3. Google Workspace
  4. ChatGPT credential import
  5. PAYG keys
  6. Failure modes
  7. Next

GEODE accepts ChatGPT subscription OAuth and provider PAYG API keys. The choice is expressed by a single CredentialSource. GEODE-managed subscription credentials, API keys, and plans persist in ~/.geode/auth.toml. Externally supplied environment variables and existing .env keys remain separate inputs.

Credential sources

The single SoT is the CredentialSource StrEnum in core/config/credential_source.py.

ValueMeaning
autoManifest-order resolution. OAuth first; PAYG only when fallback_to_payg allows.
api_keyPAYG API key.
claude-cliRetired Anthropic input. It emits a migration error and never executes.
openai-codexChatGPT subscription OAuth through the in-process codex-oauth adapter.
oauthCodex OAuth alias for OpenAI; retired-error input for Anthropic.
noneDisable sentinel for the provider.

Anthropic and OpenRouter have one built-in source: api_key. Historical claude-cli/oauth values are read only to emit a migration error before binary or network dispatch.

The choice persists as [llm] anthropic_credential_source / openai_credential_source (default auto). /login source <provider> <type> writes toml only, so the choice survives a .env wipe. Each (provider, source) pair maps to one concrete adapter in the registry (core/llm/adapters/: anthropic_payg, openai_payg, codex_oauth, openrouter_payg, glm_coding_plan, glm_payg).

The /login dashboard

In-session /login manages plans and credentials on one screen (core/cli/commands/login.py). Key entry and browser logins (add, set-key, openai, anthropic, google) and source run in the thin CLI; saved keys then ask the daemon to reload. Views and plan or profile changes run in the daemon, which owns the live state. A change that could not be saved is not reported as a success.

/login add, /login anthropic, onboarding, and legacy /key share one auth persistence function. They do not copy keys into .env or global settings. A failed write preserves existing credentials; a separate process reload failure is reported independently. The model's manage_logintool accepts nonsecret inspection and selection only. Default key registration uses hidden terminal input; existing explicit/key … and /login set-key <plan> <key>forms remain supported. Retired set_api_key andmanage_auth tools have been removed.

SubcommandBehavior
/login openaiChatGPT subscription OAuth login. The device-code flow lives in core/auth/oauth_login.py; the result lands in auth.toml as an OAUTH_BORROWED plan plus profile pair.
/login anthropicRegisters an Anthropic PAYG key through hidden input; preserves session source selection.
/login googleGoogle Workspace OAuth for Gmail, Calendar, Drive, Docs, Sheets, Tasks, and Contacts. Imports a user-owned Desktop app client and stays separate from LLM-provider credentials.
/login addChoose ChatGPT subscription sign-in or a provider API key (Anthropic, OpenAI, OpenRouter, GLM) in one menu. Enter only the selected provider's key; initial setup uses the same input and storage flow. Run again to add another provider.
/login use / removeSelect and remove profiles.
/login routeInspect provider and plan routing.
/login quotaDeclared plan call limits. GEODE does not count usage; check current usage in the provider account.
/login source <provider> <type>Persist the credential source into config.toml [llm].

Google Workspace

Users installing from uv or GitHub can connect with their own Google Cloud Desktop client; GEODE does not need a central OAuth app. The recommended entry point is /login google. On the first connection it explicitly asks for the client JSON path and the service bundles needed. Start from the Google Cloud console with Connect Google Workspace. For a scripted choice:

/login google --client-json ~/Downloads/client_secret.json \
  --services gmail-send,calendar-read,workspace-files

/login google services
/login google status
/login google use user@example.com
/login google --new-account --services calendar-read
/login google --services calendar-read --replace-services
/login google logout user@example.com

Authentication uses the system browser, a random 127.0.0.1 port, Authorization Code + PKCE S256, and state validation. Google does not support incremental auth for Desktop apps, so adding a service reauthorizes the union of old and new bundles for the targeted active account. GEODE refuses to save a different browser identity; connect a second identity with --new-account. To narrow a grant, provide the complete bundle set to keep together with --replace-services. gmail-read is a Restricted scope and is excluded from the recommended set. Drive, Docs, and Sheets use the non-sensitive drive.file scope, limiting GEODE to files it creates or that are individually granted to the app.

StoreContents
OS keyring
geode.google.oauth
Refresh token, client secret, account email, and display name. Login fails when no secure backend exists; there is no plaintext fallback.
~/.geode/google/accounts.jsonSchema version, monotonic revision, active account id, client/project ids, service bundles, actual granted scopes, status, and timestamps only. Atomic write behind a cross-process .accounts.lock; directory 0700 and file 0600.
Process memoryShort-lived access token and expiry, cleared on daemon auth reload and logout.
Durable session storesRaw Workspace tool inputs and results are replaced in JSON, SQLite, and tool logs by a _personal_data_omitted marker carrying the tool name; the enclosing call row retains the call id. API error details are not copied into durable telemetry, and batches containing a personal tool skip any separate reflection provider. Separate rotating runtime logs may retain bounded Google API error diagnostics. User-authored conversation text and assistant summaries written as ordinary conversation follow the general session-retention policy.

Because Workspace read results may be sent to the selected LLM provider, every read invocation is immediately preceded by a personal-data disclosure and affirmative consent. It cannot be always-allowed and fails closed in headless and sub-agent sessions. Gmail sends and Drive/Docs/Sheets/Tasks/Calendar mutations use the same non-cacheable per-invocation gate; HITL 0 and skip-permissions cannot bypass it. The full schema and Hermes comparison are in the architecture record docs/architecture/google-workspace-oauth.md.

ChatGPT credential import

The default path is a credential issued by /login openaiand stored in ~/.geode/auth.toml. GEODE can also read an existing ~/.codex/auth.json, but that is credential import only: Codex CLI is never spawned for inference.

PAYG keys

Interactive registration writes auth.toml with mode 0600./login set-key <plan-id> updates a registered plan through hidden input. Automation and external secret managers may still supply environment variables. Existing environment files are neither deleted nor migrated automatically.

# ~/.geode/.env
ANTHROPIC_API_KEY=sk-ant-...
OPENAI_API_KEY=sk-proj-...
OPENROUTER_API_KEY=sk-or-v1-...
ZAI_API_KEY={id}.{secret}

GLM supports the PAYG API-key route. The Coding Plan policy checked on 2026-09-24 restricts use to supported tools; GEODE admission is unestablished. Existing subscription profiles remain readable, execution is blocked, and billing never switches to PAYG automatically.

Failure modes

SymptomCauseFix
Empty replies or 401Expired token or invalid keyInspect with geode doctor. Renew GEODE subscription credentials with /login openai, PAYG keys with /login set-key <plan-id>, and external Codex credentials with codex login.
Source switch does not stickAn old GEODE_*_CREDENTIAL_SOURCE env line masks the tomlRun geode config explain anthropic_credential_source, find the WINNER layer, remove the line.
AdapterNotFoundError in a subprocessThe adapter registry is per-process and bootstrap was skippedMake sure the worker calls core.llm.adapters.registry.bootstrap_builtins().
Billed PAYG despite a subscriptionauto resolved to a key because OAuth was not foundFor OpenAI, inspect /login route and /login quota, then pin openai-codex. Anthropic supports api_key only.

Next

Moved from the GEODE repository’s documentation site. Source commit de077a4 · View the source on GitHub