Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
c68197c
docs: backfill Deep Agents Code configuration
mdrxy Aug 26, 2026
f8cb006
Apply suggestion from @mdrxy
mdrxy Aug 26, 2026
86f8ae9
Apply suggestion from @mdrxy
mdrxy Aug 26, 2026
acb8f70
Apply suggestion from @mdrxy
mdrxy Aug 26, 2026
53f104d
Apply suggestion from @mdrxy
mdrxy Aug 26, 2026
399aed5
Apply suggestion from @mdrxy
mdrxy Aug 26, 2026
ce8551b
Apply suggestion from @mdrxy
mdrxy Aug 26, 2026
1797369
Apply suggestion from @mdrxy
mdrxy Aug 26, 2026
eefa0c2
Apply suggestion from @mdrxy
mdrxy Aug 26, 2026
a533e45
Apply suggestion from @mdrxy
mdrxy Aug 26, 2026
e4ab890
Apply suggestion from @mdrxy
mdrxy Aug 26, 2026
12e478f
Apply suggestion from @mdrxy
mdrxy Aug 26, 2026
0a7b22d
Apply suggestion from @mdrxy
mdrxy Aug 26, 2026
38481f2
Apply suggestion from @mdrxy
mdrxy Aug 26, 2026
4a99a44
Apply suggestion from @mdrxy
mdrxy Aug 26, 2026
24705ac
Apply suggestion from @mdrxy
mdrxy Aug 26, 2026
25ec453
Apply suggestion from @mdrxy
mdrxy Aug 26, 2026
62ba6cb
feat: document Deep Agents Code managed configuration
mdrxy Aug 21, 2026
3ddd615
Apply suggestion from @mdrxy
mdrxy Aug 24, 2026
cf6185e
docs: align managed config with current dcode
mdrxy Aug 24, 2026
3c2ffff
Apply suggestion from @mdrxy
mdrxy Aug 24, 2026
813ffee
docs: document remote managed configuration
mdrxy Aug 26, 2026
8f2318e
docs: make managed configuration guidance clearer
mdrxy Aug 26, 2026
d4b6e07
Apply suggestion from @mdrxy
mdrxy Aug 27, 2026
dbacb5f
Apply suggestion from @mdrxy
mdrxy Aug 27, 2026
33e6f1a
docs: group model restrictions with managed policy
mdrxy Aug 27, 2026
a2d66cc
docs: address configuration review feedback
mdrxy Aug 27, 2026
e8305d0
docs: update Deep Agents Code approval workflows
mdrxy Aug 26, 2026
f598d90
Apply suggestion from @mdrxy
mdrxy Aug 26, 2026
2334ec9
Apply suggestion from @mdrxy
mdrxy Aug 26, 2026
d5b8121
Apply suggestion from @mdrxy
mdrxy Aug 26, 2026
06a7726
Apply suggestion from @mdrxy
mdrxy Aug 26, 2026
77ba3ae
Apply suggestion from @mdrxy
mdrxy Aug 26, 2026
0940f1d
Apply suggestion from @mdrxy
mdrxy Aug 27, 2026
a4b5197
Apply suggestion from @mdrxy
mdrxy Aug 27, 2026
1a2eac8
Apply suggestion from @mdrxy
mdrxy Aug 27, 2026
38dea31
docs: add Deep Agents Code diagnostic commands
mdrxy Aug 26, 2026
4679559
Apply suggestion from @mdrxy
mdrxy Aug 26, 2026
b3bd30f
Apply suggestion from @mdrxy
mdrxy Aug 26, 2026
e9bf772
Apply suggestion from @mdrxy
mdrxy Aug 27, 2026
0b77520
Apply suggestion from @mdrxy
mdrxy Aug 27, 2026
60da870
docs: address remaining configuration feedback
mdrxy Aug 27, 2026
85040a7
docs: refresh runtime and retry configuration
mdrxy Aug 27, 2026
6144558
Merge branch 'mdrxy/docs/dcode-configuration-backfill' into mdrxy/doc…
mdrxy Aug 27, 2026
b2c4c16
docs: align approval workflows with current behavior
mdrxy Aug 27, 2026
dd38db0
Merge branch 'mdrxy/docs/dcode-approval-goals' into mdrxy/docs/dcode-…
mdrxy Aug 27, 2026
8a20478
docs: refresh Deep Agents Code shortcuts
mdrxy Aug 27, 2026
60ce3e3
docs: complete shortcut refresh
mdrxy Aug 27, 2026
f75f3a6
docs: address configuration review
mdrxy Aug 27, 2026
b704605
docs: address configuration review
mdrxy Aug 27, 2026
402f0bc
Merge branch 'mdrxy/docs/dcode-configuration-backfill' into mdrxy/doc…
mdrxy Aug 27, 2026
33676ec
docs: address approval workflow review
mdrxy Aug 27, 2026
ca7de60
Merge branch 'mdrxy/docs/dcode-approval-goals' into mdrxy/docs/dcode-…
mdrxy Aug 27, 2026
97574c8
docs: address diagnostics review
mdrxy Aug 27, 2026
f2a8081
docs: fix goal configuration reference
mdrxy Aug 27, 2026
35bae6e
Merge branch 'mdrxy/docs/dcode-approval-goals' into mdrxy/docs/dcode-…
mdrxy Aug 27, 2026
d2c155a
docs: fix reload reference
mdrxy Aug 27, 2026
9a7a1c5
Merge origin/main into diagnostics docs
mdrxy Aug 27, 2026
e4429da
Apply suggestion from @mdrxy
mdrxy Aug 27, 2026
afd62e1
docs: address diagnostics review feedback
mdrxy Aug 27, 2026
eb68b0b
docs: clarify custom pricing fallback
mdrxy Aug 27, 2026
64e18f7
chore: record collaborative attribution
mdrxy Aug 27, 2026
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
97 changes: 95 additions & 2 deletions src/oss/deepagents/code/cli-reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -233,14 +233,106 @@ Valid names are `ls`, `read_file`, `write_file`, `edit_file`, `delete`, `glob`,
```
</Note>

Run `/tools` in a session to inspect the active tool set. From the shell, place tool-shaping flags before the subcommand:
Run [`/tools`](#diagnose-and-audit-a-session) in a session to inspect the active tool set. From the shell, place tool-shaping flags before the subcommand:

```bash
dcode tools list
dcode --allow-fs-tools ls,read_file tools list
dcode --allow-fs-tools ls,read_file tools list --json
```

## Diagnose and audit a session

Deep Agents Code exposes read-only slash commands for inspecting what a session loads and spends: `/tools` lists the active tool set, `/context-doctor` audits the context injected before the conversation starts, and `/cost` reports the thread's estimated spend. Use them to confirm that a tool-shaping flag took effect or to find the source of unexpected context growth.

### List available tools

Run `/tools` in a session to list the tools the current agent can call, grouped into built-in tools and tools from each MCP server:

```text
/tools
```

```text
**7 tools available**

### Built-in

| Tool | Description |
|---|---|
| read_file | Read a file from the filesystem |
| write_file | Write content to a file |
| execute | Run a shell command |
| web_search | Search the web |
| task | Launch a subagent |

### github

- create_issue
- search_repositories

MCP tool descriptions are available in /mcp.

### Unavailable MCP servers

| Server | Status |
|---|---|
| slack | needs login |
```

Unavailable MCP servers appear in a separate table. Run `/reload` after changing MCP configuration, then use `/tools` to verify the active tool set. For the non-interactive equivalent, see [`dcode tools list`](#cli-commands).

### Audit injected context

Run `/context-doctor` in a session to audit what the session injects into every model request and its estimated token cost. The report breaks the injected context into the base system prompt, `AGENTS.md` memory files, the skills index, built-in tool schemas, and each MCP server's tool schemas, then totals what the agent carries before the conversation starts:

```text
/context-doctor
```

```text
Fresh-session context audit (estimated tokens)

System prompt (base) ~6
AGENTS.md memory (1 files) ~1,286
Skills index (1 loaded) ~477 largest: code-review ~15
Built-in tool schemas (1 tools) ~13 sent with every request
MCP: docs (1 tool) ~31
MCP: broken ~0 connection failed
TOTAL injected before conversation ~ 1,813
Conversation history ~ 4,200
Provider-reported context 9,000
Unattributed / estimation delta +2,987

