---
title: "Diff of the run's checkout"
description: "Unified diff of tracked changes against HEAD in the run's sandbox checkout (WIBLO-085.7)."
api_method: GET
api_path: "/v1/agent-runs/{runId}/git/diff"
canonical_url: https://wiblo.app/docs/developers/api/agent-git/get-agent-run-git-diff
last_updated: 2026-07-28T17:12:38+02:00
md_url: https://wiblo.app/docs/developers/api/agent-git/get-agent-run-git-diff.md
---

# Diff of the run's checkout

`GET /v1/agent-runs/{runId}/git/diff`

Unified diff of tracked changes against HEAD in the run's sandbox checkout (WIBLO-085.7). Per-user rate-limited at 60/60s.

## Path parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `runId` | `string` | Yes |  |

## Request

**curl**

```bash
curl https://api.wiblo.app/v1/agent-runs/{runId}/git/diff \
  -H "Authorization: Bearer $WIBLO_TOKEN"
```

**TypeScript**

```ts
import { createSdk, getAgentRunGitDiff } from "@workspace/sdk"

const sdk = createSdk({ baseUrl: "https://api.wiblo.app" })

const { data, error } = await getAgentRunGitDiff({
  client: sdk,
  path: { runId: "..." },
})
```

## Responses

**`200`** — The checkout's working-tree diff. Returns `AgentGitDiffResponse`.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `runId` | `string` | Yes |  |
| `diff` | `string` | Yes |  |

**`401`** — No valid session cookie or `wbl_*` bearer was present. Returns `ApiErrorEnvelope`.

**`404`** — No run visible to the caller with this id (`AGENT_RUN_NOT_FOUND`). Returns `ApiErrorEnvelope`.

**`409`** — No live sandbox session holds the checkout (`AGENT_SANDBOX_UNAVAILABLE`). Returns `ApiErrorEnvelope`.

**`422`** — Path/body validation failed, or the run has no Git source (`AGENT_RUN_NOT_GIT_BACKED`). Returns `ApiErrorEnvelope`.

**`429`** — Rate limit exceeded. The body's `error.code` is `RATE_LIMITED` and `error.details.retry_after` is the same number of seconds as the `Retry-After` header. Returns `ApiErrorEnvelope`.

**`502`** — The Git operation failed against the provider/checkout (`UPSTREAM_UNAVAILABLE`). Returns `ApiErrorEnvelope`.
