---
title: "Remove a repo folder from the run's workspace"
description: "Deletes /vercel/sandbox/{folder} on the RUNNING sandbox (WIBLO-131)."
api_method: DELETE
api_path: "/v1/agent-runs/{runId}/repos/{folder}"
canonical_url: https://wiblo.app/docs/developers/api/agent-run-repos/remove-agent-run-repo
last_updated: 2026-07-28T17:12:38+02:00
md_url: https://wiblo.app/docs/developers/api/agent-run-repos/remove-agent-run-repo.md
---

# Remove a repo folder from the run's workspace

`DELETE /v1/agent-runs/{runId}/repos/{folder}`

Deletes `/vercel/sandbox/{folder}` on the RUNNING sandbox (WIBLO-131). The base agent project (`main`) is refused; unknown folders are 404. Unpushed work in the folder is lost — the durable history is whatever auto-save already pushed. Per-user rate-limited at 15/60s.

## Path parameters

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

## Request

**curl**

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

**TypeScript**

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

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

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

## Responses

**`200`** — The folder was removed. Returns `RemoveAgentRepoResponse`.

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

**`400`** — Invalid or reserved folder (`INVALID_REPO_FOLDER`). Returns `ApiErrorEnvelope`.

**`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 worktree (`AGENT_SANDBOX_UNAVAILABLE`). Returns `ApiErrorEnvelope`.

**`422`** — Path param failed UUID validation (`INVALID_PARAMS`). 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`.
