Skip to content
Hoody.com

Agent Sessions let you create, inspect, fork, prompt, and tear down a single-writer conversation context. A session is opened frozen to its start binding (realm, container, cwd, tool mode, directory scope, backend) — every later command either inherits or rejects that binding. Use these endpoints to list persisted sessions, dispatch turns (synchronously, streamed, or fire-and-forget), answer parked gates, attach to a live stream, and live-tune the chat agent, model, effort, and verbosity.

All routes are reached through the Hoody proxy at https://{projectId}-{containerId}-agent-1.{server}.containers.hoody.icu. A per-request realm header is rejected on these routes.

List sessions for the requesting working directory (open and closed). The attached flag marks live sessions. Pagination is honored — pass ?page=N&limit=M for a window, or omit limit to receive the full set.

NameInTypeRequiredDescription
include_systemquerybooleanNoWhen true, also include daemon-owned system/resident sessions in the listing.
pagequeryintegerNo1-based page number for pagination.
limitqueryintegerNoMaximum items per page (0 = no pagination).
X-Hoody-CwdheaderstringNoPer-request working-directory scope.
X-Hoody-Config-DirheaderstringNoPer-request --config-dir override.
X-Hoody-ContainerheaderstringNoPer-request bound remote container (omitted = local).
X-Hoody-RealmheaderstringNoPer-request realm selector: global or a 24-hex id. Rejected on this route.
realmquerystringNoIn-query alias of the X-Hoody-Realm header. Rejected on this route.
{
"items": [
{
"id": "5f3a1b2c8d4e9f0012345678",
"title": "Refactor auth middleware",
"cwd": "/home/user/projects/api",
"attached": true,
"updated_at": 1739991234
},
{
"id": "5f3a1b2c8d4e9f0012345679",
"title": "Investigate flaky test",
"cwd": "/home/user/projects/api",
"attached": false,
"updated_at": 1739987541
}
],
"meta": {
"total": 2,
"page": 1,
"limit": 20
}
}
await client.agent.sessions.listSessionsIterator({ page: 1, limit: 20 })
Terminal window
curl -X GET "https://{projectId}-{containerId}-agent-1.{server}.containers.hoody.icu/api/v1/agent/sessions?page=1&limit=20" \
-H "X-Hoody-Cwd: /home/user/projects/api"

Return the distinct working directories across all persisted sessions, most-recent first.

NameInTypeRequiredDescription
X-Hoody-CwdheaderstringNoPer-request working-directory scope.
X-Hoody-Config-DirheaderstringNoPer-request --config-dir override.
X-Hoody-ContainerheaderstringNoPer-request bound remote container.
X-Hoody-RealmheaderstringNoPer-request realm selector. Rejected on this route.
realmquerystringNoIn-query alias of the X-Hoody-Realm header. Rejected on this route.
{
"cwds": [
"/home/user/projects/api",
"/home/user/projects/web",
"/home/user/notes"
]
}
await client.agent.sessions.listSessionCwds()
Terminal window
curl -X GET "https://{projectId}-{containerId}-agent-1.{server}.containers.hoody.icu/api/v1/agent/sessions/cwds" \
-H "X-Hoody-Cwd: /home/user/projects/api"

Return the persisted summary for a session (live or closed). Live sessions also expose the frozen start binding and attached: true.

NameInTypeRequiredDescription
idpathstringYesPath identifier.
X-Hoody-CwdheaderstringNoPer-request working-directory scope.
X-Hoody-Config-DirheaderstringNoPer-request --config-dir override.
X-Hoody-ContainerheaderstringNoPer-request bound remote container.
X-Hoody-RealmheaderstringNoPer-request realm selector. Rejected on this route.
realmquerystringNoIn-query alias of the X-Hoody-Realm header. Rejected on this route.
{
"id": "5f3a1b2c8d4e9f0012345678",
"title": "Refactor auth middleware",
"cwd": "/home/user/projects/api",
"attached": true,
"agent": "default",
"model": "anthropic/claude-opus-4-8",
"frozen": {
"realm": "global",
"container": "local",
"tool_mode": "rw",
"dir_scope": "home"
},
"updated_at": 1739991234
}
await client.agent.sessions.getSession("5f3a1b2c8d4e9f0012345678")
Terminal window
curl -X GET "https://{projectId}-{containerId}-agent-1.{server}.containers.hoody.icu/api/v1/agent/sessions/5f3a1b2c8d4e9f0012345678"

Open a new agent session, fork an existing one, or attach to one in progress. The session is frozen at start to its realm, container, cwd, tool_mode, dir_scope, and backend. To delegate to an external CLI agent, set backend: "acp" and delegated_agent: "claude".

