From d20cbfc8ab7570d08f1783cc09b40585d3e3959e Mon Sep 17 00:00:00 2001 From: Docs Writer Bot Date: Mon, 3 Aug 2026 21:13:19 +0000 Subject: [PATCH 01/10] Document selectable Auto approval classifier model Add docs for the new --auto-classifier-model flag and related configuration options introduced in deepagents#5205. - approval-modes.mdx: new 'Select a classifier model' section under 'How Auto works', covering all four config sources (TUI, flag, env var, config.toml), fail-closed error behavior, and the prompt-injection security tradeoff - cli-reference.mdx: add --auto-classifier-model to the flag table - config-file.mdx: document [models].auto_classifier key with a link to the full precedence description in approval-modes Fixes DOC-1474 --- src/oss/deepagents/code/approval-modes.mdx | 55 ++++++++++++++++++++++ src/oss/deepagents/code/cli-reference.mdx | 1 + src/oss/deepagents/code/config-file.mdx | 3 ++ 3 files changed, 59 insertions(+) diff --git a/src/oss/deepagents/code/approval-modes.mdx b/src/oss/deepagents/code/approval-modes.mdx index 6a8f2d95d8..7450c413fb 100644 --- a/src/oss/deepagents/code/approval-modes.mdx +++ b/src/oss/deepagents/code/approval-modes.mdx @@ -137,6 +137,61 @@ flowchart TD ``` +### Select a classifier model + +By default, the Auto classifier uses the same model as the main agent. You can point it at a different (typically cheaper and faster) model to reduce cost and latency during Auto review without affecting the model used for your actual tasks. + +Set the classifier model through any of these sources, listed from highest to lowest precedence: + +1. **`/auto model` TUI command** — takes effect immediately for the current session. +2. **`--auto-classifier-model` flag** — sets the classifier for the launch (interactive TUI sessions only). +3. **`DEEPAGENTS_CODE_AUTO_CLASSIFIER_MODEL` environment variable** — applies at startup. +4. **`[models].auto_classifier` in `config.toml`** — your persistent default. +5. **Inherit** — uses the main agent model (the default when nothing is configured). + +A blank value at any level means "inherit from the next source". For example, an unset env var falls through to `config.toml`. + + + + ```txt + /auto model anthropic:claude-haiku-4-5 + /auto model clear + ``` + + `/auto model` validates the spec before accepting it. Use `/auto model clear` to go back to inheriting the main model. + + + ```bash + dcode -y --auto-classifier-model anthropic:claude-haiku-4-5 + ``` + + `--auto-classifier-model` is only accepted in interactive TUI sessions. It errors in non-interactive (`-n`) and ACP server modes. + + + ```bash + export DEEPAGENTS_CODE_AUTO_CLASSIFIER_MODEL="anthropic:claude-haiku-4-5" + ``` + + + A **project `.env`** cannot set `DEEPAGENTS_CODE_AUTO_CLASSIFIER_MODEL`. Only shell exports, `~/.deepagents/.env`, the CLI flag, and `/auto model` work. This prevents a cloned repository from silently redirecting your approval review to a weaker model. + + + + ```toml title="~/.deepagents/config.toml" + [models] + auto_classifier = "anthropic:claude-haiku-4-5" + ``` + + + +The TUI displays which model is reviewing when Auto turns on and inside `/auto model` output — including models set by env var or `config.toml`. + + + A weaker classifier means weaker review. A less capable model may be more susceptible to prompt injection in the content it reads. This tradeoff is documented in the Deep Agents Code threat model (T14). + + +**Fail-closed on errors.** If the configured classifier model cannot be built — because of a bad spec, missing credentials, or a missing provider package — the calls it would have reviewed are **denied** and do not fall back to the main model. After repeated failures, Auto stops and shows you the normal approval UI. The error message names the model so you can identify and fix the problem. + ### Revalidate before side effects The decision plan is bound to the thread, mode, batch, and exact gated calls. Missing or invalid state, a mode race, or a replay falls back to human review. For example, if you switch to Manual while classifier review is in progress, an earlier Auto decision cannot execute silently; the normal approval UI opens instead. diff --git a/src/oss/deepagents/code/cli-reference.mdx b/src/oss/deepagents/code/cli-reference.mdx index bf37e257ae..649c7c7c72 100644 --- a/src/oss/deepagents/code/cli-reference.mdx +++ b/src/oss/deepagents/code/cli-reference.mdx @@ -318,6 +318,7 @@ Run OAuth login for MCP servers marked `auth: "oauth"` with `dcode mcp login Date: Tue, 4 Aug 2026 14:09:07 +0000 Subject: [PATCH 02/10] Fix Vale LangChain.DashesSpaces errors in approval-modes Remove spaces around em dashes on two lines that Vale flagged as LangChain.DashesSpaces errors. --- src/oss/deepagents/code/approval-modes.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/oss/deepagents/code/approval-modes.mdx b/src/oss/deepagents/code/approval-modes.mdx index 7450c413fb..8dec3bfb02 100644 --- a/src/oss/deepagents/code/approval-modes.mdx +++ b/src/oss/deepagents/code/approval-modes.mdx @@ -184,13 +184,13 @@ A blank value at any level means "inherit from the next source". For example, an -The TUI displays which model is reviewing when Auto turns on and inside `/auto model` output — including models set by env var or `config.toml`. +The TUI displays which model is reviewing when Auto turns on and inside `/auto model` output—including models set by env var or `config.toml`. A weaker classifier means weaker review. A less capable model may be more susceptible to prompt injection in the content it reads. This tradeoff is documented in the Deep Agents Code threat model (T14). -**Fail-closed on errors.** If the configured classifier model cannot be built — because of a bad spec, missing credentials, or a missing provider package — the calls it would have reviewed are **denied** and do not fall back to the main model. After repeated failures, Auto stops and shows you the normal approval UI. The error message names the model so you can identify and fix the problem. +**Fail-closed on errors.** If the configured classifier model cannot be built—because of a bad spec, missing credentials, or a missing provider package—the calls it would have reviewed are **denied** and do not fall back to the main model. After repeated failures, Auto stops and shows you the normal approval UI. The error message names the model so you can identify and fix the problem. ### Revalidate before side effects From 43c44ff3b236da87c8f0355172cf88a5e494e88e Mon Sep 17 00:00:00 2001 From: Mason Daugherty Date: Tue, 4 Aug 2026 11:00:54 -0400 Subject: [PATCH 03/10] Update src/oss/deepagents/code/cli-reference.mdx Co-authored-by: Naomi Pentrel <5212232+npentrel@users.noreply.github.com> --- src/oss/deepagents/code/cli-reference.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/oss/deepagents/code/cli-reference.mdx b/src/oss/deepagents/code/cli-reference.mdx index 649c7c7c72..c23a8a98a2 100644 --- a/src/oss/deepagents/code/cli-reference.mdx +++ b/src/oss/deepagents/code/cli-reference.mdx @@ -318,7 +318,7 @@ Run OAuth login for MCP servers marked `auth: "oauth"` with `dcode mcp login Date: Tue, 4 Aug 2026 11:01:08 -0400 Subject: [PATCH 04/10] Update src/oss/deepagents/code/approval-modes.mdx --- src/oss/deepagents/code/approval-modes.mdx | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/oss/deepagents/code/approval-modes.mdx b/src/oss/deepagents/code/approval-modes.mdx index 8dec3bfb02..d250af4e9a 100644 --- a/src/oss/deepagents/code/approval-modes.mdx +++ b/src/oss/deepagents/code/approval-modes.mdx @@ -186,10 +186,6 @@ A blank value at any level means "inherit from the next source". For example, an The TUI displays which model is reviewing when Auto turns on and inside `/auto model` output—including models set by env var or `config.toml`. - - A weaker classifier means weaker review. A less capable model may be more susceptible to prompt injection in the content it reads. This tradeoff is documented in the Deep Agents Code threat model (T14). - - **Fail-closed on errors.** If the configured classifier model cannot be built—because of a bad spec, missing credentials, or a missing provider package—the calls it would have reviewed are **denied** and do not fall back to the main model. After repeated failures, Auto stops and shows you the normal approval UI. The error message names the model so you can identify and fix the problem. ### Revalidate before side effects From 6e91d1a65d03eb353d89378db004ed558e2c3587 Mon Sep 17 00:00:00 2001 From: Mason Daugherty Date: Tue, 4 Aug 2026 11:01:18 -0400 Subject: [PATCH 05/10] Update src/oss/deepagents/code/config-file.mdx --- src/oss/deepagents/code/config-file.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/oss/deepagents/code/config-file.mdx b/src/oss/deepagents/code/config-file.mdx index cfc4c7d4de..241068ac65 100644 --- a/src/oss/deepagents/code/config-file.mdx +++ b/src/oss/deepagents/code/config-file.mdx @@ -17,7 +17,7 @@ description: Configure model providers, defaults, retries, and gateways in confi [models] default = "ollama:qwen3:4b" # your intentional long-term preference recent = "google_genai:gemini-3.6-flash" # last /model switch (written automatically) -auto_classifier = "anthropic:claude-haiku-4-5" # optional: cheaper model for Auto approval review +auto_classifier = "openai:gpt-5.6-luna" # optional: cheaper model for Auto approval review ``` `[models].default` always takes priority over `[models].recent`. The `/model` command only writes to `[models].recent`, so your configured default is never overwritten by mid-session switches. To remove the default, use `/model --default --clear` or delete the `default` key from the config file. From c234a9f4b16662a7ff47c01b7bbfc8815af983c8 Mon Sep 17 00:00:00 2001 From: Naomi Pentrel <5212232+npentrel@users.noreply.github.com> Date: Tue, 4 Aug 2026 16:58:55 +0200 Subject: [PATCH 06/10] minor update --- src/oss/deepagents/code/approval-modes.mdx | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/src/oss/deepagents/code/approval-modes.mdx b/src/oss/deepagents/code/approval-modes.mdx index d250af4e9a..f93871906b 100644 --- a/src/oss/deepagents/code/approval-modes.mdx +++ b/src/oss/deepagents/code/approval-modes.mdx @@ -141,15 +141,7 @@ flowchart TD By default, the Auto classifier uses the same model as the main agent. You can point it at a different (typically cheaper and faster) model to reduce cost and latency during Auto review without affecting the model used for your actual tasks. -Set the classifier model through any of these sources, listed from highest to lowest precedence: - -1. **`/auto model` TUI command** — takes effect immediately for the current session. -2. **`--auto-classifier-model` flag** — sets the classifier for the launch (interactive TUI sessions only). -3. **`DEEPAGENTS_CODE_AUTO_CLASSIFIER_MODEL` environment variable** — applies at startup. -4. **`[models].auto_classifier` in `config.toml`** — your persistent default. -5. **Inherit** — uses the main agent model (the default when nothing is configured). - -A blank value at any level means "inherit from the next source". For example, an unset env var falls through to `config.toml`. +Set the classifier model through any of these source: @@ -183,8 +175,18 @@ A blank value at any level means "inherit from the next source". For example, an ``` +
+ + 1. **`/auto model` TUI command**: takes effect immediately for the current session. + 2. **`--auto-classifier-model` flag**: sets the classifier on launch (interactive TUI sessions only). + 3. **`DEEPAGENTS_CODE_AUTO_CLASSIFIER_MODEL` environment variable**: applies at startup. + 4. **`[models].auto_classifier` in `config.toml`**: your persistent default. + 5. **Inherit**: uses the main agent model (the default when nothing is configured). + + A blank value at any level means "inherit from the next source". For example, an unset env var falls through to `config.toml`. + -The TUI displays which model is reviewing when Auto turns on and inside `/auto model` output—including models set by env var or `config.toml`. +The TUI displays which model is reviewing when Auto turns on and inside `/auto model` output. **Fail-closed on errors.** If the configured classifier model cannot be built—because of a bad spec, missing credentials, or a missing provider package—the calls it would have reviewed are **denied** and do not fall back to the main model. After repeated failures, Auto stops and shows you the normal approval UI. The error message names the model so you can identify and fix the problem. From 96d296194ed8b89bd121d4de28eb0d5a0aae0153 Mon Sep 17 00:00:00 2001 From: Naomi Pentrel <5212232+npentrel@users.noreply.github.com> Date: Tue, 4 Aug 2026 17:06:05 +0200 Subject: [PATCH 07/10] fixup --- src/oss/deepagents/code/cli-reference.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/oss/deepagents/code/cli-reference.mdx b/src/oss/deepagents/code/cli-reference.mdx index c23a8a98a2..7579f03605 100644 --- a/src/oss/deepagents/code/cli-reference.mdx +++ b/src/oss/deepagents/code/cli-reference.mdx @@ -318,7 +318,7 @@ Run OAuth login for MCP servers marked `auth: "oauth"` with `dcode mcp login Date: Tue, 4 Aug 2026 17:09:35 +0200 Subject: [PATCH 08/10] Update src/oss/deepagents/code/approval-modes.mdx --- src/oss/deepagents/code/approval-modes.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/oss/deepagents/code/approval-modes.mdx b/src/oss/deepagents/code/approval-modes.mdx index f93871906b..f5baaadac2 100644 --- a/src/oss/deepagents/code/approval-modes.mdx +++ b/src/oss/deepagents/code/approval-modes.mdx @@ -188,7 +188,7 @@ Set the classifier model through any of these source: The TUI displays which model is reviewing when Auto turns on and inside `/auto model` output. -**Fail-closed on errors.** If the configured classifier model cannot be built—because of a bad spec, missing credentials, or a missing provider package—the calls it would have reviewed are **denied** and do not fall back to the main model. After repeated failures, Auto stops and shows you the normal approval UI. The error message names the model so you can identify and fix the problem. +**Fail-closed on errors.** If the configured classifier model cannot be built due to a bad spec, missing credentials, or a missing provider package, the calls it would have reviewed are **denied** and do not fall back to the main model. After repeated failures, Auto stops and shows you the normal approval UI. The error message names the model so you can identify and fix the problem. ### Revalidate before side effects From 2d28e97741b2080d66defb4db1f412c63c2ef495 Mon Sep 17 00:00:00 2001 From: Docs Writer Bot Date: Tue, 4 Aug 2026 17:49:00 +0000 Subject: [PATCH 09/10] Apply review feedback on Auto classifier model docs - TUI command tab: lead with /auto model interactive picker as the happy path; direct provider:model spec is still shown but secondary - Remove spec-validation note from TUI tab - Remove 'errors in non-interactive and ACP modes' from CLI flag tab - Remove project .env security rationale from Warning - Remove fail-closed on errors paragraph - Switch example model to openai:gpt-5.6-luna throughout --- src/oss/deepagents/code/approval-modes.mdx | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/oss/deepagents/code/approval-modes.mdx b/src/oss/deepagents/code/approval-modes.mdx index f5baaadac2..7f6dbf2de7 100644 --- a/src/oss/deepagents/code/approval-modes.mdx +++ b/src/oss/deepagents/code/approval-modes.mdx @@ -145,33 +145,35 @@ Set the classifier model through any of these source: + Run `/auto model` to open the interactive model picker and select a classifier model for the current session. To specify a model directly, pass it as an argument: + ```txt - /auto model anthropic:claude-haiku-4-5 + /auto model openai:gpt-5.6-luna /auto model clear ``` - `/auto model` validates the spec before accepting it. Use `/auto model clear` to go back to inheriting the main model. + Use `/auto model clear` to go back to inheriting the main model. ```bash - dcode -y --auto-classifier-model anthropic:claude-haiku-4-5 + dcode -y --auto-classifier-model openai:gpt-5.6-luna ``` - `--auto-classifier-model` is only accepted in interactive TUI sessions. It errors in non-interactive (`-n`) and ACP server modes. + `--auto-classifier-model` is only accepted in interactive TUI sessions. ```bash - export DEEPAGENTS_CODE_AUTO_CLASSIFIER_MODEL="anthropic:claude-haiku-4-5" + export DEEPAGENTS_CODE_AUTO_CLASSIFIER_MODEL="openai:gpt-5.6-luna" ``` - A **project `.env`** cannot set `DEEPAGENTS_CODE_AUTO_CLASSIFIER_MODEL`. Only shell exports, `~/.deepagents/.env`, the CLI flag, and `/auto model` work. This prevents a cloned repository from silently redirecting your approval review to a weaker model. + A **project `.env`** cannot set `DEEPAGENTS_CODE_AUTO_CLASSIFIER_MODEL`. Only shell exports, `~/.deepagents/.env`, the CLI flag, and `/auto model` work. ```toml title="~/.deepagents/config.toml" [models] - auto_classifier = "anthropic:claude-haiku-4-5" + auto_classifier = "openai:gpt-5.6-luna" ``` @@ -188,8 +190,6 @@ Set the classifier model through any of these source: The TUI displays which model is reviewing when Auto turns on and inside `/auto model` output. -**Fail-closed on errors.** If the configured classifier model cannot be built due to a bad spec, missing credentials, or a missing provider package, the calls it would have reviewed are **denied** and do not fall back to the main model. After repeated failures, Auto stops and shows you the normal approval UI. The error message names the model so you can identify and fix the problem. - ### Revalidate before side effects The decision plan is bound to the thread, mode, batch, and exact gated calls. Missing or invalid state, a mode race, or a replay falls back to human review. For example, if you switch to Manual while classifier review is in progress, an earlier Auto decision cannot execute silently; the normal approval UI opens instead. From d31e87e96de84e5d0bd9c8f155389476091ef315 Mon Sep 17 00:00:00 2001 From: Mason Daugherty Date: Tue, 4 Aug 2026 14:25:45 -0400 Subject: [PATCH 10/10] Apply suggestion from @mdrxy --- src/oss/deepagents/code/approval-modes.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/oss/deepagents/code/approval-modes.mdx b/src/oss/deepagents/code/approval-modes.mdx index 7f6dbf2de7..1833e738f1 100644 --- a/src/oss/deepagents/code/approval-modes.mdx +++ b/src/oss/deepagents/code/approval-modes.mdx @@ -139,7 +139,7 @@ flowchart TD ### Select a classifier model -By default, the Auto classifier uses the same model as the main agent. You can point it at a different (typically cheaper and faster) model to reduce cost and latency during Auto review without affecting the model used for your actual tasks. +By default, the Auto classifier uses the same model as the main agent. You can point it at a different (typically cheaper and faster) model to reduce cost and latency during Auto review. Set the classifier model through any of these source: