> ## Documentation Index
> Fetch the complete documentation index at: https://warden.buildlab.in/llms.txt
> Use this file to discover all available pages before exploring further.

# Debug Mode

> A breakpoint debugger for your agent's database traffic.

Debug Mode pauses operations that policy would have allowed, so you can watch what your agent actually does. Most teams are surprised the first time.

```bash theme={null}
warden debug attach --connection shop --filter writes
```

Or from the [operator view](https://warden.buildlab.in/operate/operator-view.md), or the control plane:

```bash theme={null}
curl -X POST -H "Authorization: Bearer $OK" -H 'Content-Type: application/json' \
  -d '{"connection":"shop","classes":["write","delete"],"ttl_minutes":30}' \
  http://127.0.0.1:9470/api/v1/debug/sessions
```

## What you see

For each paused operation: the statement as it will run — scoped, column-restricted, masked — its parameters, its class, whether it is provably bounded, how many records it estimates, the hazards it carries, and the agent's own stated reason for doing it. For a change, the same preview a reviewer gets.

## What you can do

| Action | Effect |
| - | - |
| **Step** | Allow this operation; keep pausing the rest |
| **Continue** | Release everything waiting and stop pausing for this session |
| **Reject** | Refuse it, with a reason the agent receives |
| **Stop** | End the session. Anything still waiting is refused, not released |

Ending a session refuses what is pending rather than letting it through: a session that ends because you closed your laptop should not commit a queue of changes.

## Filters

Pause everything, or only what you care about:

| Filter | Pauses |
| - | - |
| `all` | Every operation |
| `reads` | Reads only |
| `writes` | Writes and deletes |
| `ddl` | Schema changes |
| `unbounded` | Only operations that are not provably bounded |

Sessions can also be limited to particular agents, and carry a TTL so one left open expires on its own.

## Exporting a session

```bash theme={null}
curl -H "Authorization: Bearer $OK" \
  http://127.0.0.1:9470/api/v1/debug/sessions/$ID/export
```

The export is every operation the session saw, with your verdict attached to each: the statement, the resources, whether it was bounded, what you decided, and why. That is a labelled record of what an agent tried to do with a human's judgement beside it — directly usable as an evaluation set for improving the agent.

> [!NOTE]
>
> **Debug Mode always blocks**, even when the connection or the request asks for async approval. It is an interactive tool: a person is stepping through the agent live, and there is nothing to poll for.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.