NameInTypeRequiredDescription
X-Hoody-CwdheaderstringNoPer-request working-directory scope.
X-Hoody-Config-DirheaderstringNoPer-request --config-dir override.
X-Hoody-ContainerheaderstringNoPer-request bound remote container.
X-Hoody-RealmheaderstringNoPer-request realm selector. Rejected on this route.
realmquerystringNoIn-query alias of the X-Hoody-Realm header. Rejected on this route.
NameTypeRequiredDescription
realmstringNoRealm selector to scope the session (frozen at start).
containerstringNoContainer id/selector to run tools on (frozen at start).
cwdstringNoWorking directory for the session (frozen at start).
config_dirstringNoConfig directory override.
modelstringNoModel for this session. Overrides the chat agent’s pinned model for this session only. Rejected with attach or backend: "acp".
agentstringNoInitial chat-agent name. Rejected with fork or attach.
tool_modestringNoInitial tool mode (frozen at start).
dir_scopestringNoInitial directory-access scope: home or full (frozen at start).
attachstringNoAttach to an existing session instead of creating one.
forkstringNoFork from an existing session.
fork_turn_idxintegerNoTurn index to fork at (with fork).
backendstringNoSession backend: "" (Hoody LLM) or "acp" (BYOA delegated agent).
delegated_agentstringNoBYOA agent when backend: "acp": claude.
headlessbooleanNoStart the session in headless posture.
{
"agent": "default",
"cwd": "/home/user/projects/api",
"model": "anthropic/claude-opus-4-8",
"tool_mode": "rw",
"dir_scope": "home"
}
{
"id": "5f3a1b2c8d4e9f0012345678",
"attached": true,
"agent": "default",
"model": "anthropic/claude-opus-4-8",
"frozen": {
"realm": "global",
"container": "local",
"cwd": "/home/user/projects/api",
"tool_mode": "rw",
"dir_scope": "home",
"backend": ""
}
}
await client.agent.sessions.createSession({
agent: "default",
cwd: "/home/user/projects/api",
model: "anthropic/claude-opus-4-8",
tool_mode: "rw",
dir_scope: "home"
})
Terminal window
curl -X POST "https://{projectId}-{containerId}-agent-1.{server}.containers.hoody.icu/api/v1/agent/sessions" \
-H "Content-Type: application/json" \
-H "X-Hoody-Cwd: /home/user/projects/api" \
-d '{
"agent": "default",
"cwd": "/home/user/projects/api",
"model": "anthropic/claude-opus-4-8",
"tool_mode": "rw",
"dir_scope": "home"
}'

Close the live session connection. Pass ?hard=true to also remove the persisted record. For a session created with a body config_dir override, send the same directory as the X-Hoody-Config-Dir header on a hard delete — otherwise the record resolves under the home sessions dir and returns 404.

NameInTypeRequiredDescription
idpathstringYesPath identifier.
hardquerybooleanNoWhen true, also remove the persisted session record.
X-Hoody-CwdheaderstringNoPer-request working-directory scope.
X-Hoody-Config-DirheaderstringNoPer-request --config-dir override selecting the persisted record store.
X-Hoody-ContainerheaderstringNoPer-request bound remote container.
X-Hoody-RealmheaderstringNoPer-request realm selector. Rejected on this route.
realmquerystringNoIn-query alias of the X-Hoody-Realm header. Rejected on this route.
{
"closed": true,
"hard": false,
"id": "5f3a1b2c8d4e9f0012345678"
}
await client.agent.sessions.deleteSession("5f3a1b2c8d4e9f0012345678", { hard: true })
Terminal window
curl -X DELETE "https://{projectId}-{containerId}-agent-1.{server}.containers.hoody.icu/api/v1/agent/sessions/5f3a1b2c8d4e9f0012345678?hard=true"

Tear the session down (the daemon cancels it and removes the live session).

NameInTypeRequiredDescription
idpathstringYesPath identifier.
X-Hoody-CwdheaderstringNoPer-request working-directory scope.
X-Hoody-Config-DirheaderstringNoPer-request --config-dir override.
X-Hoody-ContainerheaderstringNoPer-request bound remote container.
X-Hoody-RealmheaderstringNoPer-request realm selector. Rejected on this route.
realmquerystringNoIn-query alias of the X-Hoody-Realm header. Rejected on this route.
{
"closed": true,
"id": "5f3a1b2c8d4e9f0012345678"
}
await client.agent.sessions.closeSession("5f3a1b2c8d4e9f0012345678")
Terminal window
curl -X POST "https://{projectId}-{containerId}-agent-1.{server}.containers.hoody.icu/api/v1/agent/sessions/5f3a1b2c8d4e9f0012345678/close"

