Skip to content
Configuration

Miner coding-agent driver

Choose a production provider, override the right model and timeout knobs, and recognize credential failures before you chase the wrong layer.

The miner resolves MINER_CODING_AGENT_PROVIDER as a comma-separated preference list. The first configured name wins, unknown names are skipped, and an empty or unset list leaves production construction fail-closed instead of guessing a default backend.

No silent fallback
This seam is explicit on purpose: if you do not configure a provider, the miner does not silently pick one for you.

Provider selection

noop
Fail-closed stub. Useful when you want the miner to stay off or you are running tests.
claude-cli
Spawns the local `claude` CLI subprocess. Uses `MINER_CODING_AGENT_CLAUDE_MODEL` when set.
codex-cli
Spawns the local `codex` CLI subprocess. Uses `MINER_CODING_AGENT_CODEX_MODEL` when set.
agent-sdk
Runs the in-process Agent SDK path. It ignores the model and timeout overrides on this seam.
.env
# Prefer Claude Code, fall back to Codex if Claude is unavailable.
MINER_CODING_AGENT_PROVIDER=claude-cli,codex-cli
MINER_CODING_AGENT_CLAUDE_MODEL=<optional-claude-model>
MINER_CODING_AGENT_TIMEOUT_MS=120000

# Prefer Codex, fall back to Claude.
MINER_CODING_AGENT_PROVIDER=codex-cli,claude-cli
MINER_CODING_AGENT_CODEX_MODEL=<optional-codex-model>
`noop` and agent-sdk ignore the model and timeout knobs. Only the CLI subprocess providers consume them.

Model and timeout overrides

The only driver-specific knobs today are the provider-specific model overrides and the shared wall-clock timeout. Anything else is task-level orchestration, not provider config.

Env varApplies toDefaultNotes
MINER_CODING_AGENT_PROVIDERAll production provider selectionunset / emptyComma-separated preference list. The first configured name wins; unknown names are skipped.
MINER_CODING_AGENT_CLAUDE_MODELclaude-cliCLI defaultOptional override for the Claude Code subprocess. Ignored by noop, codex-cli, and agent-sdk.
MINER_CODING_AGENT_CODEX_MODELcodex-cliCLI defaultOptional override for the Codex subprocess. Ignored by noop, claude-cli, and agent-sdk.
MINER_CODING_AGENT_TIMEOUT_MSclaude-cli / codex-cli120000 msPositive integer wall-clock ceiling. Unset or invalid falls back to the CLI driver's default timeout.

Recognizing a stale or missing credential

The shared troubleshooting table for Claude Code and Codex lives on Self-host AI providers. This page keeps the miner-specific reminder: the credential lives on the operator's machine or mounted volume, not in repo config.

claude_code_no_oauth_token
Claude Code cannot find a runtime token. Re-run `claude setup-token` and keep the credential operator-owned.
claude_code_error_401
Claude rejected the token. Generate a fresh one with `claude setup-token` and replace the old secret.
codex_no_auth
Codex cannot find `auth.json`. Re-run `codex auth` on the mounted CLI home or volume.
codex_credential_isolation_required
The Codex home or auth path is not isolated from operator-owned storage. Remove the unsafe override.
Troubleshoot the right layer
If the CLI cannot see its credential, the miner cannot spawn a healthy provider. Fix the operator-owned credential path first, then come back to the miner env vars.

Related docs