Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/oss/deepagents/code/cli-reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,7 @@ Run OAuth login for MCP servers marked `auth: "oauth"` with `dcode mcp login <se
| `--rubric-model MODEL` | Model the rubric grader uses. Defaults to the main agent model. Requires `-n` or piped stdin |
| `--rubric-max-iterations N` | Grader iterations per rubric attempt before stopping. Requires `-n` or piped stdin |
| `-n`, `--non-interactive TEXT` | Run a single task non-interactively and exit. Shell is disabled unless `--shell-allow-list` is set |
| `--recursion-limit N` | LangGraph graph step budget (max node invocations per turn). Valid range: `25`–`100000`. Out-of-range or non-integer values log a warning and fall back to the default (`2000`). Overrides `DEEPAGENTS_CODE_RECURSION_LIMIT` and `[runtime].recursion_limit` in `config.toml` |
| `--max-turns N` | Cap agentic turns in non-interactive mode. Exits with code 124 when exceeded. Requires `-n` or piped stdin. See [Non-interactive mode and piping](#non-interactive-mode-and-piping) |
| `--timeout SECONDS` | Hard wall-clock timeout for non-interactive mode. Exits with code 124 when exceeded. Requires `-n` or piped stdin. See [Non-interactive mode and piping](#non-interactive-mode-and-piping) |
| `-q`, `--quiet` | Clean output for piping—only the agent's response goes to stdout. Requires `-n` or piped stdin |
Expand Down
43 changes: 43 additions & 0 deletions src/oss/deepagents/code/config-file.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,49 @@ On a machine provisioned with a model gateway (for example, the LangSmith gatewa

To use your own key instead, store it with `/auth` (leave the base URL blank for the provider default, or set it explicitly), or set the `DEEPAGENTS_CODE_` prefixed key and endpoint. Both override the gateway pair without leaving a mismatched endpoint behind.

## Agent runtime limits

The LangGraph graph step budget is the maximum number of node invocations the `dcode` agent graph may execute in a single turn. Configure this recursion limit with the `[runtime]` section:

```toml title="~/.deepagents/config.toml"
[runtime]
recursion_limit = 2000
```

The default is `2000`. Valid values are integers from `25` to `100000` (inclusive). Values outside this range or non-integer values log a warning and fall back to the default.

Precedence (highest to lowest):

1. `--recursion-limit` CLI flag
2. `DEEPAGENTS_CODE_RECURSION_LIMIT` environment variable
3. `[runtime].recursion_limit` in `config.toml`
4. Built-in default (`2000`)

Use `dcode config get runtime.recursion_limit` to see the effective value and its source.

<Tabs>
<Tab title="CLI flag">
```bash
dcode --recursion-limit 5000
```
</Tab>
<Tab title="Environment variable">
```bash
export DEEPAGENTS_CODE_RECURSION_LIMIT=5000
```
</Tab>
<Tab title="Config file">
```toml title="~/.deepagents/config.toml"
[runtime]
recursion_limit = 5000
```
</Tab>
</Tabs>

<Note>
`goal_rubric` recursion limits are separate and unaffected by this setting.
</Note>

## See also

- [Configuration](/oss/deepagents/code/configuration)
Expand Down
4 changes: 4 additions & 0 deletions src/oss/deepagents/code/configuration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,10 @@ All Deep Agents Code-specific environment variables use the `DEEPAGENTS_CODE_` p
Disable automatic update checking when set. This also prevents automatic update installs at startup.
</ResponseField>

<ResponseField name="DEEPAGENTS_CODE_RECURSION_LIMIT" type="integer" post={["optional"]}>
LangGraph graph step budget, which is the maximum number of node invocations the `dcode` agent graph may execute per turn. Valid range: `25`–`100000`. Out-of-range or non-integer values log a warning and fall back to the default (`2000`). Overridden by `--recursion-limit` at the CLI. See [Agent runtime limits](/oss/deepagents/code/config-file#agent-runtime-limits).
</ResponseField>

<ResponseField name="DEEPAGENTS_CODE_SHELL_ALLOW_LIST" type="string" post={["optional"]}>
Comma-separated shell commands to allow (or `recommended` / `all`).
</ResponseField>
Expand Down
Loading