Stop the active turn at the server layer. The session and background tasks are spared (this is distinct from /close). Also aborts an in-flight in-session direct tool run (POST /sessions/{id}/tools/{name}:run) — it holds the same serial turn slot.

NameInTypeRequiredDescription
idpathstringYesPath identifier.
X-Hoody-CwdheaderstringNoPer-request working-directory scope.
X-Hoody-Config-DirheaderstringNoPer-request --config-dir override.
X-Hoody-ContainerheaderstringNoPer-request bound remote container.
X-Hoody-RealmheaderstringNoPer-request realm selector. Rejected on this route.
realmquerystringNoIn-query alias of the X-Hoody-Realm header. Rejected on this route.
{
"canceled": true,
"id": "5f3a1b2c8d4e9f0012345678"
}
await client.agent.sessions.cancelSession("5f3a1b2c8d4e9f0012345678")
Terminal window
curl -X POST "https://{projectId}-{containerId}-agent-1.{server}.containers.hoody.icu/api/v1/agent/sessions/5f3a1b2c8d4e9f0012345678/cancel"

Truncate the session’s conversation history to (and including) the given turn index.

NameInTypeRequiredDescription
idpathstringYesPath identifier.
X-Hoody-CwdheaderstringNoPer-request working-directory scope.
X-Hoody-Config-DirheaderstringNoPer-request --config-dir override.
X-Hoody-ContainerheaderstringNoPer-request bound remote container.
X-Hoody-RealmheaderstringNoPer-request realm selector. Rejected on this route.
realmquerystringNoIn-query alias of the X-Hoody-Realm header. Rejected on this route.
NameTypeRequiredDescription
turn_idxintegerNoTurn index to truncate history to (and including).
{
"turn_idx": 3
}
{
"trimmed": true,
"turn_idx": 3
}
await client.agent.sessions.trimSession("5f3a1b2c8d4e9f0012345678", { turn_idx: 3 })
Terminal window
curl -X POST "https://{projectId}-{containerId}-agent-1.{server}.containers.hoody.icu/api/v1/agent/sessions/5f3a1b2c8d4e9f0012345678/trim" \
-H "Content-Type: application/json" \
-d '{ "turn_idx": 3 }'

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

Section titled “GET /api/v1/agent/sessions/{id}/transcript”

Read the persisted conversation for a session (live or closed) without attaching. Returns the event.replay message projection plus turn boundaries, fresh to the last persist point. after_turn=N skips completed turns 1..N (exclusive; 0 = full; past-end values clamp).

NameInTypeRequiredDescription
idpathstringYesPath identifier.
after_turnqueryintegerNoExclusive completed-turn skip cursor (0 = full transcript).
X-Hoody-CwdheaderstringNoPer-request working-directory scope.
X-Hoody-Config-DirheaderstringNoPer-request --config-dir override selecting the record store.
X-Hoody-ContainerheaderstringNoPer-request bound remote container.
X-Hoody-RealmheaderstringNoPer-request realm selector. Rejected on this route.
realmquerystringNoIn-query alias of the X-Hoody-Realm header. Rejected on this route.
{
"messages": [
{
"role": "user",
"content": [
{ "type": "text", "text": "Investigate the failing test." }
]
},
{
"role": "assistant",
"content": [
{ "type": "text", "text": "I'll check the test logs first." },
{ "type": "tool_use", "id": "tool_1", "name": "bash", "input": { "cmd": "cat test.log" } }
]
}
],
"turn_boundaries": [0],
"turns_total": 4,
"turns_returned": 3
}
await client.agent.sessions.getSessionTranscript("5f3a1b2c8d4e9f0012345678", { after_turn: 0 })
Terminal window
curl -X GET "https://{projectId}-{containerId}-agent-1.{server}.containers.hoody.icu/api/v1/agent/sessions/5f3a1b2c8d4e9f0012345678/transcript?after_turn=0"

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, use /transcript instead.

NameInTypeRequiredDescription
idpathstringYesPath identifier.
X-Hoody-CwdheaderstringNoPer-request working-directory scope.
X-Hoody-Config-DirheaderstringNoPer-request --config-dir override.
X-Hoody-ContainerheaderstringNoPer-request bound remote container.
X-Hoody-RealmheaderstringNoPer-request realm selector. Rejected on this route.
realmquerystringNoIn-query alias of the X-Hoody-Realm header. Rejected on this route.
{
"events": [
{ "seq": 41, "type": "text", "delta": "I'll check the test logs first." },
{ "seq": 42, "type": "tool_use", "name": "bash", "input": { "cmd": "cat test.log" } },
{ "seq": 43, "type": "tool_result", "output": "ok" }
],
"min_seq": 41,
"max_seq": 43
}
await client.agent.sessions.replaySession("5f3a1b2c8d4e9f0012345678")
Terminal window
curl -X GET "https://{projectId}-{containerId}-agent-1.{server}.containers.hoody.icu/api/v1/agent/sessions/5f3a1b2c8d4e9f0012345678/replay"

