Documentation
Agents
Choose Claude Code, Codex, or OpenCode. Use a subscription or an API key.
On this page
Choose an agent
Set the enabled list with CROCODE_AGENTS. Choose the server default with CROCODE_DEFAULT_AGENT. Installation settings and repository config can override it.
| Agent | Read-only controls | Credentials |
|---|---|---|
| Claude Code | Read, Grep, and Glob tools only. Bare and restricted mode, or safe mode for subscription tokens. | Claude subscription token in CLAUDE_CODE_OAUTH_TOKEN, or ANTHROPIC_API_KEY |
| Codex | exec --sandbox read-only with an ephemeral session. | ChatGPT subscription login in CROCODE_CODEX_AUTH_DIR, or CODEX_API_KEY |
| OpenCode | All permissions denied except read, glob, and grep. Pure mode disables external plugins. | Provider key, such as OPENROUTER_API_KEY |
Use your subscription
Claude Code and Codex can run on the plan you already pay for. You do not need an API key or a per-token bill.
- Claude Code: use your Claude subscription through
claude setup-token. - Codex: use your ChatGPT subscription through
codex login --device-auth.
Reviews count against your plan usage limits. API keys also work.
Claude Code
To use a Claude subscription:
- Run
claude setup-tokenwith your own Claude CLI. - Set the result as
CLAUDE_CODE_OAUTH_TOKENin the worker environment. - Leave
ANTHROPIC_API_KEYempty. A nonempty API key takes priority.
To use an API key, set ANTHROPIC_API_KEY on the worker.
Subscription reviews count against subscription usage limits. CroCode uses safe mode for this path because bare mode does not read OAuth credentials. Safe mode also blocks the OSV vulnerability tools.
Codex
To use a ChatGPT subscription:
- Create a dedicated directory on the Docker host. Give UID and GID
10001:10001access. Set its mode to0700. - Mount that directory at
/home/agent/.codexin a temporary sandbox-image container. Runcodex login --device-authas10001:10001and complete the login. - Set
CROCODE_CODEX_AUTH_DIRto the absolute host path. LeaveCODEX_API_KEYempty.
Reserve that login for CroCode. Do not mount your normal Codex home. Only Codex containers receive the directory. Reviews count against your ChatGPT plan limits.
To use an API key, set CODEX_API_KEY. An alternative API endpoint can use OPENAI_BASE_URL.
Before enabling Codex, use a compatible dedicated runtime and repeat the read, blocked-write, and blocked-network probes. Do not add privileged mode or bypass the sandbox to hide a namespace failure.
See the container build and verification notes for the pinned CLI versions and known host limits.
OpenCode
Set the selected provider’s key. CroCode passes ANTHROPIC_API_KEY, OPENAI_API_KEY, OPENROUTER_API_KEY, and OPENCODE_API_KEY when present.
CroCode supplies a fixed permission config. It disables project config, Claude config, external skills, and external plugins. These controls prevent repository files from adding startup code.
Credential boundary
Only the selected agent’s listed model variables and explicit CROCODE_AGENT_ENV names enter the sandbox. The agent can read its own model key.
Never pass GitHub tokens, private keys, database URLs, OAuth secrets, or session secrets. Do not mount your personal CLI home. Use separate model keys with provider spending limits.