List Run Files Changed
Returns the set of file changes produced by a run as a list of before/after diffs.
While the run's sandbox is reachable, diffs are resolved live against the sandbox working tree at the current HEAD. Degraded responses keep the same data: FileDiff[] shape. File contents are null on every entry; non-sensitive non-flagged entries include unified_patch, while sensitive / binary / symlink / submodule / truncated entries render through the same placeholder flags used by the live path.
Responses are bounded by per-file (256 KiB / 20k lines), per-run aggregate (5 MiB), and per-request (200 files) caps. Files exceeding a cap are returned with truncated: true and empty contents. Sensitive paths (credentials, keys) are elided with sensitive: true and empty contents.
Path parameters
Unique run identifier (ULID).
Query parameters
Maximum number of items to return per page.
Number of items to skip before returning results.
Diff scope to return. Defaults to committed changes only. Sandbox-backed responses honor all scopes for tracked files; untracked files are excluded. Final-patch fallback responses always represent the stored committed/final diff.
Explicit start SHA for a commit-range diff. Must be supplied together with to_sha; when present, scope must be omitted and the response scope is range.
Explicit end SHA for a commit-range diff. Must be supplied together with from_sha; when present, scope must be omitted and the response scope is range.
Response
File diffs for the run
Example response
{
"data": [
{
"old_file": {
"name": "src/commands/run.ts",
"contents": "import { parseArgs } from \"node:util\";"
},
"new_file": {
"name": "src/commands/run.ts",
"contents": "import { parseArgs } from \"node:util\";"
},
"change_kind": "modified"
}
],
"meta": {
"stats": {
"additions": 567,
"deletions": 234
},
"total_changed": 3,
"to_sha": "a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0"
}
}