WebSocket (primary) or SSE attach to a live session’s full event.* taxonomy. Events carry a gateway-stamped monotonic int64 seq. Resume from ?since=<seq> or the Last-Event-ID header against the 1024-event replay ring — a gap past eviction emits event: lagged {code: replay_gap} then streams from min_seq. A slow client is dropped lagged and never backpressures the daemon. WebSocket clients may post inline answer frames (confirm, answer, cancel, workflow_message).

NameInTypeRequiredDescription
idpathstringYesPath identifier.
sincequeryintegerNoResume from this gateway int64 seq.
Last-Event-IDheaderstringNoSSE resume cursor (the in-header alias of ?since).
X-Hoody-CwdheaderstringNoPer-request working-directory scope.
X-Hoody-Config-DirheaderstringNoPer-request --config-dir override.
X-Hoody-ContainerheaderstringNoPer-request bound remote container.
X-Hoody-RealmheaderstringNoPer-request realm selector. Rejected on this route.
realmquerystringNoIn-query alias of the X-Hoody-Realm header. Rejected on this route.

WebSocket upgrade accepted (WS transport). No body; the connection switches to the WS frame protocol.

await client.agent.sessions.streamSession("5f3a1b2c8d4e9f0012345678", { since: 41 })
Terminal window
curl -X GET "https://{projectId}-{containerId}-agent-1.{server}.containers.hoody.icu/api/v1/agent/sessions/5f3a1b2c8d4e9f0012345678/stream?since=41" \
-H "Accept: text/event-stream"

Dispatch a user turn (fire-and-observe). Returns a job_id; observe agent_done on the session’s stream. A new turn is refused when the session has a parked gate (409 gate_parked) or a turn is already running (409 turn_in_flight) — single-writer, no duplicate parked turns.

NameInTypeRequiredDescription
idpathstringYesPath identifier.
X-Hoody-CwdheaderstringNoPer-request working-directory scope.
X-Hoody-Config-DirheaderstringNoPer-request --config-dir override.
X-Hoody-ContainerheaderstringNoPer-request bound remote container.
X-Hoody-RealmheaderstringNoPer-request realm selector. Rejected on this route.
realmquerystringNoIn-query alias of the X-Hoody-Realm header. Rejected on this route.
NameTypeRequiredDescription
textstringNoThe user message text for this turn.
tool_modestringNoOptional per-turn tool mode override.
dir_scopestringNoOptional per-turn directory-access scope override: home or full.
{
"text": "Investigate the failing auth test."
}
{
"job_id": "5f3a1b2c8d4e9f001234abcd",
"status": "dispatched"
}
await client.agent.sessions.postSessionMessage("5f3a1b2c8d4e9f0012345678", { text: "Investigate the failing auth test." })
Terminal window
curl -X POST "https://{projectId}-{containerId}-agent-1.{server}.containers.hoody.icu/api/v1/agent/sessions/5f3a1b2c8d4e9f0012345678/messages" \
-H "Content-Type: application/json" \
-d '{ "text": "Investigate the failing auth test." }'

POST /api/v1/agent/sessions/{id}/prompt:stream

Section titled “POST /api/v1/agent/sessions/{id}/prompt:stream”

Dispatch a turn and stream the resulting events over SSE from the seq captured just before the dispatch — only this turn’s events. 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.

NameInTypeRequiredDescription
idpathstringYesPath identifier.
policyquerystringNoauto_approve auto-answers confirm gates for the life of the stream.
X-Hoody-Gate-PolicyheaderstringNoConfirm-gate posture: auto_approve adopts the headless auto-answer posture.
X-Hoody-CwdheaderstringNoPer-request working-directory scope.
X-Hoody-Config-DirheaderstringNoPer-request --config-dir override.
X-Hoody-ContainerheaderstringNoPer-request bound remote container.
X-Hoody-RealmheaderstringNoPer-request realm selector. Rejected on this route.
realmquerystringNoIn-query alias of the X-Hoody-Realm header. Rejected on this route.
NameTypeRequiredDescription
textstringNoThe user message text for this turn.
tool_modestringNoOptional per-turn tool mode override.
dir_scopestringNoOptional per-turn directory-access scope override: home or full.
{
"text": "Refactor the auth middleware to use async/await."
}
event: text
id: 47
data: {"delta":"I'll start by reading the current middleware."}
event: tool_use
id: 48
data: {"name":"read","input":{"path":"src/middleware/auth.ts"}}
await client.agent.sessions.promptStream("5f3a1b2c8d4e9f0012345678", { text: "Refactor the auth middleware." })
Terminal window
curl -X POST "https://{projectId}-{containerId}-agent-1.{server}.containers.hoody.icu/api/v1/agent/sessions/5f3a1b2c8d4e9f0012345678/prompt:stream" \
-H "Content-Type: application/json" \
-H "Accept: text/event-stream" \
-d '{ "text": "Refactor the auth middleware to use async/await." }'

POST /api/v1/agent/sessions/{id}/prompt:sync

Section titled “POST /api/v1/agent/sessions/{id}/prompt:sync”

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.

NameInTypeRequiredDescription
idpathstringYesPath identifier.
policyquerystringNoauto_approve adopts the headless auto-answer posture.
X-Hoody-Gate-PolicyheaderstringNoConfirm-gate posture: auto_approve adopts the headless auto-answer posture.
X-Hoody-CwdheaderstringNoPer-request working-directory scope.
X-Hoody-Config-DirheaderstringNoPer-request --config-dir override.
X-Hoody-ContainerheaderstringNoPer-request bound remote container.
X-Hoody-RealmheaderstringNoPer-request realm selector. Rejected on this route.
realmquerystringNoIn-query alias of the X-Hoody-Realm header. Rejected on this route.
NameTypeRequiredDescription
textstringNoThe user message text for this turn.
tool_modestringNoOptional per-turn tool mode override.
dir_scopestringNoOptional per-turn directory-access scope override: home or full.
{
"text": "Summarize the current test failures."
}
{
"status": "done",
"reply": "There are 3 failing tests, all related to token expiry handling."
}
await client.agent.sessions.promptSync("5f3a1b2c8d4e9f0012345678", { text: "Summarize the current test failures." })
Terminal window
curl -X POST "https://{projectId}-{containerId}-agent-1.{server}.containers.hoody.icu/api/v1/agent/sessions/5f3a1b2c8d4e9f0012345678/prompt:sync" \
-H "Content-Type: application/json" \
-d '{ "text": "Summarize the current test failures." }'

POST /api/v1/agent/sessions/{id}/workflow/messages

Section titled “POST /api/v1/agent/sessions/{id}/workflow/messages”

Inject user feedback or input into a running workflow (maps to session.workflow_message -> workflowMsgChan, not commandChan).

NameInTypeRequiredDescription
idpathstringYesPath identifier.
X-Hoody-CwdheaderstringNoPer-request working-directory scope.
X-Hoody-Config-DirheaderstringNoPer-request --config-dir override.
X-Hoody-ContainerheaderstringNoPer-request bound remote container.
X-Hoody-RealmheaderstringNoPer-request realm selector. Rejected on this route.
realmquerystringNoIn-query alias of the X-Hoody-Realm header. Rejected on this route.
NameTypeRequiredDescription
textstringNoFeedback/input text fed to the running workflow.
{
"text": "Stop at step 2 and report progress."
}
{
"delivered": true,
"id": "5f3a1b2c8d4e9f0012345678"
}
await client.agent.sessions.postWorkflowMessage("5f3a1b2c8d4e9f0012345678", { text: "Stop at step 2 and report progress." })
Terminal window
curl -X POST "https://{projectId}-{containerId}-agent-1.{server}.containers.hoody.icu/api/v1/agent/sessions/5f3a1b2c8d4e9f0012345678/workflow/messages" \
-H "Content-Type: application/json" \
-d '{ "text": "Stop at step 2 and report progress." }'

Answer a parked ask-the-user question. Returns 409 no_pending_gate / stale_gate / gate_already_answered / gate_type_mismatch on mismatch.

NameInTypeRequiredDescription
idpathstringYesPath identifier.
X-Hoody-CwdheaderstringNoPer-request working-directory scope.
X-Hoody-Config-DirheaderstringNoPer-request --config-dir override.
X-Hoody-ContainerheaderstringNoPer-request bound remote container.
X-Hoody-RealmheaderstringNoPer-request realm selector. Rejected on this route.
realmquerystringNoIn-query alias of the X-Hoody-Realm header. Rejected on this route.
NameTypeRequiredDescription
gate_idstringNoOptional echo of the parked gate id (stale/mismatch returns 409).
generationintegerNoOptional echo of the parked gate generation.
answerstringNoFree-form answer text.
textstringNoAlternate answer text field (forwarded alongside answer).
answersobjectNoStructured per-field answers for a multi-field question.
{
"gate_id": "gate-3",
"generation": 3,
"answer": "Yes, proceed with the migration."
}
{
"answered": true,
"gate_id": "gate-3",
"generation": 3
}
await client.agent.sessions.answerQuestion("5f3a1b2c8d4e9f0012345678", {
gate_id: "gate-3",
generation: 3,
answer: "Yes, proceed with the migration."
})
Terminal window
curl -X POST "https://{projectId}-{containerId}-agent-1.{server}.containers.hoody.icu/api/v1/agent/sessions/5f3a1b2c8d4e9f0012345678/answer" \
-H "Content-Type: application/json" \
-d '{ "gate_id": "gate-3", "generation": 3, "answer": "Yes, proceed with the migration." }'

POST /api/v1/agent/sessions/{id}/answer:assist

Section titled “POST /api/v1/agent/sessions/{id}/answer:assist”

Run a one-shot helper-model call that proposes answers for the parked question (emits event.question_suggestion). The real answer still travels via /answer — the daemon never answers itself. Returns 409 no_pending_gate when no question is parked.

NameInTypeRequiredDescription
idpathstringYesPath identifier.
X-Hoody-CwdheaderstringNoPer-request working-directory scope.
X-Hoody-Config-DirheaderstringNoPer-request --config-dir override.
X-Hoody-ContainerheaderstringNoPer-request bound remote container.
X-Hoody-RealmheaderstringNoPer-request realm selector. Rejected on this route.
realmquerystringNoIn-query alias of the X-Hoody-Realm header. Rejected on this route.
NameTypeRequiredDescription
modestringNoSuggestion mode (default suggest).
modelstringNoHelper model override; empty uses the configured helper.
genintegerNoGeneration counter to correlate the suggestion event.
{
"mode": "suggest",
"gen": 3
}
{
"job_id": "5f3a1b2c8d4e9f001234abce",
"status": "dispatched"
}
await client.agent.sessions.answerAssist("5f3a1b2c8d4e9f0012345678", { mode: "suggest", gen: 3 })
Terminal window
curl -X POST "https://{projectId}-{containerId}-agent-1.{server}.containers.hoody.icu/api/v1/agent/sessions/5f3a1b2c8d4e9f0012345678/answer:assist" \
-H "Content-Type: application/json" \
-d '{ "mode": "suggest", "gen": 3 }'

Approve or deny a parked tool/dir confirmation. Returns 409 no_pending_gate when nothing is parked; 409 stale_gate / gate_already_answered on mismatch.

NameInTypeRequiredDescription
idpathstringYesPath identifier.
X-Hoody-CwdheaderstringNoPer-request working-directory scope.
X-Hoody-Config-DirheaderstringNoPer-request --config-dir override.
X-Hoody-ContainerheaderstringNoPer-request bound remote container.
X-Hoody-RealmheaderstringNoPer-request realm selector. Rejected on this route.
realmquerystringNoIn-query alias of the X-Hoody-Realm header. Rejected on this route.
NameTypeRequiredDescription
gate_idstringNoOptional echo of the parked gate id (stale/mismatch returns 409).
generationintegerNoOptional echo of the parked gate generation.
approvedbooleanNotrue to approve, false to deny (defaults to true if omitted).
persist_dirsbooleanNoPersist an approved directory grant to settings.json.
{
"gate_id": "gate-3",
"generation": 3,
"approved": true,
"persist_dirs": false
}
{
"answered": true,
"approved": true,
"gate_id": "gate-3",
"generation": 3
}
await client.agent.sessions.confirmGate("5f3a1b2c8d4e9f0012345678", {
gate_id: "gate-3",
generation: 3,
approved: true
})
Terminal window
curl -X POST "https://{projectId}-{containerId}-agent-1.{server}.containers.hoody.icu/api/v1/agent/sessions/5f3a1b2c8d4e9f0012345678/confirm" \
-H "Content-Type: application/json" \
-d '{ "gate_id": "gate-3", "generation": 3, "approved": true }'

These PATCH endpoints mutate a live session in place. The change is echoed as a session event and observed by attached streams.

Switch the chat agent on a live session.

