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

# Devin AI SDK harness diagnostics

> What the Devin harness adapter reports through the AI SDK onLog channel while it sets up the sandbox, bridge, and Devin session.

With `debug: { enabled: true }` on the `HarnessAgent`, the adapter reports what it is doing
through the harness's standard diagnostics channel (`onLog`), so a UI can show setup progress
before Devin's first token and explain failures. Each event carries `sessionId`, a `subsystem`
and a short `message`:

| `subsystem` | Level | When |
| - | - | - |
| `devin.bridge.attach` | info | Attaching to a bridge parked by a previous turn |
| `devin.bridge.attach` | warn | The attach failed (`error` attached); the bridge is respawned |
| `devin.bridge.spawn` | info | Installing and starting a fresh bridge in the sandbox |
| `devin.bridge.ready` | info | The bridge WebSocket is connected |
| `devin.cli` | info | Starting the Devin CLI inside the sandbox (once per bridge) |
| `devin.session` | info | Creating a new Devin session, or loading the resumed one |
| `devin.session.ready` | info | The Devin session is open |
| `devin.prompt` | info | The prompt was sent; the next event is Devin's output |

```ts theme={null}
const agent = new HarnessAgent({
  harness: createDevin(),
  sandbox,
  debug: { enabled: true, level: "info" },
  onLog: (event) => {
    if (event.subsystem.startsWith("devin.")) console.log(event.sessionId, event.message);
  },
});
```

Sandbox creation and the bootstrap install happen before the adapter runs and are not reported
here; the first `devin.bridge.*` event marks the point where the sandbox is ready. The
[harness-chat example](https://docs.devin.ai/sdk/examples/harness-chat.md) builds a status line on these events.


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