User configuration reference¶
Automated pull request reviews¶
GitHub Actions runs an advisory snodo review for eligible pull requests and posts the suggested outcome and reviewer-agreement table as a PR comment. The four suggested outcomes are MERGED, MINOR REWORK, MAJOR REWORK, and REJECTED; they are recommendations for human reviewers, not GitHub review decisions. The workflow updates its existing comment when rerun.
For a pipeline gate that runs Snodo's protocol validators on a pull-request or merge-request diff, see Running Snodo in CI.
Add these repository actions secrets under Settings → Secrets and variables
→ Actions: OLLAMA_CLOUD_API_KEY, OCGO_API_KEY (the first OpenCode Go account, provider ocgo1), and OCGO2_API_KEY (the second account, provider ocgo2). An
optional fourth, SNODO_CLOUD_API_KEY, lets the run's recon audit events sync to
snodo cloud; leave it unset to keep the review local to the runner.
Each key is used by a configured recon model provider and is kept in the
runner's user config only. To rerun a review, use Actions → PR review → Run
workflow and enter the pull request number.
Each Action run creates a reviewer session named
sess_ci_pr-review_<GITHUB_RUN_ID>_<GITHUB_RUN_ATTEMPT>. The run and attempt
make each ephemeral audit chain unique, while the ci_pr-review prefix
identifies automated reviews in cloud history and snodo cloud status.
Fork pull requests are skipped so repository API keys are never exposed to untrusted code. Dependabot pull requests are skipped on automatic events to avoid spending API credits on routine updates; maintainers can explicitly rerun them with workflow dispatch.
Snodo's user-level configuration lives at ~/.snodo/config.yml. It is separate
from a project's .snodo/protocol.yml: user config holds machine-wide model
choices, credentials, cloud settings, and notification destinations; the
protocol declares project policy. Keep credentials in user config (or resolve
them from the environment), not in a protocol committed to a repository.
Snodo creates a minimal config on first use. The effective defaults below also
apply when a section or key is omitted. snodo config show redacts configured
credentials and notification destinations. The config file is saved with
owner-only (0600) permissions. Saving through Snodo rewrites YAML, so comments
in the file are not preserved.
Top-level settings¶
| Key | Default | Description |
|---|---|---|
model |
claude-sonnet-4-20250514 |
Default model for coder and other LLM roles that do not specify a role-specific model. |
default_model |
unset | Legacy fallback read after model; if set, it takes precedence over model in the model getter. Prefer model. |
providers |
Built-in provider catalog; no user overrides | Provider-specific credentials, model discovery endpoints, routing and headers. See Providers. |
engine |
max_subtask_depth: 3, max_session_age_days: 30, token_ttl_seconds: 600 |
Engine-wide limits. See Engine. |
llm |
See LLM tuning | Model roles, request budgets, retries and recon fan-out. |
cloud |
See Cloud | Cloud sync credentials and service endpoints. |
notifications |
No targets; all supported event types; silence threshold 900 seconds |
Optional background-job notifications. See Notifications. |
api_keys |
Unsupported legacy format | A non-empty api_keys section without providers is rejected. Migrate credentials to providers. |
The mcp and opencode objects emitted by older/default config generation
(mcp.port: 55441, opencode.session_token_warning: 150000, and
opencode.session_reset_on_model_change: false) are retained data, not active
Snodo user-config settings; current callers do not read them.
Providers¶
For step-by-step setup, see the guides for Cloudflare, Ollama, OpenCode Go, Anthropic, OpenAI, ChatGPT subscription, Google, OpenRouter, and DeepSeek.
Each entry under providers is keyed by a provider name. Built-in entries are
anthropic, openai, openrouter, google, cloudflare, and deepseek;
unlisted entries can configure custom/OpenAI-compatible providers. For a
built-in provider, omitted settings inherit the catalog values; for a custom
provider, the defaults are empty strings and an empty extra_headers map.
| Provider key | Default | Description |
|---|---|---|
auth |
"" |
Authentication mode. Set to chatgpt-oauth for a ChatGPT subscription; then sign in with snodo models --provider chatgpt --authenticate (see the ChatGPT guide). This is separate from API-key credentials. |
api_key |
"" |
Literal API key, encrypted reference @keys/<provider>.key, or empty to use another source. Prefer an environment reference for portable setups. |
api_key_env |
"" |
Name of an environment variable containing the key. Built-in provider defaults set this (for example ANTHROPIC_API_KEY, OPENAI_API_KEY, OPENROUTER_API_KEY, GEMINI_API_KEY, CLOUDFLARE_API_KEY, or DEEPSEEK_API_KEY). |
api_key_ref |
"" |
Named credential reference: env:VARIABLE_NAME or command:COMMAND. A command is split into arguments, has a 10-second timeout and uses trimmed stdout. |
models_endpoint |
"" |
Provider model-catalog endpoint; built-ins supply their own endpoint. |
account_id |
"" |
Provider account identifier, used by Cloudflare. |
account_id_env |
"" |
Environment-variable name for the account identifier; Cloudflare defaults to CLOUDFLARE_ACCOUNT_ID. |
base_url |
"" |
Custom API base URL for LiteLLM requests. |
litellm_provider |
"" |
LiteLLM provider route name, useful for custom-compatible providers. |
model_routes |
[] |
Ordered rules with match (model-ID prefix or simple glob) and litellm_provider; the first matching rule overrides the default route. |
extra_headers |
{} |
Extra HTTP headers; {task_id} in a value is substituted with the current task ID (unknown when absent). |
probe_model |
"" |
Model used by provider key checks. Built-ins supply a probe model. |
catalog_provider |
"" |
Provider name used for model catalog lookup when it differs from the config entry name. |
Example:
providers:
openai:
api_key_env: OPENAI_API_KEY
local:
base_url: http://localhost:11434/v1
litellm_provider: openai
api_key: local
extra_headers:
x-task: "{task_id}"
Gateways can expose different model families using different API formats on the same host and credential. OpenCode Go, for example, can route Claude models to Anthropic Messages while other model IDs keep the OpenAI-compatible default:
providers:
ocgo:
api_key_env: OCGO_API_KEY
base_url: https://opencode.ai/zen/go/v1
litellm_provider: openai
model_routes:
- match: claude-*
litellm_provider: anthropic
- match: minimax-*
litellm_provider: anthropic
Rules match the model ID after the local provider prefix is removed. match
without glob metacharacters matches an ID prefix; *, ?, and [ use simple
glob matching. Rules are checked in order and the first match wins. Routed
models reuse the provider block's API key and base URL; an Anthropic route has a
trailing /v1 removed from its base URL when present.
Credential selection prefers a configured api_key, then api_key_ref, then
api_key_env. env: and command: references are resolved only when the
credential is used. Register one without copying its value into the config, for
example snodo config add github --ref 'command:gh auth token'; snodo config
show displays the reference without executing it. A command: reference is
stored in the config file as written, so do not include secret arguments in it.
Provider keys can also be
moved to local encrypted files with snodo config --encrypt-provider-keys.
Before a non-mock task run creates session or worktree state, Snodo checks that
the selected model's provider has a credential. If it does not, the run exits
with status 1 and suggests the provider environment variable or
snodo config add. Providers that declare no api_key_env (such as a local
endpoint) are exempt; mock runs skip this check.
User configuration is edited in ~/.snodo/config.yml (or
$SNODO_HOME/config.yml). snodo config set/get supports model, engine.*,
llm.*, and typed dotted keys under providers.*, cloud.*, and
notifications.*. For example, configure a local Ollama endpoint with:
snodo config set providers.ollama.base_url http://localhost:11434/v1
snodo config set providers.ollama.litellm_provider openai
snodo config get providers.ollama.base_url
Secret fields are redacted by config get; use snodo config add/remove for
provider API-key management.
Engine¶
| Key | Default | Description |
|---|---|---|
engine.max_subtask_depth |
3 |
Engine-level subtask depth bound; setter accepts integers 1–10. Protocol recovery is separately bounded by execution.max_recovery_depth and its mode override, described below. |
engine.max_session_age_days |
30 |
Maximum session age in days; setter accepts integers 1–365. |
engine.token_ttl_seconds |
600 |
Validation-token lifetime in seconds; setter accepts integers 60–86400. |
engine:
max_subtask_depth: 3
max_session_age_days: 30
token_ttl_seconds: 600
The protocol in .snodo/protocol.yml supplies additional execution budgets;
these are not user-config engine.* settings. execution.max_recovery_depth
(default 3) bounds recursive recovery and a mode's max_recovery_depth
overrides it when set. execution.max_total_fix_attempts (default 10) caps
fix attempts for a run. execution.max_retries (default 3) limits later
retries of failed tasks, including tasks resumed from a plan. These protocol
limits act alongside engine.max_subtask_depth, which limits engine subtask
depth; llm.num_retries instead controls LiteLLM retries for transient request
errors and does not set task recovery or task retry limits. See the
protocol reference.
LLM tuning¶
The llm section is optional and validated against a strict schema: unknown
keys are errors. Role models fall back to top-level model. A protocol
validator's own model setting takes precedence over the configured role model.
| Key | Default | Description |
|---|---|---|
llm.num_retries |
3 |
LiteLLM retry count for transient errors (0–10). |
llm.coder.model |
unset | Coder model; falls back to model. |
llm.coder.sandboxed |
false |
Run coder against a discarded copy of the task workspace. |
llm.coder.max_tokens |
16000 |
Coder completion token budget; minimum 1. |
llm.coder.max_tool_turns |
6 |
Coder tool-turn limit (1–200). |
llm.coder.timeout_seconds |
1800 |
Coder wall-clock timeout; minimum 1. |
llm.coder.silence_timeout_seconds |
600 |
Stop a subprocess coder after this many seconds without output; minimum 1. |
llm.coder.concurrency |
1 |
Maximum concurrent coders for this operator; minimum 1. |
llm.validator.model |
unset | Validator model; falls back to model. |
llm.validator.max_tokens |
1500 |
Validator completion token budget; minimum 1. |
llm.validator.max_tool_turns |
6 |
Validator read-tool turn limit (1–200). |
llm.validator_llm.model |
unset | Legacy-compatible validator role model; falls back to model. |
llm.classifier.model |
unset | Classifier model; falls back to model. |
llm.classifier.max_tokens |
500 |
Classifier completion token budget; minimum 1. |
llm.classifier.temperature |
0.0 |
Classifier temperature (0–2). |
llm.recon.num_agents |
1 |
Default number of recon agents; minimum 1. |
llm.recon.models |
[] |
Ordered model priority list for recon. Empty uses the configured default model. |
llm.recon.max_tokens |
16000 |
Maximum completion tokens per recon model call; minimum 1. The model's own output limit may be lower. |
llm.recon.max_tool_turns |
40 |
Recon read-tool turn limit (1–200). |
llm.recon.deadline_seconds |
300 |
Wall-clock limit per recon agent, including provider calls and retries; applies to snodo recon on the CLI and through MCP; minimum 1. |
llm.wave.max_age_days |
14 |
Hard expiry age for a wave; minimum 1. |
llm.wave.max_idle_days |
5 |
Idle timeout before a wave closes; minimum 1. |
For a slower local model, raise the per-agent deadline; for example, to allow 15 minutes per agent:
llm:
recon:
deadline_seconds: 900
Example:
llm:
num_retries: 3
coder:
model: claude-sonnet-4-20250514
max_tokens: 16000
max_tool_turns: 6
timeout_seconds: 1800
silence_timeout_seconds: 600
concurrency: 1
validator:
model: claude-sonnet-4-20250514
max_tokens: 16000
max_tool_turns: 40
classifier:
max_tokens: 500
temperature: 0.0
recon:
num_agents: 1
models: []
max_tokens: 1500
max_tool_turns: 6
wave:
max_age_days: 14
max_idle_days: 5
Coder workspace and sandboxed¶
sandboxed: true has different support by coder family. A contained opencode
coder (and other adapters that implement containment) runs on a discarded copy
of the task workspace; in-process coders already work against the task workspace
and do not use this setting. Host CLI coders cannot provide containment: an
explicit sandboxed: true is refused with an environment_error halt. Remove
the setting or use a contained adapter to proceed.
For host CLI coders, the engine checks after every coder exit whether the
operator's checkout content changed from the pre-dispatch baseline. Changes
block acceptance and the changed paths are listed. .snodo/ runtime state is
excluded; plan definition files and protocol.yml are watched. This detects
changes after the fact: it neither prevents writes nor undoes damage, cannot
see writes to arbitrary host paths outside the repository, and treats a
concurrent operator edit like a coder edit. It does not apply to in-place work
or in-process coders. True write prevention remains the contained adapter
described in ADR 051.
Older llm.wave.max_tokens and llm.wave.temperature keys are migrated to
llm.classifier with a deprecation warning. Remove them after migration.
Cloud¶
| Key | Default | Description |
|---|---|---|
cloud.api_key |
"" |
Optional API-key credential for cloud admission, audit sync and liveness. A usable OAuth login takes precedence; sync falls back to this key if OAuth refresh fails. |
cloud.api_url |
https://api.snodo.dev |
Cloud API base for audit ingest. |
cloud.tunnel_api_url |
https://app.snodo.dev |
Cloud app base for tunnel provisioning; independent of api_url. |
cloud.oauth_metadata_url |
https://mcp-auth.snodo.dev/.well-known/oauth-authorization-server |
HTTPS OAuth authorization-server metadata URL. |
cloud.sync_enabled |
false |
Enable cloud audit sync when an API key or OAuth login is available. |
cloud.liveness_interval_seconds |
60 |
Liveness push cadence/throttle in seconds; non-positive or unreadable values use 60. |
cloud.liveness_url / cloud.liveness_api_url |
Derived from api_url |
Optional equivalent override for the liveness app base. A trailing /v1 is removed. |
cloud.lease_url / cloud.lease_api_url |
Derived from api_url |
Optional equivalent override for the session-admission app base. |
cloud:
api_key: env:SNODO_CLOUD_API_KEY
api_url: https://api.snodo.dev
tunnel_api_url: https://app.snodo.dev
sync_enabled: false
liveness_interval_seconds: 60
Connect with either snodo cloud connect <api_key> or snodo cloud login. The
API key is stored in ~/.snodo/config.yml (or $SNODO_HOME/config.yml); a
literal key in that file must be kept private. OAuth login uses the cloud's
public-client authorization-code flow with PKCE and a temporary localhost
callback. It stores the registered client ID, access token, refresh token,
expiry and scope in ~/.snodo/cloud_oauth.json (or $SNODO_HOME/cloud_oauth.json), outside
the project directory. The OAuth state file and lock are owner-only (0600);
the parent directory is created with owner-only (0700) permissions, and the
state file is replaced atomically. Tokens are not encrypted by Snodo, so protect
the user home directory.
Usable OAuth credentials take precedence over a configured API key. If an OAuth
credential cannot be refreshed during sync, Snodo warns that snodo cloud login
is needed and uses the configured API key instead. Without an API key, sync
continues to require a working OAuth login. Run
snodo cloud connect <api_key> to store or replace the API key and switch to
API-key authentication. If an OAuth login exists, connect clears it and
best-effort revokes its refresh token when the authorization server advertises
a revocation endpoint; failed or unavailable revocation does not block the
switch. snodo cloud logout performs the same best-effort OAuth sign-out while
retaining the configured API key. snodo cloud disconnect clears both
credentials and disables sync. Access tokens are refreshed when near expiry; when refresh cannot
provide a usable credential, cloud requests cannot proceed until sign-in is
completed again unless an API key is configured for sync fallback. The URL
overrides are optional and normally need not be configured.
OAuth discovery, registration, authorization, code exchange, refresh, and (when
advertised) revocation use HTTPS endpoints provided by the authorization-server
metadata at cloud.oauth_metadata_url (default
https://mcp-auth.snodo.dev/.well-known/oauth-authorization-server). Cloud
admission sends the selected access token or API key as bearer authorization to
the configured lease mint endpoint ({lease_url}/m); subsequent audit and
liveness requests use the returned short-lived lease token at their respective
cloud endpoints. OAuth requests and lease requests include User-Agent:
snodo/<version> and X-Snodo-Device: <hostname>. Access tokens, refresh
tokens, authorization codes and PKCE verifiers are never printed, logged, or
recorded in audit events.
When cloud.sync_enabled is true and a usable API key or OAuth login is
available, each run with a
session attempts audit sync automatically at the end; the hook runs in the
background and does not block run completion. Liveness heartbeats are sent only
while a run is executing. snodo cloud status reports per-session pending
counts and the last sync error. If a session is marked as refused/blocked,
snodo cloud status directs you to retry with snodo cloud sync --all --force;
the force option explicitly retries refused sessions.
Notifications¶
Notifications are per-user settings in ~/.snodo/config.yml (or
$SNODO_HOME/config.yml), not project protocol settings. They are opt-in: with
no valid targets, no delivery occurs. Delivery is detached and best-effort, so
notification failures do not fail a job. Messages identify the project by its
configured display name when available, otherwise its canonical project ID or
checkout folder, and include the runner hostname.
| Key | Default | Description |
|---|---|---|
notifications.targets |
[] |
Destinations. Supported type values are ntfy, webhook, slack, discord, and teams. |
notifications.events |
job_finished, task_halted, authorization_needed, job_silent |
Event names to deliver; set a subset to filter. |
notifications.silence_threshold_seconds |
900 |
Log-silence interval before a job_silent notification; invalid values use 900 and values are clamped to at least 1 second. |
Each completion message uses an icon to summarize the situation. The reason is formed from validator output, shortened for the message, and may include the validator name and finding.
| Situation | Icon | Operator action |
|---|---|---|
| Success | ✅ | Nothing; the job completed. |
| Warning with recovery | ⚠️ | Nothing yet; a recovery task was spawned. |
| Waiting for a human | ✋ | Run the command included in the message to review the decision. |
| Blocked | ⛔ | Start a new dispatch after addressing the blocking issue. |
| Engine fault | ❌ | Check the engine and environment. |
These icons describe existing outcomes; no event names or notification settings were added.
Each target needs a supported type and an HTTP(S) url; name is an optional
display label. token is optional and sent as a bearer token. headers is an
optional extra-header map for generic webhook targets. ntfy sends plain text
and puts the project and runner in its title. Slack, Discord and Teams format
the project-named message for their respective incoming-webhook interfaces;
Slack uses its native single-asterisk bold syntax, and Discord disables
mentions. Teams sends an Adaptive Card envelope to a Workflows/Power Automate
webhook. Generic webhook receives Snodo's JSON event. URLs and credentials
are redacted by snodo config show. snodo config --notify-test sends one test
message to every valid configured target and reports per-target delivery results.
notifications:
targets:
- type: ntfy
name: phone
url: env:SNODO_NTFY_URL
token: env:SNODO_NTFY_TOKEN
- type: slack
name: slack
url: env:SNODO_SLACK_WEBHOOK_URL
- type: discord
name: discord
url: env:SNODO_DISCORD_WEBHOOK_URL
- type: teams
name: teams
url: env:SNODO_TEAMS_WORKFLOW_WEBHOOK_URL
token: env:SNODO_TEAMS_TOKEN
- type: webhook
name: generic-hook
url: env:SNODO_WEBHOOK_URL
token: env:SNODO_WEBHOOK_TOKEN
headers:
X-Source: snodo
events:
- job_finished
- task_halted
- authorization_needed
- job_silent
silence_threshold_seconds: 900
For any target url or optional token, an env:VARIABLE_NAME or
command:COMMAND reference is resolved at delivery time. In particular,
url: env:SNODO_WEBHOOK_URL reads the webhook endpoint from that environment
variable, keeping it out of the YAML. Supply only the token when the endpoint
requires bearer authentication.
The default event set is job_finished, task_halted, authorization_needed,
and job_silent. job_silent is sent once when a running job has had no log
activity for silence_threshold_seconds (default 900 seconds; invalid values
fall back to 900 and valid values are clamped to at least one second). Terminal
cancelled and unmerged jobs do not generate a job_finished notification.
Environment variables¶
Plan delivery happens once, after every wave in an unfiltered plan run has
completed successfully. It follows execution.delivery for the active mode:
local_merge merges the plan integration branch into the base branch and then
removes its branch and linked worktree. push_branch pushes that branch, and
change_request pushes it and opens one change request titled for the plan;
both push-based modes leave the integration branch and worktree in place. A
queue run using push_branch or
change_request instead merges its completed plans into a persistent
queue/<name>/integration branch and delivers that branch once when every plan
in the run succeeds. Partial and skipped runs leave it for a later run to
resume. Queue runs using local_merge retain per-plan merges to the base.
Failed, stopped, partial, or --wave-filtered plan runs do not deliver the plan
branch, leaving it for the next run. A plan delivery failure makes the run exit
non-zero and leaves the integration branch and worktree in place.
These variables affect run behavior or identify the context of a run. The
SNODO_* variables below are read by Snodo; variables such as ANTHROPIC_API_KEY
are provider credentials documented under Providers.
| Variable | Use |
|---|---|
SNODO_BENCHMARK=1 |
Disables task auto-merge, even when protocol policy enables it. |
SNODO_WORKTREE_PATH |
Internal: points a run at an already-created task worktree. |
SNODO_TASK_PLAN |
Internal: supplies the plan name associated with the current task/run. |
SNODO_TASK_PLAN_WAVE |
Internal: supplies the plan wave associated with the current task. |
SNODO_PROJECT_ROOT |
Internal: overrides the project root used by Snodo; run commands set it while executing. |
SNODO_JOB_ID |
Internal: identifies the background job associated with a run. |
SNODO_PLAN_JOB |
Internal: marks plan-run job context so the plan job ID is not treated as a child task job ID. |
SNODO_PLAN_TRIGGER |
Internal: supplies the trigger associated with the current plan run. |
SNODO_PLAN_QUEUE |
Internal: supplies the queue associated with the current plan run. |
The internal variables are primarily set by Snodo's job and plan runners; they are not ordinary configuration knobs to set for a normal run.