NameInTypeRequiredDescription
idpathstringYesPath identifier.
X-Hoody-CwdheaderstringNoPer-request working-directory scope.
X-Hoody-Config-DirheaderstringNoPer-request --config-dir override.
X-Hoody-ContainerheaderstringNoPer-request bound remote container.
X-Hoody-RealmheaderstringNoPer-request realm selector. Rejected on this route.
realmquerystringNoIn-query alias of the X-Hoody-Realm header. Rejected on this route.
NameTypeRequiredDescription
agentstringNoChat-agent name to switch to.
{
"agent": "code-reviewer"
}
{
"applied": true,
"agent": "code-reviewer"
}
await client.agent.sessions.setSessionAgent("5f3a1b2c8d4e9f0012345678", { agent: "code-reviewer" })
Terminal window
curl -X PATCH "https://{projectId}-{containerId}-agent-1.{server}.containers.hoody.icu/api/v1/agent/sessions/5f3a1b2c8d4e9f0012345678/agent" \
-H "Content-Type: application/json" \
-d '{ "agent": "code-reviewer" }'

Synchronous live model switch. Applies the model inline and returns {status: ok, model, persisted} on success. persisted: false means the frontmatter write failed (the live switch stands but reverts next session). Returns 409 gate_parked / turn_in_flight while busy, 404 for unknown/closed sessions, 400 for a blank model, 409 delegated_session on external-agent sessions, 422 model_unavailable for a spec that cannot be constructed. A successful switch persists into the chat agent’s frontmatter — a GLOBAL repin for future sessions of that agent, not a session-scoped choice. Peers converge via the emitted init_state event.

NameInTypeRequiredDescription
idpathstringYesPath identifier.
X-Hoody-CwdheaderstringNoPer-request working-directory scope.
X-Hoody-Config-DirheaderstringNoPer-request --config-dir override.
X-Hoody-ContainerheaderstringNoPer-request bound remote container.
X-Hoody-RealmheaderstringNoPer-request realm selector. Rejected on this route.
realmquerystringNoIn-query alias of the X-Hoody-Realm header. Rejected on this route.
NameTypeRequiredDescription
modelstringYesModel spec to switch to (provider-prefixed, e.g. anthropic/claude-opus-4-8, or fusion/<slug>). A blank value is rejected.
{
"model": "anthropic/claude-opus-4-8"
}
{
"status": "ok",
"model": "anthropic/claude-opus-4-8",
"persisted": true
}
await client.agent.sessions.setSessionModel("5f3a1b2c8d4e9f0012345678", { model: "anthropic/claude-opus-4-8" })
Terminal window
curl -X PATCH "https://{projectId}-{containerId}-agent-1.{server}.containers.hoody.icu/api/v1/agent/sessions/5f3a1b2c8d4e9f0012345678/model" \
-H "Content-Type: application/json" \
-d '{ "model": "anthropic/claude-opus-4-8" }'

Live reasoning-effort change. Accepts low, medium, high, xhigh, or "" for the model default.

NameInTypeRequiredDescription
idpathstringYesPath identifier.
X-Hoody-CwdheaderstringNoPer-request working-directory scope.
X-Hoody-Config-DirheaderstringNoPer-request --config-dir override.
X-Hoody-ContainerheaderstringNoPer-request bound remote container.
X-Hoody-RealmheaderstringNoPer-request realm selector. Rejected on this route.
realmquerystringNoIn-query alias of the X-Hoody-Realm header. Rejected on this route.
NameTypeRequiredDescription
effortstringNolow / medium / high / xhigh, or "" for the model default.
{
"effort": "high"
}
{
"applied": true,
"effort": "high"
}
await client.agent.sessions.setSessionEffort("5f3a1b2c8d4e9f0012345678", { effort: "high" })
Terminal window
curl -X PATCH "https://{projectId}-{containerId}-agent-1.{server}.containers.hoody.icu/api/v1/agent/sessions/5f3a1b2c8d4e9f0012345678/effort" \
-H "Content-Type: application/json" \
-d '{ "effort": "high" }'

PATCH /api/v1/agent/sessions/{id}/verbosity

Section titled “PATCH /api/v1/agent/sessions/{id}/verbosity”

Live verbosity change. Accepts normal, concise, terse, or minimal.

NameInTypeRequiredDescription
idpathstringYesPath identifier.
X-Hoody-CwdheaderstringNoPer-request working-directory scope.
X-Hoody-Config-DirheaderstringNoPer-request --config-dir override.
X-Hoody-ContainerheaderstringNoPer-request bound remote container.
X-Hoody-RealmheaderstringNoPer-request realm selector. Rejected on this route.
realmquerystringNoIn-query alias of the X-Hoody-Realm header. Rejected on this route.
NameTypeRequiredDescription
levelstringNonormal / concise / terse / minimal.
{
"level": "concise"
}
{
"applied": true,
"level": "concise"
}
await client.agent.sessions.setSessionVerbosity("5f3a1b2c8d4e9f0012345678", { level: "concise" })
Terminal window
curl -X PATCH "https://{projectId}-{containerId}-agent-1.{server}.containers.hoody.icu/api/v1/agent/sessions/5f3a1b2c8d4e9f0012345678/verbosity" \
-H "Content-Type: application/json" \
-d '{ "level": "concise" }'

