Sessions are the persistent containers for Hoody’s LLM-driven workflows. Each session holds a conversation history, a frozen start binding (realm, container, cwd, tool mode, dir scope, backend), and an attached event stream. This page covers every operation on a session: discovery, lifecycle, turn dispatch, gate handling, live configuration, and per-session workflow input. Use these endpoints to wire a UI or backend service into the Hoody agent.
List persisted sessions for the requesting cwd (open and closed), with an Attached flag for live sessions. Pagination is honored via ?page=N&limit=M; omit limit to receive the full set.
SDK: client.agent.sessions.listSessionsIterator()
Name In Type Required Description include_systemquery boolean No When true, also include daemon-owned system/resident sessions in the listing. pagequery integer No 1-based page number for pagination. limitquery integer No Maximum items per page (0 = no pagination). X-Hoody-Cwdheader string No Per-request working-directory scope (§6.1). X-Hoody-Config-Dirheader string No Per-request --config-dir override (§6.1). X-Hoody-Containerheader string No Per-request bound remote container (§6.1; omitted = local). X-Hoody-Realmheader string No Per-request realm selector. Rejected (400) on active-only / no-realm routes. realmquery string No In-query alias of the X-Hoody-Realm header.
"id" : " 5f9a8b2c3d4e5f6a7b8c9d0e " ,
"title" : " Refactor auth middleware " ,
"model" : " claude-opus-4-6 " ,
"cwd" : " /home/user/projects/api " ,
"created_at" : " 2025-01-15T10:23:45Z " ,
"updated_at" : " 2025-01-15T10:42:11Z "
"message" : " invalid request "
Error Code Title Description Resolution bad_requestBad request The request was malformed or carried invalid parameters. Correct the request body or query parameters. realm_scope_unsupportedRealm scope unsupported A per-request realm header was supplied to an active-only / global-no-realm RPC, which has no realm dimension to scope. Omit the realm header on this route, or open a session to scope by realm.
"message" : " request must arrive through the Hoody proxy "
Error Code Title Description Resolution forbiddenForbidden (not via the Hoody proxy) The request did not arrive through hoody-proxy: its source IP is private/local. Authorization is owned by hoody-proxy. Reach the agent through hoody-proxy (e.g. hoody agent … → platform → proxy), not by connecting to the container directly.
"message" : " request rate limit exceeded "
Error Code Title Description Resolution rate_limitedToo many requests The per-client request rate limit was exceeded; the gateway throttled the request before dispatch. Honor the Retry-After header and retry; reduce the request rate.
"code" : " internal_error " ,
"message" : " internal server error "
Error Code Title Description Resolution internal_errorInternal error An unexpected error occurred while handling the request. Retry; if persistent, inspect the daemon logs.
const iterator = await client . agent . sessions . listSessionsIterator ( {
Return the persisted summary for a session (live or closed). A live session also surfaces its frozen start binding (realm, container, modes) and attached: true.
SDK: client.agent.sessions.getSession()
Name In Type Required Description idpath string Yes Path identifier. X-Hoody-Cwdheader string No Per-request working-directory scope (§6.1). X-Hoody-Config-Dirheader string No Per-request --config-dir override (§6.1). X-Hoody-Containerheader string No Per-request bound remote container (§6.1; omitted = local). X-Hoody-Realmheader string No Per-request realm selector. Rejected (400) on active-only / no-realm routes. realmquery string No In-query alias of the X-Hoody-Realm header.
"id" : " 5f9a8b2c3d4e5f6a7b8c9d0e " ,
"title" : " Refactor auth middleware " ,
"model" : " claude-opus-4-6 " ,
"cwd" : " /home/user/projects/api " ,
"created_at" : " 2025-01-15T10:23:45Z " ,
"updated_at" : " 2025-01-15T10:42:11Z "
"message" : " invalid request "
Error Code Title Description Resolution bad_requestBad request The request was malformed or carried invalid parameters. Correct the request body or query parameters. realm_scope_unsupportedRealm scope unsupported A per-request realm header was supplied to an active-only / global-no-realm RPC. Omit the realm header on this route, or open a session to scope by realm.
"message" : " request must arrive through the Hoody proxy "
Error Code Title Description Resolution forbiddenForbidden (not via the Hoody proxy) The request did not arrive through hoody-proxy. Reach the agent through hoody-proxy, not by connecting to the container directly.
"message" : " resource not found "
Error Code Title Description Resolution not_foundNot found The requested resource does not exist. Verify the path and identifier.
"message" : " request rate limit exceeded "
Error Code Title Description Resolution rate_limitedToo many requests The per-client request rate limit was exceeded. Honor the Retry-After header and retry; reduce the request rate.
"code" : " internal_error " ,
"message" : " internal server error "
Error Code Title Description Resolution internal_errorInternal error An unexpected error occurred while handling the request. Retry; if persistent, inspect the daemon logs.
const session = await client . agent . sessions . getSession ( {
id: " 5f9a8b2c3d4e5f6a7b8c9d0e "
Return the gateway’s buffered event tail for a LIVE session (the daemon’s full viewport snapshot already streamed into the replay ring), with min_seq/max_seq for resume. For a non-live session, attach to receive the daemon’s event.replay.
SDK: client.agent.sessions.replaySession()
Name In Type Required Description idpath string Yes Path identifier. X-Hoody-Cwdheader string No Per-request working-directory scope (§6.1). X-Hoody-Config-Dirheader string No Per-request --config-dir override (§6.1). X-Hoody-Containerheader string No Per-request bound remote container (§6.1; omitted = local). X-Hoody-Realmheader string No Per-request realm selector. Rejected (400) on active-only / no-realm routes. realmquery string No In-query alias of the X-Hoody-Realm header.
"text" : " I'll start by reading the auth middleware file. "
"type" : " agent_tool_call " ,
"args" : { "path" : " /src/auth/middleware.ts " }
"message" : " invalid request "
Error Code Title Description Resolution bad_requestBad request The request was malformed or carried invalid parameters. Correct the request body or query parameters. realm_scope_unsupportedRealm scope unsupported A per-request realm header was supplied to an active-only / global-no-realm RPC. Omit the realm header on this route, or open a session to scope by realm.
"message" : " request must arrive through the Hoody proxy "
Error Code Title Description Resolution forbiddenForbidden (not via the Hoody proxy) The request did not arrive through hoody-proxy. Reach the agent through hoody-proxy, not by connecting to the container directly.
"message" : " resource not found "
Error Code Title Description Resolution not_foundNot found The requested resource does not exist. Verify the path and identifier.
"message" : " request rate limit exceeded "
Error Code Title Description Resolution rate_limitedToo many requests The per-client request rate limit was exceeded. Honor the Retry-After header and retry; reduce the request rate.
"code" : " internal_error " ,
"message" : " internal server error "
Error Code Title Description Resolution internal_errorInternal error An unexpected error occurred while handling the request. Retry; if persistent, inspect the daemon logs.
"code" : " service_unavailable " ,
"message" : " service unavailable "
Error Code Title Description Resolution service_unavailableService unavailable The daemon could not service the request (too busy, or a per-client stream concurrency cap was hit). Honor Retry-After and retry.
const replay = await client . agent . sessions . replaySession ( {
id: " 5f9a8b2c3d4e5f6a7b8c9d0e "
WebSocket (primary) or SSE attach to a live session’s full event.* taxonomy. Events carry a gateway-stamped monotonic int64 seq; ?since=<seq> / Last-Event-ID resume from the 1024-event replay ring. A slow client is dropped lagged and never backpressures the daemon. WS clients may post inline answer frames (confirm/answer/cancel/workflow_message).
SDK: client.agent.sessions.streamSession()
Name In Type Required Description idpath string Yes Path identifier. sincequery integer No Resume from this gateway int64 seq (also accepted as the Last-Event-ID header). Last-Event-IDheader string No SSE resume cursor — the gateway int64 seq to resume from; sent automatically by an SSE client on reconnect. X-Hoody-Cwdheader string No Per-request working-directory scope (§6.1). X-Hoody-Config-Dirheader string No Per-request --config-dir override (§6.1). X-Hoody-Containerheader string No Per-request bound remote container (§6.1; omitted = local). X-Hoody-Realmheader string No Per-request realm selector. Rejected (400) on active-only / no-realm routes. realmquery string No In-query alias of the X-Hoody-Realm header.
WebSocket upgrade accepted (WS transport). No body; the connection switches to the WS frame protocol.
Event stream (SSE transport):
data: {"text":"Reading the auth middleware file..."}
data: {"name":"read_file","args":{"path":"/src/auth/middleware.ts"}}
"code" : " realm_scope_unsupported " ,
"message" : " realm scope not supported on this route "
Error Code Title Description Resolution realm_scope_unsupportedRealm scope unsupported A per-request realm/container header contradicts the session’s frozen binding. Omit the realm header on this route, or open a session to scope by realm.
"message" : " request must arrive through the Hoody proxy "
Error Code Title Description Resolution forbiddenForbidden (not via the Hoody proxy) The request did not arrive through hoody-proxy. Reach the agent through hoody-proxy, not by connecting to the container directly.
"message" : " resource not found "
Error Code Title Description Resolution not_foundNot found The requested resource does not exist. Verify the path and identifier.
"message" : " request rate limit exceeded "
Error Code Title Description Resolution rate_limitedToo many requests The per-client request rate limit was exceeded. Honor the Retry-After header and retry; reduce the request rate.
"code" : " service_unavailable " ,
"message" : " service unavailable "
Error Code Title Description Resolution service_unavailableService unavailable The daemon could not service the request. Honor Retry-After and retry.
const stream = await client . agent . sessions . streamSession ( {
id: " 5f9a8b2c3d4e5f6a7b8c9d0e " ,
Return the distinct working directories across all persisted sessions, most-recent first.
SDK: client.agent.sessions.listSessionCwds()
Name In Type Required Description X-Hoody-Cwdheader string No Per-request working-directory scope (§6.1). X-Hoody-Config-Dirheader string No Per-request --config-dir override (§6.1). X-Hoody-Containerheader string No Per-request bound remote container (§6.1; omitted = local). X-Hoody-Realmheader string No Per-request realm selector. Rejected (400) on active-only / no-realm routes. realmquery string No In-query alias of the X-Hoody-Realm header.
" /home/user/projects/api " ,
" /home/user/projects/web " ,
"message" : " invalid request "
Error Code Title Description Resolution bad_requestBad request The request was malformed or carried invalid parameters. Correct the request body or query parameters. realm_scope_unsupportedRealm scope unsupported A per-request realm header was supplied to an active-only / global-no-realm RPC. Omit the realm header on this route, or open a session to scope by realm.
"message" : " request must arrive through the Hoody proxy "
Error Code Title Description Resolution forbiddenForbidden (not via the Hoody proxy) The request did not arrive through hoody-proxy. Reach the agent through hoody-proxy, not by connecting to the container directly.
"message" : " request rate limit exceeded "
Error Code Title Description Resolution rate_limitedToo many requests The per-client request rate limit was exceeded. Honor the Retry-After header and retry; reduce the request rate.
"code" : " internal_error " ,
"message" : " internal server error "
Error Code Title Description Resolution internal_errorInternal error An unexpected error occurred while handling the request. Retry; if persistent, inspect the daemon logs.
const cwds = await client . agent . sessions . listSessionCwds ();
Open a new agent session (or fork/attach an existing one), freezing realm/container/cwd/tool_mode/dir_scope/backend at start. BYOA: backend:"acp" + delegated_agent delegates the session to an external CLI agent.
SDK: client.agent.sessions.createSession()
Name In Type Required Description X-Hoody-Cwdheader string No Per-request working-directory scope (§6.1). X-Hoody-Config-Dirheader string No Per-request --config-dir override (§6.1). X-Hoody-Containerheader string No Per-request bound remote container (§6.1; omitted = local). X-Hoody-Realmheader string No Per-request realm selector. Rejected (400) on active-only / no-realm routes. realmquery string No In-query alias of the X-Hoody-Realm header.
Field Type Required Description realmstring No Realm selector to scope the session (frozen at start). containerstring No Container id/selector to run tools on (frozen at start). cwdstring No Working directory for the session (frozen at start). config_dirstring No Config directory override. modelstring No Initial model id. agentstring No Initial chat-agent name. tool_modestring No Initial tool mode (frozen at start). dir_scopestring No Initial directory-access scope: home|full (frozen at start). attachstring No attach_session_id — attach to an existing session instead of creating one.forkstring No fork_session_id — fork from an existing session.fork_turn_idxinteger No Turn index to fork at (with fork). backendstring No Session backend: "" (Hoody LLM) or acp (BYOA delegated agent). delegated_agentstring No BYOA agent when backend:"acp": codex|claude|gemini|opencode. headlessboolean No Start the session in headless posture.
"id" : " 5f9a8b2c3d4e5f6a7b8c9d0e " ,
"model" : " claude-opus-4-6 " ,
"cwd" : " /home/user/projects/api " ,
"message" : " invalid request "
Error Code Title Description Resolution bad_requestBad request The request was malformed or carried invalid parameters. Correct the request body or query parameters. realm_blockedRealm blocked The requested realm is blocked or corrupt; the request fails closed before dispatch. Select a valid, reachable realm. realm_corruptRealm record corrupt The attach target’s persisted realm binding is corrupt; the session cannot be re-bound and the request fails closed. Recreate the session in a valid realm. realm_conflictRealm conflict The supplied realm conflicts with the parent’s (fork) or the session’s frozen (attach) realm binding. Omit the realm header to inherit, or match the existing binding. invalid_realmInvalid realm selector The realm selector is malformed (not ""/"global"/a 24-hex id). Pass a valid realm selector. container_conflictContainer conflict The supplied container conflicts with the parent’s (fork) or the session’s frozen (attach) container binding. Omit the container header to inherit, or match the existing binding. delegated_agent_invalidDelegated agent invalid The delegated_agent value (for backend:"acp") is not a known BYOA backend. Use one of codex | claude | gemini | opencode.
"message" : " request must arrive through the Hoody proxy "
Error Code Title Description Resolution forbiddenForbidden (not via the Hoody proxy) The request did not arrive through hoody-proxy. Reach the agent through hoody-proxy, not by connecting to the container directly.
"message" : " resource not found "
Error Code Title Description Resolution not_foundNot found The requested resource does not exist. Verify the path and identifier.
"message" : " session is already live in another connection "
Error Code Title Description Resolution session_busySession busy The session is already live in another connection (single-writer-per-session). Close the other attach, or attach a fork instead. session_not_attachableSession not attachable The attach target is a daemon-managed session (e.g. a todo worker) and cannot be attached over HTTP. Attach a user session, or fork the target instead of attaching it.
"code" : " payload_too_large " ,
"message" : " request body exceeds the configured size limit "
Error Code Title Description Resolution payload_too_largePayload too large The request body exceeds the configured size cap (MaxBodyBytes). Reduce the request body below the configured limit (default 8 MiB); split a large payload into smaller requests.
"message" : " working directory does not exist "
Error Code Title Description Resolution cwd_not_foundWorking directory not found The requested working directory does not exist on the daemon host. Create the directory or pass an existing cwd. container_goneBound container no longer exists The session’s frozen REMOTE container no longer exists in its realm. Start a new session and pick another container (or this computer).
"message" : " request rate limit exceeded "
Error Code Title Description Resolution rate_limitedToo many requests The per-client request rate limit was exceeded. Honor the Retry-After header and retry; reduce the request rate.
"code" : " internal_error " ,
"message" : " internal server error "
Error Code Title Description Resolution internal_errorInternal error An unexpected error occurred while handling the request. Retry; if persistent, inspect the daemon logs.
"code" : " service_unavailable " ,
"message" : " service unavailable "
Error Code Title Description Resolution service_unavailableService unavailable The daemon could not service the request. Honor Retry-After and retry.
const session = await client . agent . sessions . createSession ( {
cwd: " /home/user/projects/api " ,
model: " claude-opus-4-6 " ,
Tear the session down (the daemon cancels it and removes it from the live map).
SDK: client.agent.sessions.closeSession()
Name In Type Required Description idpath string Yes Path identifier. X-Hoody-Cwdheader string No Per-request working-directory scope (§6.1). X-Hoody-Config-Dirheader string No Per-request --config-dir override (§6.1). X-Hoody-Containerheader string No Per-request bound remote container (§6.1; omitted = local). X-Hoody-Realmheader string No Per-request realm selector. Rejected (400) on active-only / no-realm routes. realmquery string No In-query alias of the X-Hoody-Realm header.
This endpoint takes no parameters beyond the path and headers.
"id" : " 5f9a8b2c3d4e5f6a7b8c9d0e " ,
"message" : " invalid request "
Error Code Title Description Resolution bad_requestBad request The request was malformed or carried invalid parameters. Correct the request body or query parameters. realm_scope_unsupportedRealm scope unsupported A per-request realm header was supplied to an active-only / global-no-realm RPC. Omit the realm header on this route, or open a session to scope by realm.
"message" : " request must arrive through the Hoody proxy "
Error Code Title Description Resolution forbiddenForbidden (not via the Hoody proxy) The request did not arrive through hoody-proxy. Reach the agent through hoody-proxy, not by connecting to the container directly.
"message" : " resource not found "
Error Code Title Description Resolution not_foundNot found The requested resource does not exist. Verify the path and identifier.
"code" : " payload_too_large " ,
"message" : " request body exceeds the configured size limit "
Error Code Title Description Resolution payload_too_largePayload too large The request body exceeds the configured size cap (MaxBodyBytes). Reduce the request body below the configured limit (default 8 MiB).
"message" : " request rate limit exceeded "
Error Code Title Description Resolution rate_limitedToo many requests The per-client request rate limit was exceeded. Honor the Retry-After header and retry; reduce the request rate.
"code" : " internal_error " ,
"message" : " internal server error "
Error Code Title Description Resolution internal_errorInternal error An unexpected error occurred while handling the request. Retry; if persistent, inspect the daemon logs.
"code" : " service_unavailable " ,
"message" : " service unavailable "
Error Code Title Description Resolution service_unavailableService unavailable The daemon could not service the request. Honor Retry-After and retry.
await client . agent . sessions . closeSession ({
id: " 5f9a8b2c3d4e5f6a7b8c9d0e "
Stop the active turn at the server layer; spares the session and background tasks (distinct from close). Also aborts an in-flight in-session direct tool run (e.g. POST /sessions/{id}/tools/{name}:run) — it holds the same serial turn slot.
SDK: client.agent.sessions.cancelSession()
Name In Type Required Description idpath string Yes Path identifier. X-Hoody-Cwdheader string No Per-request working-directory scope (§6.1). X-Hoody-Config-Dirheader string No Per-request --config-dir override (§6.1). X-Hoody-Containerheader string No Per-request bound remote container (§6.1; omitted = local). X-Hoody-Realmheader string No Per-request realm selector. Rejected (400) on active-only / no-realm routes. realmquery string No In-query alias of the X-Hoody-Realm header.
This endpoint takes no parameters beyond the path and headers.
"id" : " 5f9a8b2c3d4e5f6a7b8c9d0e " ,
"message" : " invalid request "
Error Code Title Description Resolution bad_requestBad request The request was malformed or carried invalid parameters. Correct the request body or query parameters. realm_scope_unsupportedRealm scope unsupported A per-request realm header was supplied to an active-only / global-no-realm RPC. Omit the realm header on this route, or open a session to scope by realm.
"message" : " request must arrive through the Hoody proxy "
Error Code Title Description Resolution forbiddenForbidden (not via the Hoody proxy) The request did not arrive through hoody-proxy. Reach the agent through hoody-proxy, not by connecting to the container directly.
"message" : " resource not found "
Error Code Title Description Resolution not_foundNot found The requested resource does not exist. Verify the path and identifier.
"code" : " payload_too_large " ,
"message" : " request body exceeds the configured size limit "
Error Code Title Description Resolution payload_too_largePayload too large The request body exceeds the configured size cap. Reduce the request body below the configured limit (default 8 MiB).
"message" : " request rate limit exceeded "
Error Code Title Description Resolution rate_limitedToo many requests The per-client request rate limit was exceeded. Honor the Retry-After header and retry; reduce the request rate.
"code" : " internal_error " ,
"message" : " internal server error "
Error Code Title Description Resolution internal_errorInternal error An unexpected error occurred while handling the request. Retry; if persistent, inspect the daemon logs.
"code" : " service_unavailable " ,
"message" : " service unavailable "
Error Code Title Description Resolution service_unavailableService unavailable The daemon could not service the request. Honor Retry-After and retry.
await client . agent . sessions . cancelSession ({
id: " 5f9a8b2c3d4e5f6a7b8c9d0e "
Close the live session connection (the daemon cancels the session). ?hard=true also removes the persisted record. A hard delete resolves the persisted record under the request’s X-Hoody-Config-Dir header (not a body field) — to hard-delete a session that was CREATED with a body config_dir override, send the same directory as X-Hoody-Config-Dir, otherwise the delete resolves the home sessions dir, finds nothing, and returns 404.
SDK: client.agent.sessions.deleteSession()
Name In Type Required Description idpath string Yes Path identifier. hardquery boolean No When true, also remove the persisted session record (not just the live connection). X-Hoody-Cwdheader string No Per-request working-directory scope (§6.1). X-Hoody-Config-Dirheader string No Per-request --config-dir override (§6.1). X-Hoody-Containerheader string No Per-request bound remote container (§6.1; omitted = local). X-Hoody-Realmheader string No Per-request realm selector. Rejected (400) on active-only / no-realm routes. realmquery string No In-query alias of the X-Hoody-Realm header.
This endpoint takes no request body.
"id" : " 5f9a8b2c3d4e5f6a7b8c9d0e " ,
"message" : " invalid request "
Error Code Title Description Resolution bad_requestBad request The request was malformed or carried invalid parameters. Correct the request body or query parameters. realm_scope_unsupportedRealm scope unsupported A per-request realm header was supplied to an active-only / global-no-realm RPC. Omit the realm header on this route, or open a session to scope by realm. invalid_realmInvalid realm selector The realm selector is malformed (not ""/"global"/a 24-hex id). Pass a valid realm selector.
"message" : " request must arrive through the Hoody proxy "
Error Code Title Description Resolution forbiddenForbidden (not via the Hoody proxy) The request did not arrive through hoody-proxy. Reach the agent through hoody-proxy, not by connecting to the container directly.
"message" : " resource not found "
Error Code Title Description Resolution not_foundNot found The requested resource does not exist. Verify the path and identifier.
"message" : " request rate limit exceeded "
Error Code Title Description Resolution rate_limitedToo many requests The per-client request rate limit was exceeded. Honor the Retry-After header and retry; reduce the request rate.
"code" : " internal_error " ,
"message" : " internal server error "
Error Code Title Description Resolution internal_errorInternal error An unexpected error occurred while handling the request. Retry; if persistent, inspect the daemon logs.
"code" : " service_unavailable " ,
"message" : " service unavailable "
Error Code Title Description Resolution service_unavailableService unavailable The daemon could not service the request. Honor Retry-After and retry.
await client . agent . sessions . deleteSession ({
id: " 5f9a8b2c3d4e5f6a7b8c9d0e " ,
Dispatch a user turn and return {job_id}; observe agent_done on the session’s stream. Refuses a new turn when the session already has a parked gate (409 gate_parked, the parked gate under details.pending_gate) or a turn is already running (409 turn_in_flight) — single-writer, no duplicate parked turns.
SDK: client.agent.sessions.postSessionMessage()
Name In Type Required Description idpath string Yes Path identifier. X-Hoody-Cwdheader string No Per-request working-directory scope (§6.1). X-Hoody-Config-Dirheader string No Per-request --config-dir override (§6.1). X-Hoody-Containerheader string No Per-request bound remote container (§6.1; omitted = local). X-Hoody-Realmheader string No Per-request realm selector. Rejected (400) on active-only / no-realm routes. realmquery string No In-query alias of the X-Hoody-Realm header.
Field Type Required Description textstring No The user message text for this turn. tool_modestring No Optional per-turn tool mode override. dir_scopestring No Optional per-turn directory-access scope override: home|full.
"job_id" : " job-7c4f2a1b9d3e8f5c " ,
"session_id" : " 5f9a8b2c3d4e5f6a7b8c9d0e "
"message" : " invalid request "
Error Code Title Description Resolution bad_requestBad request The request was malformed or carried invalid parameters. Correct the request body or query parameters. realm_scope_unsupportedRealm scope unsupported A per-request realm header was supplied to an active-only / global-no-realm RPC. Omit the realm header on this route, or open a session to scope by realm.
"message" : " request must arrive through the Hoody proxy "
Error Code Title Description Resolution forbiddenForbidden (not via the Hoody proxy) The request did not arrive through hoody-proxy. Reach the agent through hoody-proxy, not by connecting to the container directly.
"message" : " resource not found "
Error Code Title Description Resolution not_foundNot found The requested resource does not exist. Verify the path and identifier.
"message" : " a gate is parked on this session " ,
Error Code Title Description Resolution gate_parkedGate parked A confirm/question gate is parked on this session, so a new turn/workflow run is refused until it is answered. The parked gate is surfaced under details.pending_gate. Answer the parked gate (/confirm or /answer) and retry; read it via GET /sessions/{id} or details.pending_gate. turn_in_flightTurn in flight A turn is already running on this session; the single serial turn slot is occupied, so a new turn/workflow run is refused. Wait for the running turn to finish (observe agent_done on the session stream), then retry.
"code" : " payload_too_large " ,
"message" : " request body exceeds the configured size limit "
Error Code Title Description Resolution payload_too_largePayload too large The request body exceeds the configured size cap. Reduce the request body below the configured limit (default 8 MiB).
"message" : " request rate limit exceeded "
Error Code Title Description Resolution rate_limitedToo many requests The per-client request rate limit was exceeded. Honor the Retry-After header and retry; reduce the request rate.
"code" : " internal_error " ,
"message" : " internal server error "
Error Code Title Description Resolution internal_errorInternal error An unexpected error occurred while handling the request. Retry; if persistent, inspect the daemon logs.
"code" : " service_unavailable " ,
"message" : " service unavailable "
Error Code Title Description Resolution service_unavailableService unavailable The daemon could not service the request. Honor Retry-After and retry.
const { jobId } = await client . agent . sessions . postSessionMessage ( {
id: " 5f9a8b2c3d4e5f6a7b8c9d0e " ,
text: " Refactor the auth middleware to use async/await. "
Dispatch a turn and stream the resulting events over SSE from the seq captured just before the dispatch — only this turn’s events, not the whole retained ring. The explicit X-Hoody-Gate-Policy: auto_approve header (or ?policy=auto_approve) auto-answers confirm gates with approved=true for the life of the stream — off by default.
SDK: client.agent.sessions.promptStream()
Name In Type Required Description idpath string Yes Path identifier. policyquery string No auto_approve auto-answers confirm gates for the life of the stream (alias of the X-Hoody-Gate-Policy header); off by default.X-Hoody-Gate-Policyheader string No Confirm-gate posture (§6): auto_approve adopts the headless auto-answer posture (off by default; the in-query alias is ?policy=). Any other value is rejected 400. X-Hoody-Cwdheader string No Per-request working-directory scope (§6.1). X-Hoody-Config-Dirheader string No Per-request --config-dir override (§6.1). X-Hoody-Containerheader string No Per-request bound remote container (§6.1; omitted = local). X-Hoody-Realmheader string No Per-request realm selector. Rejected (400) on active-only / no-realm routes. realmquery string No In-query alias of the X-Hoody-Realm header.
Field Type Required Description textstring No The user message text for this turn. tool_modestring No Optional per-turn tool mode override. dir_scopestring No Optional per-turn directory-access scope override: home|full.
Event stream (SSE):
data: {"text":"Reading the auth middleware file..."}
data: {"name":"read_file","args":{"path":"/src/auth/middleware.ts"}}
"message" : " invalid request "
Error Code Title Description Resolution bad_requestBad request The request was malformed or carried invalid parameters. Correct the request body or query parameters. realm_scope_unsupportedRealm scope unsupported A per-request realm header was supplied to an active-only / global-no-realm RPC. Omit the realm header on this route, or open a session to scope by realm.
"message" : " request must arrive through the Hoody proxy "
Error Code Title Description Resolution forbiddenForbidden (not via the Hoody proxy) The request did not arrive through hoody-proxy. Reach the agent through hoody-proxy, not by connecting to the container directly.
"message" : " resource not found "
Error Code Title Description Resolution not_foundNot found The requested resource does not exist. Verify the path and identifier.
"message" : " a gate is parked on this session " ,
Error Code Title Description Resolution gate_parkedGate parked A confirm/question gate is parked on this session, so a new turn/workflow run is refused until it is answered. The parked gate is surfaced under details.pending_gate. Answer the parked gate (/confirm or /answer) and retry; read it via GET /sessions/{id} or details.pending_gate. turn_in_flightTurn in flight A turn is already running on this session; the single serial turn slot is occupied, so a new turn/workflow run is refused. Wait for the running turn to finish (observe agent_done on the session stream), then retry.
"code" : " payload_too_large " ,
"message" : " request body exceeds the configured size limit "
Error Code Title Description Resolution payload_too_largePayload too large The request body exceeds the configured size cap. Reduce the request body below the configured limit (default 8 MiB).
"message" : " request rate limit exceeded "
Error Code Title Description Resolution rate_limitedToo many requests The per-client request rate limit was exceeded. Honor the Retry-After header and retry; reduce the request rate.
"code" : " internal_error " ,
"message" : " internal server error "
Error Code Title Description Resolution internal_errorInternal error Pre-stream dispatch failure (transport error before SSE opens). Retry; if persistent, inspect the daemon logs.
"code" : " service_unavailable " ,
"message" : " service unavailable "
Error Code Title Description Resolution service_unavailableService unavailable The daemon could not service the request. Honor Retry-After and retry.
const stream = await client . agent . sessions . promptStream ( {
id: " 5f9a8b2c3d4e5f6a7b8c9d0e " ,
text: " Refactor the auth middleware to use async/await. "
Dispatch a turn and block until agent_done. By default (interactive posture) it returns {pending_gate} the moment a turn parks — it never auto-approves implicitly. Repeated prompt:sync against a parked session returns the same pending_gate (no duplicate parked turns). The explicit X-Hoody-Gate-Policy: auto_approve header (or ?policy=auto_approve) adopts the headless posture and auto-answers confirm gates with approved=true — off by default.
SDK: client.agent.sessions.promptSync()
Name In Type Required Description idpath string Yes Path identifier. policyquery string No auto_approve adopts the headless auto-answer posture (alias of the X-Hoody-Gate-Policy header); off by default.X-Hoody-Gate-Policyheader string No Confirm-gate posture (§6): auto_approve adopts the headless auto-answer posture (off by default; the in-query alias is ?policy=). Any other value is rejected 400. X-Hoody-Cwdheader string No Per-request working-directory scope (§6.1). X-Hoody-Config-Dirheader string No Per-request --config-dir override (§6.1). X-Hoody-Containerheader string No Per-request bound remote container (§6.1; omitted = local). X-Hoody-Realmheader string No Per-request realm selector. Rejected (400) on active-only / no-realm routes. realmquery string No In-query alias of the X-Hoody-Realm header.
Field Type Required Description textstring No The user message text for this turn. tool_modestring No Optional per-turn tool mode override. dir_scopestring No Optional per-turn directory-access scope override: home|full.
"text" : " I refactored the auth middleware. All 12 tests pass. " ,
A pending_gate is returned the moment a turn parks (interactive posture), status:"error" when the turn surfaced a fatal error, status:"canceled" when a concurrent /cancel (or WS cancel frame) stopped the turn, or status:"quit" on /exit.
"message" : " invalid request "
Error Code Title Description Resolution bad_requestBad request The request was malformed or carried invalid parameters. Correct the request body or query parameters. realm_scope_unsupportedRealm scope unsupported A per-request realm header was supplied to an active-only / global-no-realm RPC. Omit the realm header on this route, or open a session to scope by realm.
"message" : " request must arrive through the Hoody proxy "
Error Code Title Description Resolution forbiddenForbidden (not via the Hoody proxy) The request did not arrive through hoody-proxy. Reach the agent through hoody-proxy, not by connecting to the container directly.
"message" : " resource not found "
Error Code Title Description Resolution not_foundNot found The requested resource does not exist. Verify the path and identifier.
"code" : " turn_in_flight " ,
"message" : " a turn is already running on this session "
Error Code Title Description Resolution turn_in_flightTurn in flight A turn is already running on this session; the single serial turn slot is occupied, so a new turn/workflow run is refused. Wait for the running turn to finish (observe agent_done on the session stream), then retry.
"code" : " payload_too_large " ,
"message" : " request body exceeds the configured size limit "
Error Code Title Description Resolution payload_too_largePayload too large The request body exceeds the configured size cap. Reduce the request body below the configured limit (default 8 MiB).
"message" : " request rate limit exceeded "
Error Code Title Description Resolution rate_limitedToo many requests The per-client request rate limit was exceeded. Honor the Retry-After header and retry; reduce the request rate.
"code" : " internal_error " ,
"message" : " internal server error "
Error Code Title Description Resolution internal_errorInternal error An unexpected error occurred while handling the request. Retry; if persistent, inspect the daemon logs.
"code" : " service_unavailable " ,
"message" : " service unavailable "
Error Code Title Description Resolution service_unavailableService unavailable The daemon could not service the request. Honor Retry-After and retry.
const result = await client . agent . sessions . promptSync ( {
id: " 5f9a8b2c3d4e5f6a7b8c9d0e " ,
text: " Refactor the auth middleware to use async/await. "
Approve or deny a parked tool/dir confirmation. 409 no_pending_gate when nothing is parked; 409 stale_gate / gate_already_answered on mismatch — the gateway never fires a command that would be silently dropped.
SDK: client.agent.sessions.confirmGate()
Name In Type Required Description idpath string Yes Path identifier. X-Hoody-Cwdheader string No Per-request working-directory scope (§6.1). X-Hoody-Config-Dirheader string No Per-request --config-dir override (§6.1). X-Hoody-Containerheader string No Per-request bound remote container (§6.1; omitted = local). X-Hoody-Realmheader string No Per-request realm selector. Rejected (400) on active-only / no-realm routes. realmquery string No In-query alias of the X-Hoody-Realm header.
Field Type Required Description gate_idstring No Optional echo of the parked gate id (stale/mismatch → 409). generationinteger No Optional echo of the parked gate generation. approvedboolean No true to approve, false to deny (defaults to true if omitted).persist_dirsboolean No Persist an approved directory grant to settings.json (WS↔REST parity).
"message" : " invalid request "
Error Code Title Description Resolution bad_requestBad request The request was malformed or carried invalid parameters. Correct the request body or query parameters. realm_scope_unsupportedRealm scope unsupported A per-request realm header was supplied to an active-only / global-no-realm RPC. Omit the realm header on this route, or open a session to scope by realm.
"message" : " request must arrive through the Hoody proxy "
Error Code Title Description Resolution forbiddenForbidden (not via the Hoody proxy) The request did not arrive through hoody-proxy. Reach the agent through hoody-proxy, not by connecting to the container directly.
"message" : " resource not found "
Error Code Title Description Resolution not_foundNot found The requested resource does not exist. Verify the path and identifier.
"code" : " no_pending_gate " ,
"message" : " no gate is parked for this session "
Error Code Title Description Resolution no_pending_gateNo pending gate No confirm/question gate is parked for this session, so there is nothing to answer. Dispatch a turn and answer the gate it parks; check the pending gate via GET /sessions/{id}. stale_gateStale gate The supplied gate_id/generation does not match the currently parked gate. Re-read the pending gate and answer the current id/generation. gate_already_answeredGate already answered The parked gate was already answered by an earlier request (first valid answer wins). Wait for the next gate; do not re-answer. gate_type_mismatchGate type mismatch The parked gate is a different type than this endpoint answers (e.g. answering a question gate via /confirm). Use the endpoint matching the parked gate type (/confirm for a confirm gate, /answer for a question gate).
"code" : " payload_too_large " ,
"message" : " request body exceeds the configured size limit "
Error Code Title Description Resolution payload_too_largePayload too large The request body exceeds the configured size cap. Reduce the request body below the configured limit (default 8 MiB).
"message" : " request rate limit exceeded "
Error Code Title Description Resolution rate_limitedToo many requests The per-client request rate limit was exceeded. Honor the Retry-After header and retry; reduce the request rate.
"code" : " internal_error " ,
"message" : " internal server error "
Error Code Title Description Resolution internal_errorInternal error An unexpected error occurred while handling the request. Retry; if persistent, inspect the daemon logs.
await client . agent . sessions . confirmGate ({
id: " 5f9a8b2c3d4e5f6a7b8c9d0e " ,
Answer a parked ask-the-user question. 409 no_pending_gate / stale_gate / gate_already_answered / gate_type_mismatch on mismatch.
SDK: client.agent.sessions.answerQuestion()
Name In Type Required Description idpath string Yes Path identifier. X-Hoody-Cwdheader string No Per-request working-directory scope (§6.1). X-Hoody-Config-Dirheader string No Per-request --config-dir override (§6.1). X-Hoody-Containerheader string No Per-request bound remote container (§6.1; omitted = local). X-Hoody-Realmheader string No Per-request realm selector. Rejected (400) on active-only / no-realm routes. realmquery string No In-query alias of the X-Hoody-Realm header.
Field Type Required Description gate_idstring No Optional echo of the parked gate id (stale/mismatch → 409). generationinteger No Optional echo of the parked gate generation. answerstring No Free-form answer text. textstring No Alternate answer text field (forwarded alongside answer). answersobject No Structured per-field answers for a multi-field question.
"message" : " invalid request "
Error Code Title Description Resolution bad_requestBad request The request was malformed or carried invalid parameters. Correct the request body or query parameters. realm_scope_unsupportedRealm scope unsupported A per-request realm header was supplied to an active-only / global-no-realm RPC. Omit the realm header on this route, or open a session to scope by realm.
"message" : " request must arrive through the Hoody proxy "
Error Code Title Description Resolution forbiddenForbidden (not via the Hoody proxy) The request did not arrive through hoody-proxy. Reach the agent through hoody-proxy, not by connecting to the container directly.
"message" : " resource not found "
Error Code Title Description Resolution not_foundNot found The requested resource does not exist. Verify the path and identifier.
"code" : " no_pending_gate " ,
"message" : " no gate is parked for this session "
Error Code Title Description Resolution no_pending_gateNo pending gate No confirm/question gate is parked for this session, so there is nothing to answer. Dispatch a turn and answer the gate it parks; check the pending gate via GET /sessions/{id}. stale_gateStale gate The supplied gate_id/generation does not match the currently parked gate. Re-read the pending gate and answer the current id/generation. gate_already_answeredGate already answered The parked gate was already answered by an earlier request (first valid answer wins). Wait for the next gate; do not re-answer. gate_type_mismatchGate type mismatch The parked gate is a different type than this endpoint answers (e.g. answering a question gate via /confirm). Use the endpoint matching the parked gate type (/confirm for a confirm gate, /answer for a question gate).
"code" : " payload_too_large " ,
"message" : " request body exceeds the configured size limit "
Error Code Title Description Resolution payload_too_largePayload too large The request body exceeds the configured size cap. Reduce the request body below the configured limit (default 8 MiB).
"message" : " request rate limit exceeded "
Error Code Title Description Resolution rate_limitedToo many requests The per-client request rate limit was exceeded. Honor the Retry-After header and retry; reduce the request rate.
"code" : " internal_error " ,
"message" : " internal server error "
Error Code Title Description Resolution internal_errorInternal error An unexpected error occurred while handling the request. Retry; if persistent, inspect the daemon logs.
await client . agent . sessions . answerQuestion ({
id: " 5f9a8b2c3d4e5f6a7b8c9d0e " ,
answer: " Use PostgreSQL with a connection pool of 10. "
Run a one-shot helper-model call that proposes answers for the parked question (event.question_suggestion). The real answer still travels via /answer — the daemon never answers itself. 409 no_pending_gate when no question is parked.
SDK: client.agent.sessions.answerAssist()
Name In Type Required Description idpath string Yes Path identifier. X-Hoody-Cwdheader string No Per-request working-directory scope (§6.1). X-Hoody-Config-Dirheader string No Per-request --config-dir override (§6.1). X-Hoody-Containerheader string No Per-request bound remote container (§6.1; omitted = local). X-Hoody-Realmheader string No Per-request realm selector. Rejected (400) on active-only / no-realm routes. realmquery string No In-query alias of the X-Hoody-Realm header.
Field Type Required Description modestring No Suggestion mode (default suggest). modelstring No Helper model override; empty uses the configured helper. geninteger No Generation counter to correlate the suggestion event.
"job_id" : " job-assist-9a1b2c3d " ,
"session_id" : " 5f9a8b2c3d4e5f6a7b8c9d0e "
Suggestion job dispatched; observe its result via GET /jobs/{id}/result.
"message" : " invalid request "
Error Code Title Description Resolution bad_requestBad request The request was malformed or carried invalid parameters. Correct the request body or query parameters. realm_scope_unsupportedRealm scope unsupported A per-request realm header was supplied to an active-only / global-no-realm RPC. Omit the realm header on this route, or open a session to scope by realm.
"message" : " request must arrive through the Hoody proxy "
Error Code Title Description Resolution forbiddenForbidden (not via the Hoody proxy) The request did not arrive through hoody-proxy. Reach the agent through hoody-proxy, not by connecting to the container directly.
"message" : " resource not found "
Error Code Title Description Resolution not_foundNot found The requested resource does not exist. Verify the path and identifier.
"code" : " no_pending_gate " ,
"message" : " no gate is parked for this session "
Error Code Title Description Resolution no_pending_gateNo pending gate No confirm/question gate is parked for this session, so there is nothing to answer. Dispatch a turn and answer the gate it parks; check the pending gate via GET /sessions/{id}. assist_in_flightAssist in flight An answer:assist suggestion job is already running for this session; only one in-flight assist per session is allowed. Wait for the prior suggestion (observe event.question_suggestion / poll the job), then retry.
"code" : " payload_too_large " ,
"message" : " request body exceeds the configured size limit "
Error Code Title Description Resolution payload_too_largePayload too large The request body exceeds the configured size cap. Reduce the request body below the configured limit (default 8 MiB).
"message" : " request rate limit exceeded "
Error Code Title Description Resolution rate_limitedToo many requests The per-client request rate limit was exceeded. Honor the Retry-After header and retry; reduce the request rate.
"code" : " internal_error " ,
"message" : " internal server error "
Error Code Title Description Resolution internal_errorInternal error An unexpected error occurred while handling the request. Retry; if persistent, inspect the daemon logs.
"code" : " service_unavailable " ,
"message" : " service unavailable "
Error Code Title Description Resolution service_unavailableService unavailable The daemon could not service the request. Honor Retry-After and retry.
const { jobId } = await client . agent . sessions . answerAssist ( {
id: " 5f9a8b2c3d4e5f6a7b8c9d0e " ,
data: { mode: " suggest " }
Live model switch (echoed as an event).
SDK: client.agent.sessions.setSessionModel()
Name In Type Required Description idpath string Yes Path identifier. X-Hoody-Cwdheader string No Per-request working-directory scope (§6.1). X-Hoody-Config-Dirheader string No Per-request --config-dir override (§6.1). X-Hoody-Containerheader string No Per-request bound remote container (§6.1; omitted = local). X-Hoody-Realmheader string No Per-request realm selector. Rejected (400) on active-only / no-realm routes. realmquery string No In-query alias of the X-Hoody-Realm header.
Field Type Required Description modelstring No Model id to switch to.
"model" : " claude-opus-4-6 "
"message" : " invalid request "
Error Code Title Description Resolution bad_requestBad request The request was malformed or carried invalid parameters. Correct the request body or query parameters. realm_scope_unsupportedRealm scope unsupported A per-request realm header was supplied to an active-only / global-no-realm RPC. Omit the realm header on this route, or open a session to scope by realm.
"message" : " request must arrive through the Hoody proxy "
Error Code Title Description Resolution forbiddenForbidden (not via the Hoody proxy) The request did not arrive through hoody-proxy. Reach the agent through hoody-proxy, not by connecting to the container directly.
"message" : " resource not found "
Error Code Title Description Resolution not_foundNot found The requested resource does not exist. Verify the path and identifier.
"code" : " payload_too_large " ,
"message" : " request body exceeds the configured size limit "
Error Code Title Description Resolution payload_too_largePayload too large The request body exceeds the configured size cap. Reduce the request body below the configured limit (default 8 MiB).
"message" : " request rate limit exceeded "
Error Code Title Description Resolution rate_limitedToo many requests The per-client request rate limit was exceeded. Honor the Retry-After header and retry; reduce the request rate.
"code" : " internal_error " ,
"message" : " internal server error "
Error Code Title Description Resolution internal_errorInternal error An unexpected error occurred while handling the request. Retry; if persistent, inspect the daemon logs.
"code" : " service_unavailable " ,
"message" : " service unavailable "
Error Code Title Description Resolution service_unavailableService unavailable The daemon could not service the request. Honor Retry-After and retry.
await client . agent . sessions . setSessionModel ({
id: " 5f9a8b2c3d4e5f6a7b8c9d0e " ,
data: { model: " claude-opus-4-6 " }
Live reasoning-effort change (low|medium|high|xhigh, or "" for the model default).
SDK: client.agent.sessions.setSessionEffort()
Name In Type Required Description idpath string Yes Path identifier. X-Hoody-Cwdheader string No Per-request working-directory scope (§6.1). X-Hoody-Config-Dirheader string No Per-request --config-dir override (§6.1). X-Hoody-Containerheader string No Per-request bound remote container (§6.1; omitted = local). X-Hoody-Realmheader string No Per-request realm selector. Rejected (400) on active-only / no-realm routes. realmquery string No In-query alias of the X-Hoody-Realm header.
Field Type Required Description effortstring No low|medium|high|xhigh, or "" for the model default.
"message" : " invalid request "
Error Code Title Description Resolution bad_requestBad request The request was malformed or carried invalid parameters. Correct the request body or query parameters. realm_scope_unsupportedRealm scope unsupported A per-request realm header was supplied to an active-only / global-no-realm RPC. Omit the realm header on this route, or open a session to scope by realm.
"message" : " request must arrive through the Hoody proxy "
Error Code Title Description Resolution forbiddenForbidden (not via the Hoody proxy) The request did not arrive through hoody-proxy. Reach the agent through hoody-proxy, not by connecting to the container directly.
"message" : " resource not found "
Error Code Title Description Resolution not_foundNot found The requested resource does not exist. Verify the path and identifier.
"code" : " payload_too_large " ,
"message" : " request body exceeds the configured size limit "
Error Code Title Description Resolution payload_too_largePayload too large The request body exceeds the configured size cap. Reduce the request body below the configured limit (default 8 MiB).
"message" : " request rate limit exceeded "
Error Code Title Description Resolution rate_limitedToo many requests The per-client request rate limit was exceeded. Honor the Retry-After header and retry; reduce the request rate.
"code" : " internal_error " ,
"message" : " internal server error "
Error Code Title Description Resolution internal_errorInternal error An unexpected error occurred while handling the request. Retry; if persistent, inspect the daemon logs.
"code" : " service_unavailable " ,
"message" : " service unavailable "
Error Code Title Description Resolution service_unavailableService unavailable The daemon could not service the request. Honor Retry-After and retry.
await client . agent . sessions . setSessionEffort ({
id: " 5f9a8b2c3d4e5f6a7b8c9d0e " ,
Live verbosity change (normal|concise|terse|minimal).
SDK: client.agent.sessions.setSessionVerbosity()
Name In Type Required Description idpath string Yes Path identifier. X-Hoody-Cwdheader string No Per-request working-directory scope (§6.1). X-Hoody-Config-Dirheader string No Per-request --config-dir override (§6.1). X-Hoody-Containerheader string No Per-request bound remote container (§6.1; omitted = local). X-Hoody-Realmheader string No Per-request realm selector. Rejected (400) on active-only / no-realm routes. realmquery string No In-query alias of the X-Hoody-Realm header.
Field Type Required Description levelstring No normal|concise|terse|minimal.
"message" : " invalid request "
Error Code Title Description Resolution bad_requestBad request The request was malformed or carried invalid parameters. Correct the request body or query parameters. realm_scope_unsupportedRealm scope unsupported A per-request realm header was supplied to an active-only / global-no-realm RPC. Omit the realm header on this route, or open a session to scope by realm.
"message" : " request must arrive through the Hoody proxy "
Error Code Title Description Resolution forbiddenForbidden (not via the Hoody proxy) The request did not arrive through hoody-proxy. Reach the agent through hoody-proxy, not by connecting to the container directly.
"message" : " resource not found "
Error Code Title Description Resolution not_foundNot found The requested resource does not exist. Verify the path and identifier.
"code" : " payload_too_large " ,
"message" : " request body exceeds the configured size limit "
Error Code Title Description Resolution payload_too_largePayload too large The request body exceeds the configured size cap. Reduce the request body below the configured limit (default 8 MiB).
"message" : " request rate limit exceeded "
Error Code Title Description Resolution rate_limitedToo many requests The per-client request rate limit was exceeded. Honor the Retry-After header and retry; reduce the request rate.
"code" : " internal_error " ,
"message" : " internal server error "
Error Code Title Description Resolution internal_errorInternal error An unexpected error occurred while handling the request. Retry; if persistent, inspect the daemon logs.
"code" : " service_unavailable " ,
"message" : " service unavailable "
Error Code Title Description Resolution service_unavailableService unavailable The daemon could not service the request. Honor Retry-After and retry.
await client . agent . sessions . setSessionVerbosity ({
id: " 5f9a8b2c3d4e5f6a7b8c9d0e " ,
data: { level: " concise " }
Live chat-agent switch (echoed as an event).
SDK: client.agent.sessions.setSessionAgent()
Name In Type Required Description idpath string Yes Path identifier. X-Hoody-Cwdheader string No Per-request working-directory scope (§6.1). X-Hoody-Config-Dirheader string No Per-request --config-dir override (§6.1). X-Hoody-Containerheader string No Per-request bound remote container (§6.1; omitted = local). X-Hoody-Realmheader string No Per-request realm selector. Rejected (400) on active-only / no-realm routes. realmquery string No In-query alias of the X-Hoody-Realm header.
Field Type Required Description agentstring No Chat-agent name to switch to.
"message" : " invalid request "
Error Code Title Description Resolution bad_requestBad request The request was malformed or carried invalid parameters. Correct the request body or query parameters. realm_scope_unsupportedRealm scope unsupported A per-request realm header was supplied to an active-only / global-no-realm RPC. Omit the realm header on this route, or open a session to scope by realm.
"message" : " request must arrive through the Hoody proxy "
Error Code Title Description Resolution forbiddenForbidden (not via the Hoody proxy) The request did not arrive through hoody-proxy. Reach the agent through hoody-proxy, not by connecting to the container directly.
"message" : " resource not found "
Error Code Title Description Resolution not_foundNot found The requested resource does not exist. Verify the path and identifier.
"code" : " payload_too_large " ,
"message" : " request body exceeds the configured size limit "
Error Code Title Description Resolution payload_too_largePayload too large The request body exceeds the configured size cap. Reduce the request body below the configured limit (default 8 MiB).
"message" : " request rate limit exceeded "
Error Code Title Description Resolution rate_limitedToo many requests The per-client request rate limit was exceeded. Honor the Retry-After header and retry; reduce the request rate.
"code" : " internal_error " ,
"message" : " internal server error "
Error Code Title Description Resolution internal_errorInternal error An unexpected error occurred while handling the request. Retry; if persistent, inspect the daemon logs.
"code" : " service_unavailable " ,
"message" : " service unavailable "
Error Code Title Description Resolution service_unavailableService unavailable The daemon could not service the request. Honor Retry-After and retry.
await client . agent . sessions . setSessionAgent ({
id: " 5f9a8b2c3d4e5f6a7b8c9d0e " ,
Arm or disarm the self-driving auto-reply loop (rounds, replier model, write opt-in).
SDK: client.agent.sessions.setSessionAutoReply()
Name In Type Required Description idpath string Yes Path identifier. X-Hoody-Cwdheader string No Per-request working-directory scope (§6.1). X-Hoody-Config-Dirheader string No Per-request --config-dir override (§6.1). X-Hoody-Containerheader string No Per-request bound remote container (§6.1; omitted = local). X-Hoody-Realmheader string No Per-request realm selector. Rejected (400) on active-only / no-realm routes. realmquery string No In-query alias of the X-Hoody-Realm header.
Field Type Required Description armedboolean No true to arm the auto-reply loop, false to disarm.roundsinteger No Number of auto-reply rounds budgeted. modelstring No Replier model override. allow_writesboolean No Opt in to write-class actions during auto-reply.
"message" : " invalid request "
Error Code Title Description Resolution bad_requestBad request The request was malformed or carried invalid parameters. Correct the request body or query parameters. realm_scope_unsupportedRealm scope unsupported A per-request realm header was supplied to an active-only / global-no-realm RPC. Omit the realm header on this route, or open a session to scope by realm.
"message" : " request must arrive through the Hoody proxy "
Error Code Title Description Resolution forbiddenForbidden (not via the Hoody proxy) The request did not arrive through hoody-proxy. Reach the agent through hoody-proxy, not by connecting to the container directly.
"message" : " resource not found "
Error Code Title Description Resolution not_foundNot found The requested resource does not exist. Verify the path and identifier.
"code" : " payload_too_large " ,
"message" : " request body exceeds the configured size limit "
Error Code Title Description Resolution payload_too_largePayload too large The request body exceeds the configured size cap. Reduce the request body below the configured limit (default 8 MiB).
"message" : " request rate limit exceeded "
Error Code Title Description Resolution rate_limitedToo many requests The per-client request rate limit was exceeded. Honor the Retry-After header and retry; reduce the request rate.
"code" : " internal_error " ,
"message" : " internal server error "
Error Code Title Description Resolution internal_errorInternal error An unexpected error occurred while handling the request. Retry; if persistent, inspect the daemon logs.
"code" : " service_unavailable " ,
"message" : " service unavailable "
Error Code Title Description Resolution service_unavailableService unavailable The daemon could not service the request. Honor Retry-After and retry.
await client . agent . sessions . setSessionAutoReply ({
id: " 5f9a8b2c3d4e5f6a7b8c9d0e " ,
data: { armed: true , rounds: 5 , allow_writes: false }
Flip the write-class opt-in on an already-armed auto-reply loop WITHOUT re-arming (no budget reset).
SDK: client.agent.sessions.setSessionAutoReplyWrites()
Name In Type Required Description idpath string Yes Path identifier. X-Hoody-Cwdheader string No Per-request working-directory scope (§6.1). X-Hoody-Config-Dirheader string No Per-request --config-dir override (§6.1). X-Hoody-Containerheader string No Per-request bound remote container (§6.1; omitted = local). X-Hoody-Realmheader string No Per-request realm selector. Rejected (400) on active-only / no-realm routes. realmquery string No In-query alias of the X-Hoody-Realm header.
Field Type Required Description allow_writesboolean No New write-class opt-in state.
"message" : " invalid request "
Error Code Title Description Resolution bad_requestBad request The request was malformed or carried invalid parameters. Correct the request body or query parameters. realm_scope_unsupportedRealm scope unsupported A per-request realm header was supplied to an active-only / global-no-realm RPC. Omit the realm header on this route, or open a session to scope by realm.
"message" : " request must arrive through the Hoody proxy "
Error Code Title Description Resolution forbiddenForbidden (not via the Hoody proxy) The request did not arrive through hoody-proxy. Reach the agent through hoody-proxy, not by connecting to the container directly.
"message" : " resource not found "
Error Code Title Description Resolution not_foundNot found The requested resource does not exist. Verify the path and identifier.
"code" : " payload_too_large " ,
"message" : " request body exceeds the configured size limit "
Error Code Title Description Resolution payload_too_largePayload too large The request body exceeds the configured size cap. Reduce the request body below the configured limit (default 8 MiB).
"message" : " request rate limit exceeded "
Error Code Title Description Resolution rate_limitedToo many requests The per-client request rate limit was exceeded. Honor the Retry-After header and retry; reduce the request rate.
"code" : " internal_error " ,
"message" : " internal server error "
Error Code Title Description Resolution internal_errorInternal error An unexpected error occurred while handling the request. Retry; if persistent, inspect the daemon logs.
"code" : " service_unavailable " ,
"message" : " service unavailable "
Error Code Title Description Resolution service_unavailableService unavailable The daemon could not service the request. Honor Retry-After and retry.
await client . agent . sessions . setSessionAutoReplyWrites ({
id: " 5f9a8b2c3d4e5f6a7b8c9d0e " ,
data: { allow_writes: true }
Live toggle of the session’s HOODY_* shell-env contract for the bash tool.
SDK: client.agent.sessions.setSessionHoodyEnv()
Name In Type Required Description idpath string Yes Path identifier. X-Hoody-Cwdheader string No Per-request working-directory scope (§6.1). X-Hoody-Config-Dirheader string No Per-request --config-dir override (§6.1). X-Hoody-Containerheader string No Per-request bound remote container (§6.1; omitted = local). X-Hoody-Realmheader string No Per-request realm selector. Rejected (400) on active-only / no-realm routes. realmquery string No In-query alias of the X-Hoody-Realm header.
Field Type Required Description enabledboolean No Whether to inject the HOODY_* shell-env contract.
"message" : " invalid request "
Error Code Title Description Resolution bad_requestBad request The request was malformed or carried invalid parameters. Correct the request body or query parameters. realm_scope_unsupportedRealm scope unsupported A per-request realm header was supplied to an active-only / global-no-realm RPC. Omit the realm header on this route, or open a session to scope by realm.
"message" : " request must arrive through the Hoody proxy "
Error Code Title Description Resolution forbiddenForbidden (not via the Hoody proxy) The request did not arrive through hoody-proxy. Reach the agent through hoody-proxy, not by connecting to the container directly.
"message" : " resource not found "
Error Code Title Description Resolution not_foundNot found The requested resource does not exist. Verify the path and identifier.
"code" : " payload_too_large " ,
"message" : " request body exceeds the configured size limit "
Error Code Title Description Resolution payload_too_largePayload too large The request body exceeds the configured size cap. Reduce the request body below the configured limit (default 8 MiB).
"message" : " request rate limit exceeded "
Error Code Title Description Resolution rate_limitedToo many requests The per-client request rate limit was exceeded. Honor the Retry-After header and retry; reduce the request rate.
"code" : " internal_error " ,
"message" : " internal server error "
Error Code Title Description Resolution internal_errorInternal error An unexpected error occurred while handling the request. Retry; if persistent, inspect the daemon logs.
"code" : " service_unavailable " ,
"message" : " service unavailable "
Error Code Title Description Resolution service_unavailableService unavailable The daemon could not service the request. Honor Retry-After and retry.
await client . agent . sessions . setSessionHoodyEnv ({
id: " 5f9a8b2c3d4e5f6a7b8c9d0e " ,
Truncate the session’s conversation history to (and including) the given turn index.
SDK: client.agent.sessions.trimSession()
Name In Type Required Description idpath string Yes Path identifier. X-Hoody-Cwdheader string No Per-request working-directory scope (§6.1). X-Hoody-Config-Dirheader string No Per-request --config-dir override (§6.1). X-Hoody-Containerheader string No Per-request bound remote container (§6.1; omitted = local). X-Hoody-Realmheader string No Per-request realm selector. Rejected (400) on active-only / no-realm routes. realmquery string No In-query alias of the X-Hoody-Realm header.
Field Type Required Description turn_idxinteger No Turn index to truncate history to (and including).
"message" : " invalid request "
Error Code Title Description Resolution bad_requestBad request The request was malformed or carried invalid parameters. Correct the request body or query parameters. realm_scope_unsupportedRealm scope unsupported A per-request realm header was supplied to an active-only / global-no-realm RPC. Omit the realm header on this route, or open a session to scope by realm.
"message" : " request must arrive through the Hoody proxy "
Error Code Title Description Resolution forbiddenForbidden (not via the Hoody proxy) The request did not arrive through hoody-proxy. Reach the agent through hoody-proxy, not by connecting to the container directly.
"message" : " resource not found "
Error Code Title Description Resolution not_foundNot found The requested resource does not exist. Verify the path and identifier.
"code" : " payload_too_large " ,
"message" : " request body exceeds the configured size limit "
Error Code Title Description Resolution payload_too_largePayload too large The request body exceeds the configured size cap. Reduce the request body below the configured limit (default 8 MiB).
"message" : " request rate limit exceeded "
Error Code Title Description Resolution rate_limitedToo many requests The per-client request rate limit was exceeded. Honor the Retry-After header and retry; reduce the request rate.
"code" : " internal_error " ,
"message" : " internal server error "
Error Code Title Description Resolution internal_errorInternal error An unexpected error occurred while handling the request. Retry; if persistent, inspect the daemon logs.
"code" : " service_unavailable " ,
"message" : " service unavailable "
Error Code Title Description Resolution service_unavailableService unavailable The daemon could not service the request. Honor Retry-After and retry.
await client . agent . sessions . trimSession ({
id: " 5f9a8b2c3d4e5f6a7b8c9d0e " ,
Inject user feedback/input into a running workflow (maps to session.workflow_message → workflowMsgChan, not commandChan).
SDK: client.agent.sessions.postWorkflowMessage()
Name In Type Required Description idpath string Yes Path identifier. X-Hoody-Cwdheader string No Per-request working-directory scope (§6.1). X-Hoody-Config-Dirheader string No Per-request --config-dir override (§6.1). X-Hoody-Containerheader string No Per-request bound remote container (§6.1; omitted = local). X-Hoody-Realmheader string No Per-request realm selector. Rejected (400) on active-only / no-realm routes. realmquery string No In-query alias of the X-Hoody-Realm header.
Field Type Required Description textstring No Feedback/input text fed to the running workflow.
"message" : " invalid request "
Error Code Title Description Resolution bad_requestBad request The request was malformed or carried invalid parameters. Correct the request body or query parameters. realm_scope_unsupportedRealm scope unsupported A per-request realm header was supplied to an active-only / global-no-realm RPC. Omit the realm header on this route, or open a session to scope by realm.
"message" : " request must arrive through the Hoody proxy "
Error Code Title Description Resolution forbiddenForbidden (not via the Hoody proxy) The request did not arrive through hoody-proxy. Reach the agent through hoody-proxy, not by connecting to the container directly.
"message" : " resource not found "
Error Code Title Description Resolution not_foundNot found The requested resource does not exist. Verify the path and identifier.
"code" : " payload_too_large " ,
"message" : " request body exceeds the configured size limit "
Error Code Title Description Resolution payload_too_largePayload too large The request body exceeds the configured size cap. Reduce the request body below the configured limit (default 8 MiB).
"message" : " request rate limit exceeded "
Error Code Title Description Resolution rate_limitedToo many requests The per-client request rate limit was exceeded. Honor the Retry-After header and retry; reduce the request rate.
"code" : " internal_error " ,
"message" : " internal server error "
Error Code Title Description Resolution internal_errorInternal error An unexpected error occurred while handling the request. Retry; if persistent, inspect the daemon logs.
"code" : " service_unavailable " ,
"message" : " service unavailable "
Error Code Title Description Resolution service_unavailableService unavailable The daemon could not service the request. Honor Retry-After and retry.
await client . agent . sessions . postWorkflowMessage ({
id: " 5f9a8b2c3d4e5f6a7b8c9d0e " ,
data: { text: " Skip the file upload step. " }