Request cooperative cancellation of a session task.
const url = 'https://app.everruns.com/api/v1/sessions/example/tasks/example/cancel';const options = {method: 'POST'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://app.everruns.com/api/v1/sessions/example/tasks/example/cancelParameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”Session ID
Task ID
Responses
Section titled “ Responses ”Task with cancel intent recorded
A unit of background work owned by a session.
object
Typed link to something the task produced.
object
Session VFS path, when the artifact lives in the session filesystem.
Artifact type: “file”, “url”, “session”, “pr”, etc.
External URL, when the artifact lives elsewhere.
Execution attempt, starting at 1. Incremented on re-attach.
Cooperative cancel intent. A flag, not a state.
Human-readable label.
task_* public ID.
Task kind: “subagent”, “external_agent”, “background_tool”, “monitor”, …
Cross-references owned by a task.
object
Child session, for subagent-shaped tasks. Full transcript lives there.
Remote task ID, for tasks wrapping an external protocol task (A2A).
Session resources (sandboxes, browser sessions) this task holds.
Machine result in the session VFS: /.tasks/{task_id}/result.json.
Owning session.
Kind-specific input (instructions, tool args, external agent id).
object
Lifecycle state of a session task.
Three classes: active (queued, running), interrupted (awaiting_input,
resumable), terminal (succeeded, failed, canceled). Timeout and
rejection are error.kind values on failed, not states.
Short live status line (“polling remote task”, “iteration 4/10”).
Human-readable outcome.
When outbound task activity wakes the owning session’s agent.
Example
{ "state": "queued", "wake_policy": "silent"}Session or task not found