Approximate: section counts use about four characters per token.
Trim skills or disable an MCP server, then run /context-doctor again.
```

A large unattributed delta or injected total points to context you may want to trim. After changing skills or MCP configuration, run `/context-doctor` again to confirm.

### Track thread cost

Run `/cost` in a session to show the thread's estimated cost in USD:

```text
/cost
```

```text
Estimated thread cost: $1.03

By type since this thread was loaded:
- Assistant: $0.87
- Subagents: $0.16

By model since this thread was loaded:
- anthropic:claude-sonnet-4-5: $1.03
```

The total includes model calls from the assistant, subagents, offloading, Auto classification, and rubric grading. It persists when you resume or switch threads. Estimates use the [genai-prices](https://github.com/pydantic/genai-prices) catalog; requests without pricing are excluded.

Use `/tokens` for the token counts behind the estimate. For uncovered models, [add a custom pricing override](/oss/deepagents/code/configuration#custom-pricing-overrides).

## Startup commands and initial prompts

Use `-m`/`--message` to auto-submit an initial prompt when an interactive session starts. Combine with `--startup-cmd` to run a shell command first:
Expand Down Expand Up @@ -389,7 +481,7 @@ Pair `dcode doctor` with `dcode config show` when you need both a high-level hea
| `dcode agents reset --agent NAME` | Clear agent memory and reset to default. Supports `--dry-run` |
| `dcode agents reset --agent NAME --target SOURCE` | Copy memory from another agent |
| `dcode update` | Check for and install Deep Agents Code updates |
| `dcode doctor` | Run diagnostics without launching a session |
| `dcode doctor` | Run diagnostics without launching a session. See [Run diagnostics](#run-diagnostics-dcode-doctor) |
| `dcode skills list [--project]` | List all skills (alias: `ls`) |
| `dcode skills create NAME [--project]` | Create a new skill with template `SKILL.md`. Idempotent—re-creating an existing skill prints an informational message instead of an error |
| `dcode skills info NAME [--project]` | Show detailed information about a skill |
Expand Down Expand Up @@ -418,3 +510,4 @@ Destructive commands (`agents reset`, `skills delete`, `threads delete`) support
- [Configuration](/oss/deepagents/code/configuration)
- [Config file](/oss/deepagents/code/config-file)
- [Provider credentials](/oss/deepagents/code/credentials)
- [MCP tools](/oss/deepagents/code/mcp-tools)
23 changes: 23 additions & 0 deletions src/oss/deepagents/code/configuration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,29 @@ Deep Agents Code refreshes its model pricing catalog from upstream hourly in the
</Tab>
</Tabs>

### Custom pricing overrides

For models that the catalog does not cover, add rates to `~/.deepagents/prices.json`. The file uses the [genai-prices](https://github.com/pydantic/genai-prices) provider-array schema. For example:

```json
[
{
"id": "my-provider",
"name": "My provider",
"api_pattern": "gateway\\.example\\.com",
"models": [
{
"id": "my-model",
"match": { "equals": "my-model" },
"prices": { "input_mtok": 2.5, "output_mtok": 10.0 }
}
]
}
]
```

Rates are in USD per million tokens. Restart Deep Agents Code after editing the file. Custom rates apply only when the genai-prices catalog does not include the model.

To suppress automatic update checks entirely:

<Tabs>
Expand Down
18 changes: 12 additions & 6 deletions src/oss/deepagents/code/quickstart.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,12 @@ The agent uses its built-in tools, skills, and memory to help you with tasks.
- `/skill-creator [task]`: Guide for creating effective agent skills.
- `/offload` (alias `/compact`) - Free up context window space by offloading messages to storage with a summary placeholder. The agent can retrieve the full history from the offloaded file if needed.
- `/context`: Open a color-coded context-window usage report with model capacity, usage categories, and remaining space.
- `/context-doctor`: Audit the context injected into the session and its estimated token cost. See [Audit injected context](/oss/deepagents/code/cli-reference#audit-injected-context).
- `/tools`: List the built-in and MCP tools available to the current agent. See [List available tools](/oss/deepagents/code/cli-reference#list-available-tools).
- `/cost`: Show the thread's estimated cost. See [Track thread cost](/oss/deepagents/code/cli-reference#track-thread-cost).
- `/tokens`: Display current context window token usage breakdown.
- `/clear`: Clear conversation history and start a new thread.
- `/force-clear`: Stop active work, clear the chat, and start a new thread.
- `/clear`: Start a fresh thread.
- `/force-clear`: Recover a stuck session with a fresh thread.
- `/copy`: Copy the latest assistant message to the clipboard.
- `/prompts`: Search, preview, copy, and reuse previously submitted prompts.
- `/threads`: Browse and resume previous conversation threads.
Expand Down Expand Up @@ -111,9 +114,10 @@ The agent uses its built-in tools, skills, and memory to help you with tasks.
| `Enter` | Submit prompt |
| `Shift+Enter`, `Ctrl+J`, `Alt+Enter`, or `Ctrl+Enter` | Insert newline |
| `@filename` | Auto-complete files and inject content |
| `Shift+Tab` or `Ctrl+T` | Toggle between Manual and Auto [approval mode](/oss/deepagents/code/approval-modes) |
| `Ctrl+X` | Open prompt in external editor |
| `Ctrl+N` | Review pending notifications |
| `Shift+Tab` | Cycle [approval modes](/oss/deepagents/code/approval-modes) |
| `Ctrl+G` | Open prompt in external editor |
| `Ctrl+T` | Expand or collapse the subagent panel when one is present |
| `Ctrl+N` | Review pending notifications when the panel is open |
| `Ctrl+O` | Expand/collapse the most recent tool output |
| `Escape` | Interrupt current operation |
| `Ctrl+C` | Interrupt or quit |
Expand Down Expand Up @@ -159,9 +163,11 @@ Run `/context` to open a color-coded report of the current model's context-windo

Provider-reported totals remain distinct from local conversation estimates. When a provider total is unavailable, the report labels the conversation count as an estimate and marks the total usage as unavailable. Use `/tokens` when you want a text summary in the conversation transcript instead.

When usage grows faster than expected, run `/context-doctor` to attribute tokens to each injected component: the base system prompt, memory files, the skills index, built-in tool schemas, and MCP tool schemas. To confirm which tools the agent can currently call, run `/tools`. For the thread's running cost estimate, run `/cost`; the same figure appears in the status bar. See [Diagnose and audit a session](/oss/deepagents/code/cli-reference#diagnose-and-audit-a-session).

### External editor

Press `Ctrl+X` or type `/editor` to compose prompts in an external editor. Deep Agents Code checks `$VISUAL`, then `$EDITOR`, then falls back to `vi` (macOS/Linux) or `notepad` (Windows). GUI editors (VS Code, Cursor, Zed, etc.) automatically receive a `--wait` flag so Deep Agents Code blocks until you close the file.
Press `Ctrl+G` or type `/editor` to compose prompts in an external editor. Deep Agents Code checks `$VISUAL`, then `$EDITOR`, then falls back to `vi` (macOS/Linux) or `notepad` (Windows). GUI editors (VS Code, Cursor, Zed, etc.) automatically receive a `--wait` flag so Deep Agents Code blocks until you close the file.

```bash
# Set in your shell profile (~/.zshrc, ~/.bashrc, etc.)
Expand Down
Loading