Skip to content

The Agent Tasks endpoints let you inspect and control the background subagent tasks running inside a live session. Use them to ask the session for a snapshot of its current tasks, retrieve an individual task’s transcript from a cursor, cancel a single task mid-turn, or cancel every background task at once. All four endpoints are fire-and-forget from the HTTP side: the gateway returns a short JSON acknowledgment, and the actual task data is delivered on the session’s WS/SSE stream.

Asks a live session to emit its background-subagent task snapshot (session.task_listevent.tasks_snapshot).

NameInTypeRequiredDescription
idpathstringYesPath identifier.
X-Hoody-CwdheaderstringNoPer-request working-directory scope (§6.1): the .hoody project layer / record cwd / tool+workflow cwd. Required by routes that resolve a cwd (e.g. POST /todos; createTodo also accepts a body cwd).
X-Hoody-Config-DirheaderstringNoPer-request —config-dir override (§6.1) selecting which on-disk .hoody install a stateless read/write resolves (HoodyPaths).
X-Hoody-ContainerheaderstringNoPer-request bound remote container (§6.1; omitted = local). Rejected (400) on routes with no container dimension.
X-Hoody-RealmheaderstringNoPer-request realm selector (§6.1): “global” or a 24-hex id (also accepted as ?realm=). Rejected (400 realm_scope_unsupported) on active-only / no-realm routes.
realmquerystringNoPer-request realm selector (§6.1) — the in:query alias of the X-Hoody-Realm header (read only when the header is absent): “global” or a 24-hex id. Rejected (400 realm_scope_unsupported) on active-only / no-realm routes.
Terminal window
curl -X GET "https://api.hoody.com/api/v1/agent/sessions/507f1f77bcf86cd799439011/tasks" \
-H "Authorization: Bearer <token>"
{
"ok": true,
"event": "tasks_snapshot"
}

Asks a live session to emit a background task’s transcript from an after_seq cursor (session.task_transcriptevent.task_transcript). The transcript arrives on the session’s stream, not inline.

GET /api/v1/agent/sessions/{id}/tasks/{tid}/transcript

Section titled “GET /api/v1/agent/sessions/{id}/tasks/{tid}/transcript”
NameInTypeRequiredDefaultDescription
idpathstringYesPath identifier.
tidpathstringYesPath identifier.
after_seqqueryintegerNo0int64 upsert-poll cursor; entries at/below it are re-sent (default 0).
X-Hoody-CwdheaderstringNoPer-request working-directory scope (§6.1): the .hoody project layer / record cwd / tool+workflow cwd. Required by routes that resolve a cwd (e.g. POST /todos; createTodo also accepts a body cwd).
X-Hoody-Config-DirheaderstringNoPer-request —config-dir override (§6.1) selecting which on-disk .hoody install a stateless read/write resolves (HoodyPaths).
X-Hoody-ContainerheaderstringNoPer-request bound remote container (§6.1; omitted = local). Rejected (400) on routes with no container dimension.
X-Hoody-RealmheaderstringNoPer-request realm selector (§6.1): “global” or a 24-hex id (also accepted as ?realm=). Rejected (400 realm_scope_unsupported) on active-only / no-realm routes.
realmquerystringNoPer-request realm selector (§6.1) — the in:query alias of the X-Hoody-Realm header (read only when the header is absent): “global” or a 24-hex id. Rejected (400 realm_scope_unsupported) on active-only / no-realm routes.
Terminal window
curl -X GET "https://api.hoody.com/api/v1/agent/sessions/507f1f77bcf86cd799439011/tasks/abc123def456abc123def456/transcript?after_seq=42" \
-H "Authorization: Bearer <token>"
{
"ok": true,
"event": "task_transcript"
}

Cancels one background subagent task on a live session (session.task_cancel). The cancel is handled at the server layer, so it works mid-turn. This endpoint does not accept a request body.

POST /api/v1/agent/sessions/{id}/tasks/{tid}/cancel

Section titled “POST /api/v1/agent/sessions/{id}/tasks/{tid}/cancel”
NameInTypeRequiredDescription
idpathstringYesPath identifier.
tidpathstringYesPath identifier.
X-Hoody-CwdheaderstringNoPer-request working-directory scope (§6.1): the .hoody project layer / record cwd / tool+workflow cwd. Required by routes that resolve a cwd (e.g. POST /todos; createTodo also accepts a body cwd).
X-Hoody-Config-DirheaderstringNoPer-request —config-dir override (§6.1) selecting which on-disk .hoody install a stateless read/write resolves (HoodyPaths).
X-Hoody-ContainerheaderstringNoPer-request bound remote container (§6.1; omitted = local). Rejected (400) on routes with no container dimension.
X-Hoody-RealmheaderstringNoPer-request realm selector (§6.1): “global” or a 24-hex id (also accepted as ?realm=). Rejected (400 realm_scope_unsupported) on active-only / no-realm routes.
realmquerystringNoPer-request realm selector (§6.1) — the in:query alias of the X-Hoody-Realm header (read only when the header is absent): “global” or a 24-hex id. Rejected (400 realm_scope_unsupported) on active-only / no-realm routes.
Terminal window
curl -X POST "https://api.hoody.com/api/v1/agent/sessions/507f1f77bcf86cd799439011/tasks/abc123def456abc123def456/cancel" \
-H "Authorization: Bearer <token>"
{
"ok": true,
"cancelled": true
}

Cancels every background subagent task on a live session in one call (session.task_cancel with an empty task id cancels all). This endpoint does not accept a request body.

POST /api/v1/agent/sessions/{id}/tasks/cancel

Section titled “POST /api/v1/agent/sessions/{id}/tasks/cancel”
NameInTypeRequiredDescription
idpathstringYesPath identifier.
X-Hoody-CwdheaderstringNoPer-request working-directory scope (§6.1): the .hoody project layer / record cwd / tool+workflow cwd. Required by routes that resolve a cwd (e.g. POST /todos; createTodo also accepts a body cwd).
X-Hoody-Config-DirheaderstringNoPer-request —config-dir override (§6.1) selecting which on-disk .hoody install a stateless read/write resolves (HoodyPaths).
X-Hoody-ContainerheaderstringNoPer-request bound remote container (§6.1; omitted = local). Rejected (400) on routes with no container dimension.
X-Hoody-RealmheaderstringNoPer-request realm selector (§6.1): “global” or a 24-hex id (also accepted as ?realm=). Rejected (400 realm_scope_unsupported) on active-only / no-realm routes.
realmquerystringNoPer-request realm selector (§6.1) — the in:query alias of the X-Hoody-Realm header (read only when the header is absent): “global” or a 24-hex id. Rejected (400 realm_scope_unsupported) on active-only / no-realm routes.
Terminal window
curl -X POST "https://api.hoody.com/api/v1/agent/sessions/507f1f77bcf86cd799439011/tasks/cancel" \
-H "Authorization: Bearer <token>"
{
"ok": true,
"cancelled_all": true
}