`GET /api/tool-approvals/pending` — the interactive approvals `pending` across the caller's active workspace (the `X-Workspace-Id` header, else the default joined workspace), newest first, REDACTED for delivery. Read-only; the decision flows through `decide` below. The service authz's the caller's membership of the resolved workspace.
const url = 'https://example.com/api/tool-approvals/pending';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://example.com/api/tool-approvals/pendingGET /api/tool-approvals/pending — the interactive approvals pending across
the caller’s active workspace (the X-Workspace-Id header, else the default
joined workspace), newest first, REDACTED for delivery. Read-only; the decision
flows through decide below. The service authz’s the caller’s membership of the
resolved workspace.
Responses
Section titled “Responses”OK
A pending approval as the chat/web pending-list surfaces it — the compact,
REDACTED projection (pending_tool_approvals port / the dashboard view), so
no surface re-redacts. payload is already redacted for chat delivery.
object
#712 UX-3 — the agent (harness) type of the owning task (e.g. claude). None
when the task was deleted.
AUD-UX-032 — the asker did not park on this gate (tool_input.deferred): a
deferred question returned immediately, so deciding it sends no resume.
AUD-UX-006 — the pull request the owning task opened (task_outcomes.pr_url),
so an inbox row can open it. None when the task opened none or was deleted.
#712 UX-3 — the owning task’s project name. None when the task has no project
or it was deleted.
AUD-UX-032 — the owning task’s status (completed, running, …). A gate on a
TERMINAL task (every visual sign-off, a deferred question, a tier change) has
no agent waiting on it: the answer is saved and used when the item is re-run,
so a surface must not advise cancelling the task. None when it was deleted.
The owning task title identifies the work in the Approvals inbox. It is absent when the LEFT JOIN has no retained task. This identifier is not redacted.
Example generated
[ { "agent_type": "example", "created_at": "2026-04-15T12:00:00Z", "deadline_at": "2026-04-15T12:00:00Z", "deferred": true, "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "image_urls": [ "example" ], "kind": "example", "payload": "example", "pr_url": "example", "project_name": "example", "task_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "task_status": "example", "task_title": "example", "timeout_policy": "example", "workspace_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" }]Authentication required
The canonical JSON body of every error response. Every AppError serializes as
this exact shape; code is the generated stable machine-readable vocabulary.
object
Present only on an MCP budget refusal (429) — the refusing layer + retry hint.
object
The refusing layer.
The layer’s budget.
Seconds until a retry can pass, or null when it never will for this session.
Calls already counted in the layer.
Machine-readable, stable error code.
Present only on a quota-exceeded 403 — the inline upgrade-CTA payload.
object
The entitlement feature key that was hit, e.g. apps.max_count.
The plan’s limit for this key.
Where to send the user to upgrade.
Current usage (count or bytes, per the key).
Human-readable message (the server’s English text; the client may localize
by code).
Present on a launch refusal (400/403/409) — the structured facts only the refusing class can fill: occupancy, exhausted budget, or required labels.
object
Weighted workspace slots already held by starting/running agent runs.
The budget cap that refused.
Effective spend of the refusing budget scope (spend + in-flight reservations).
The workspace’s configured agent-concurrency cap.
The provider whose budget cap refused; absent for the workspace-wide cap.
Runner labels a fail-policy placement required and no runner offered.
Example
{ "code": "not_found"}Permission denied
The canonical JSON body of every error response. Every AppError serializes as
this exact shape; code is the generated stable machine-readable vocabulary.
object
Present only on an MCP budget refusal (429) — the refusing layer + retry hint.
object
The refusing layer.
The layer’s budget.
Seconds until a retry can pass, or null when it never will for this session.
Calls already counted in the layer.
Machine-readable, stable error code.
Present only on a quota-exceeded 403 — the inline upgrade-CTA payload.
object
The entitlement feature key that was hit, e.g. apps.max_count.
The plan’s limit for this key.
Where to send the user to upgrade.
Current usage (count or bytes, per the key).
Human-readable message (the server’s English text; the client may localize
by code).
Present on a launch refusal (400/403/409) — the structured facts only the refusing class can fill: occupancy, exhausted budget, or required labels.
object
Weighted workspace slots already held by starting/running agent runs.
The budget cap that refused.
Effective spend of the refusing budget scope (spend + in-flight reservations).
The workspace’s configured agent-concurrency cap.
The provider whose budget cap refused; absent for the workspace-wide cap.
Runner labels a fail-policy placement required and no runner offered.
Example
{ "code": "not_found"}Structured server error
The canonical JSON body of every error response. Every AppError serializes as
this exact shape; code is the generated stable machine-readable vocabulary.
object
Present only on an MCP budget refusal (429) — the refusing layer + retry hint.
object
The refusing layer.
The layer’s budget.
Seconds until a retry can pass, or null when it never will for this session.
Calls already counted in the layer.
Machine-readable, stable error code.
Present only on a quota-exceeded 403 — the inline upgrade-CTA payload.
object
The entitlement feature key that was hit, e.g. apps.max_count.
The plan’s limit for this key.
Where to send the user to upgrade.
Current usage (count or bytes, per the key).
Human-readable message (the server’s English text; the client may localize
by code).
Present on a launch refusal (400/403/409) — the structured facts only the refusing class can fill: occupancy, exhausted budget, or required labels.
object
Weighted workspace slots already held by starting/running agent runs.
The budget cap that refused.
Effective spend of the refusing budget scope (spend + in-flight reservations).
The workspace’s configured agent-concurrency cap.
The provider whose budget cap refused; absent for the workspace-wide cap.
Runner labels a fail-policy placement required and no runner offered.
Example
{ "code": "not_found"}