Skip to main content
Version: Next · development

Coding-agent accounts

Manage personal accounts at Account settings → Coding agents (/account/agents). Administrators create named instance accounts at Admin portal → Coding agents (/admin/agents). Account configuration, provider entitlement, repository permission and task execution are separate.

HarnessPackaged CLICurrent connection methods
Codex0.160.0Native ChatGPT device login or OpenAI API key
Claude Code2.1.288Native Claude subscription browser/code login or Anthropic API key
OpenCode1.18.34OpenCode Zen, Go, Anthropic or OpenAI API key; distinct connection per provider

OpenCode provider OAuth, Claude Console/cloud/gateway authentication, other providers, Grok and Pi remain unqualified. Golf does not import host account directories or Keychain credentials. API-key configuration does not verify successful inference or subscription validity.

Connect Claude Code​

Choose Connect Claude Code, select Claude account and continue. The details dialog displays the native CLI's official authorization link. Sign in with Claude there, then paste the returned authorization code into Golf and choose Complete sign-in. Golf waits for native completion and reads native account status; submitting a code alone cannot mark a connection authenticated. The code clears after submission and never appears in inventory, receipts, URLs or browser storage. Cancel login stops the exact current login; the approval deadline is Golf's bounded login deadline, not provider token expiry.

Alternatively select Provider API key and supply an Anthropic key. Native claude auth status supplies reported email/plan when present. Golf does not invent Claude usage percentages, expiry or reset counters.

Connect OpenCode​

Select OpenCode Zen, OpenCode Go, Anthropic or OpenAI in the provider selector, then choose Connect OpenCode and supply that provider's API key. Each selection has its own immutable connection and encrypted cache. Golf uses native opencode auth list to check the configured credential store. OpenCode does not report an account email, subscription plan or model validity through this flow; absent information stays unreported.

The pinned opencode auth login --provider opencode command also prompts for an API key. Go is a separate opencode-go provider; sign into its console, subscribe and obtain its key. These provider flows do not implement browser OAuth. See OpenCode Go.

Connect Codex​

Choose Connect Codex, select ChatGPT account or OpenAI API key, and continue. Native device login displays the official ChatGPT approval link and temporary code; approve in your browser while Golf polls. Cancellation binds the current login ID/version. An API-key input clears after submission. No terminal login or host account import is required.

Connected Codex details offer Refresh plan and usage. Golf shows actual reported windows, remaining/used percentages, reset time/countdown and optional earned banked resets. Unknown fields stay unreported and a known zero stays zero. Reading does not redeem a reset or run inference. API-key connections do not expose ChatGPT plan quotas. A quota endpoint failure does not itself disconnect the account.

Compact connection management​

Lucide icon actions have accessible names and hover titles. Connection details opens account metadata in a bounded dialog; settings changes use explicit editors. Owners can rename personal connections without changing identity/login. Reconnect replaces Golf-owned authentication; confirmed disconnect removes its cached credentials without revoking the provider account or key. Inspect an uncertain mutation before trying again; Golf never automatically resends it.

Details and usage remain private page state and clear on page hide, sign-out or authority loss. Personal accounts belong to the signed-in user. Instance administration cannot browse another user's personal account.

Instance accounts and use access​

Administrators choose a harness/provider when creating a named connection. Its UUID, scope and provider are immutable; use another connection for another provider. Edit name and access assigns enabled Golf users by immutable identity. New connections grant nobody access. Administrators must explicitly select themselves to use a shared account; management alone does not grant use. Selected users see metadata only, without credentials, approval challenges or user-access lists. These grants do not expand provider seats or model entitlement.

Where agents run​

For Docker Compose, account setup runs inside the Golf service container, which packages all three pinned native CLIs. Every account gets a private temporary HOME and fixed account-only commands. There is no host agent connection or Docker socket in that service. Encrypted PostgreSQL snapshots restore credentials after restart. Operator development can configure trusted absolute paths with GOLF_CODEX_BINARY, GOLF_CLAUDE_BINARY and GOLF_OPENCODE_BINARY; an empty path disables that adapter.

Managed coding tasks are not implemented yet. The intended executor gives each Docker task a disposable container/workspace, Kubernetes a task Pod/Job and Cloudflare a qualified Sandbox/Containers pool. Optional task Dockerfiles package the pinned CLIs with Git and a nonroot user; native version launch has been checked, but this does not establish task admission, source/secret/egress isolation, cancellation, publication or paid model use. Do not share a writable rotating auth cache among replicas. The existing Codex private operator experiment remains separate from managed Golf tasks.

Security and qualification boundaries​

Native credentials use the existing encrypted connection binding, advisory ownership, current-session/role checks, optimistic versions and post-provider persistence. Approval uses the native CLI's PKCE state. Golf accepts only official Claude login URLs and a bounded private code for the exact pending login. No arbitrary native RPC, shell argument, plugin or model prompt is accepted through the account service. Native account status reports CLI state; automatic remote validation/renewal is not guaranteed.

Schema024 preserves existing Codex IDs and adds immutable harness/provider identity plus one personal connection per user/harness/provider. Legacy CodexAccountService and CODEX_* audit names remain internal compatibility identifiers. Schema022–025 full disaster recovery remains refusal-gated; the earlier qualified schema021 core/local RustFS recovery does not cover managed account state.

Current qualification: product/Helm checks pass, all 27 focused browser checks pass, native adapter race checks pass and real-PostgreSQL Codex/additional-harness/migration/startup race checks pass (server 32.355s, database 25.798s). Packaged arm64 native cache isolation/restoration/logout and real Claude authorization-link issuance/cancellation pass. On local schema024, all four Claude/OpenCode API-key credential caches restored after backend replacement using deliberately invalid keys and were removed afterward. The actual Codex account and administrator session remained intact; both pipeline capabilities stayed ready. Approved Claude account completion, valid-key inference, distributed renewal and managed tasks still need separate evidence.

See agent usage settings for account/model choices, scoped ceilings and task preview. Schema025 adds Go support and usage/catalog persistence; managed execution remains unavailable.

Current product authority: b36d9b7, managed-agent contract.

Sources: Claude CLI, Claude authentication, OpenCode providers.