Skip to main content
Version: Alpha

Agent usage and model selection

This page explains how to choose coding-agent accounts and models and how to set usage ceilings at each scope. It is for administrators, organization owners and repository owners who decide how agents may be used. Connect accounts first on Coding-agent accounts.

Saved configuration only

These settings are saved configuration plus a read-only policy preview. The managed coding-task executor is not implemented. Saving a push/comment trigger does not enqueue a task or spend provider credits. Existing shell CI policies and execution remain separate. These settings do not govern agents you connect yourself through remote MCP on Cloudflare-native; a scoped API token limits those (see Connect a coding agent). See Agentic mode for the roadmap.

Where to configure usage​

ScopeLocationWho can manage it
PersonalAccount settings → Coding agents (/account/agents)You, for your own personal or explicitly permitted instance account defaults
InstanceAdmin portal → Coding agents (/admin/agents)Current enrolled local-password administrators: installation-wide ceilings and optional instance-account defaults
OrganizationOrganization settingsCurrent native organization owners: ceilings and optional instance-account defaults
RepositoryRepository workflow settingsCurrent owner/direct administrator/organization owner; global Golf administration does not override native repository permissions

Each surface leads with a shared searchable/sortable table. The pencil opens a TanStack Form editor; the flask previews task choices. Read-only detail modals remain separate from settings edits.

Initial policy is disabled, with no models/triggers allowed and no task overrides. Account authentication alone cannot enable it.

Settings​

Each scope can set:

  • enabled policy
  • account/model default
  • supported reasoning/variant
  • instructions
  • allowed trigger set
  • all-supported/exact-model allowlist
  • maximum task runtime
  • token cap
  • API-spend cap in USD cents
  • concurrency cap
  • explicit permission for per-task choices

An empty account/model means inherit a higher default. Instance, organization and repository saved defaults can select only explicitly use-permitted instance accounts; personal defaults can select your own personal accounts. A task preview can also select a currently permitted personal account; this does not sponsor automatic runs.

warning

Instructions are plain authenticated configuration. Never put credentials in them.

Model discovery​

AgentUsageService.ListAgentModels accepts an authorized connection UUID and explicit refresh flag. Only connected accounts with current use access are eligible.

Authentication managers perform native discovery under the connection's existing account owner/serialization. Use-only shared users read the sanitized version-bound catalog; if it is absent or stale, they ask an authentication manager to refresh. Management never implies use permission.

HarnessHow models are discovered
CodexNative model/list with bounded pagination, preserving returned model IDs and supported reasoning effort order.
OpenCodeNative models <provider> --verbose in that connection's isolated HOME. Golf extracts only bounded model ID/name and enabled variant names, ignoring runtime URLs, headers, options and raw output. Go uses native provider ID opencode-go, separately from Zen (opencode), Anthropic and OpenAI. Its credential is the API key obtained after signing into the OpenCode console/subscribing; Golf does not implement a separate Go OAuth flow.
Claude CodeDocumented default, sonnet, opus, haiku aliases, explicitly marked as documented support rather than account-entitlement discovery. Sonnet/Opus effort choices are documented candidates; exact model/effort support must be verified by the future native executor. No universal unsupported reasoning option is supplied for Haiku.
Catalog visibility is not access

Every result has access_verified=false. Catalog visibility is not a successful model request, subscription validity, model seat or licensing promise. A future executor must verify the exact selected model, effort, account and native/provider restrictions before inference. No silent fallback or switch to API billing is permitted.

Native credential refresh writes are preserved through the existing encrypted cache lifecycle. Sanitized catalogs are stored against connection UUID/version; changing account state invalidates old catalogs. A save validates the selected model/variant and atomically checks the current connected/use-permitted account and version-bound catalog. No host auth, arbitrary command/argument, plugin or base URL is accepted.

How scopes combine​

Repository configuration resolves the nearest default: repository, then organization (if the repository is owned by one), then instance. Personal configuration resolves its own default, then instance.

SettingCombination rule
InstructionsExplicit higher-scope instructions are prepended and retained.
ModelsAll required model allowlists and enabled ceilings must permit the chosen model; missing higher configuration denies use.
TriggersTrigger sets intersect.
Runtime, token, spend and concurrency limitsThe minimum applies, including a known zero spend cap.
Per-task overridesRequire permission at every required scope.

A lower configuration cannot increase a higher ceiling.

Preview a task​

PreviewAgentTask supports an explicit connected account/model/variant, appended task instructions, trigger and optional bounded budget values. It validates catalog support and current use access and returns resolved limits and denial reasons.

  • Unsupported models/variants and unknown triggers fail.
  • A denied trigger remains denied.
  • A requested larger budget is clamped by each scope.
  • Preview leaves saved configuration/revision unchanged, queues no work, runs no model and always reports execution unavailable.

Preview is advisory inspection, not atomic execution admission or authorization evidence.

What limits do not do yet​

Limits currently describe per-task policy. They do not yet implement aggregate spend accounting, concurrent task admission, cancellation, automatic trigger assignment, comment command parsing, tool/egress policy, execution pools, proposal publication or protected merge. Those belong to the managed executor and must consume current ceilings, account grants and native repository authority at admission and during execution.

Personal preference is not an automation credential grant; see Repository automation grants. The initial native-authorization read/save pattern has bounded external permission preflight races; it is not native atomic CAS.

Persistence, API and recovery​

Schema025 adds immutable harness/provider support for Go, scope-keyed JSON settings, optimistic revisions, metadata-only actor events and sanitized version-bound model catalogs.

Settings scope/owner are derived from current Golf/native authority and checked against the supplied original scope/revision/authority fingerprint. Personal state is caller-scoped, shared settings are restricted to current managers and native owners/admins, and browser-only cookie/Origin controls apply. Revoked/disabled sessions fail current transaction guards. Secrets are kept out of usage settings/events.

Generated Connect methods are GetAgentUsage, SaveAgentUsage, ListAgentModels and PreviewAgentTask. They are excluded from the existing delegated read-only CLI/MCP allowlists. uint64-style identity/revision strings remain strings. Mutations bind the original observation; an unconfirmed save requires inspection, with no automatic retry. Page hide, sign-out and access loss clear drafts, cached models and private configuration.

Recovery

Schema025 is outside the qualified canonical recovery allowlist. A native cache restart check is not a whole-stack restore drill. Preserve PostgreSQL/keyring state; full expanded recovery remains a separate gate.

Sources: Codex model discovery, OpenCode Go, OpenCode models/variants, Claude model configuration.

Product source: b36d9b7, usage contract.