PATCH /api/v1/agent/sessions/{id}/auto-reply

Section titled “PATCH /api/v1/agent/sessions/{id}/auto-reply”

Arm or disarm the self-driving auto-reply loop. Configures the round budget, the replier model, and the write-class opt-in.

NameInTypeRequiredDescription
idpathstringYesPath identifier.
X-Hoody-CwdheaderstringNoPer-request working-directory scope.
X-Hoody-Config-DirheaderstringNoPer-request --config-dir override.
X-Hoody-ContainerheaderstringNoPer-request bound remote container.
X-Hoody-RealmheaderstringNoPer-request realm selector. Rejected on this route.
realmquerystringNoIn-query alias of the X-Hoody-Realm header. Rejected on this route.
NameTypeRequiredDescription
armedbooleanNotrue to arm the auto-reply loop, false to disarm.
roundsintegerNoNumber of auto-reply rounds budgeted.
modelstringNoReplier model override.
allow_writesbooleanNoOpt in to write-class actions during auto-reply.
{
"armed": true,
"rounds": 5,
"model": "anthropic/claude-haiku-4-5",
"allow_writes": false
}
{
"applied": true,
"armed": true,
"rounds": 5,
"model": "anthropic/claude-haiku-4-5",
"allow_writes": false
}
await client.agent.sessions.setSessionAutoReply("5f3a1b2c8d4e9f0012345678", {
armed: true,
rounds: 5,
model: "anthropic/claude-haiku-4-5",
allow_writes: false
})
Terminal window
curl -X PATCH "https://{projectId}-{containerId}-agent-1.{server}.containers.hoody.icu/api/v1/agent/sessions/5f3a1b2c8d4e9f0012345678/auto-reply" \
-H "Content-Type: application/json" \
-d '{ "armed": true, "rounds": 5, "model": "anthropic/claude-haiku-4-5", "allow_writes": false }'

PATCH /api/v1/agent/sessions/{id}/auto-reply/writes

Section titled “PATCH /api/v1/agent/sessions/{id}/auto-reply/writes”

Flip the write-class opt-in on an already-armed auto-reply loop WITHOUT re-arming (no budget reset).

NameInTypeRequiredDescription
idpathstringYesPath identifier.
X-Hoody-CwdheaderstringNoPer-request working-directory scope.
X-Hoody-Config-DirheaderstringNoPer-request --config-dir override.
X-Hoody-ContainerheaderstringNoPer-request bound remote container.
X-Hoody-RealmheaderstringNoPer-request realm selector. Rejected on this route.
realmquerystringNoIn-query alias of the X-Hoody-Realm header. Rejected on this route.
NameTypeRequiredDescription
allow_writesbooleanNoNew write-class opt-in state.
{
"allow_writes": true
}
{
"applied": true,
"allow_writes": true
}
await client.agent.sessions.setSessionAutoReplyWrites("5f3a1b2c8d4e9f0012345678", { allow_writes: true })
Terminal window
curl -X PATCH "https://{projectId}-{containerId}-agent-1.{server}.containers.hoody.icu/api/v1/agent/sessions/5f3a1b2c8d4e9f0012345678/auto-reply/writes" \
-H "Content-Type: application/json" \
-d '{ "allow_writes": true }'

PATCH /api/v1/agent/sessions/{id}/hoody-env

Section titled “PATCH /api/v1/agent/sessions/{id}/hoody-env”

Live toggle of the session’s HOODY_* shell-env contract for the bash tool.

NameInTypeRequiredDescription
idpathstringYesPath identifier.
X-Hoody-CwdheaderstringNoPer-request working-directory scope.
X-Hoody-Config-DirheaderstringNoPer-request --config-dir override.
X-Hoody-ContainerheaderstringNoPer-request bound remote container.
X-Hoody-RealmheaderstringNoPer-request realm selector. Rejected on this route.
realmquerystringNoIn-query alias of the X-Hoody-Realm header. Rejected on this route.
NameTypeRequiredDescription
enabledbooleanNoWhether to inject the HOODY_* shell-env contract.
{
"enabled": false
}
{
"applied": true,
"enabled": false
}
await client.agent.sessions.setSessionHoodyEnv("5f3a1b2c8d4e9f0012345678", { enabled: false })
Terminal window
curl -X PATCH "https://{projectId}-{containerId}-agent-1.{server}.containers.hoody.icu/api/v1/agent/sessions/5f3a1b2c8d4e9f0012345678/hoody-env" \
-H "Content-Type: application/json" \
-d '{ "enabled": false }'