Skip to content
Hoody.com

Most endpoints on this page are PATCH calls that change one property of an existing agent session and take effect from the next turn. Each call is safe to issue while a turn is running; the gateway forwards the change to the live session and, when a confirm or question gate is parked, defers the change to apply between turns (a 200 response with deferred: true reports this). Two settings break the pattern. The model switch applies inline and synchronously, so a busy session returns 409 instead of a deferred success. The after-compaction message is a PUT and is the other exception: the agent re-adds the text as a user message right after the summary of every compaction, before the next model request, rather than waiting for the next turn.

Live chat-agent switch, echoed as a session event. Safe to call while a turn is running; deferred between turns if a gate is parked.

NameInTypeRequiredDescription
idpathstringYesPath identifier.
X-Hoody-CwdheaderstringNoPer-request working-directory scope: the .hoody project layer / record cwd / tool+workflow cwd. Required by routes that resolve a cwd (e.g. POST /todos; todos.create also accepts a body cwd).
X-Hoody-Config-DirheaderstringNoPer-request --config-dir override selecting which on-disk .hoody install a stateless read/write resolves against.
X-Hoody-ContainerheaderstringNoPer-request bound remote container (omitted = local). Rejected (400) on routes with no container dimension.
X-Hoody-RealmheaderstringNoPer-request realm selector: global or a 24-hex id (also accepted as ?realm=). Rejected (400 realm_scope_unsupported) on active-only / no-realm routes.
realmquerystringNoPer-request realm selector, the in:query alias of the X-Hoody-Realm header (read only when the header is absent): global or a 24-hex id. Rejected (400 realm_scope_unsupported) on active-only / no-realm routes.
FieldTypeRequiredDescription
agentstringNoChat-agent name to switch to.
Terminal window
curl -X PATCH "https://67e89abc123def456789abcd-890abcdef12345678901cdef-agent-1.node-example-1.containers.hoody.com/api/v1/agent/sessions/{id}/agent" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{"agent":"build"}'

Applied.

{
"status": "ok"
}

When a gate is parked, the response also carries deferred: true and a note explaining why the command has not yet been applied.

FieldTypeDescription
statusstringok on success.
deferredbooleanPresent and true when a gate is parked: the command is applied only between turns.
notestringPresent alongside deferred: why the command has not been applied yet.

Synchronous inline model switch: applies the model now and returns exactly what happened (persisted: false means the live switch stands but reverts next session). Safe to call while a turn is running, but returns 409 instead of deferring if the session is busy or external-agent owned.

NameInTypeRequiredDescription
idpathstringYesPath identifier.
X-Hoody-CwdheaderstringNoPer-request working-directory scope: the .hoody project layer / record cwd / tool+workflow cwd. Required by routes that resolve a cwd (e.g. POST /todos; todos.create also accepts a body cwd).
X-Hoody-Config-DirheaderstringNoPer-request --config-dir override selecting which on-disk .hoody install a stateless read/write resolves against.
X-Hoody-ContainerheaderstringNoPer-request bound remote container (omitted = local). Rejected (400) on routes with no container dimension.
X-Hoody-RealmheaderstringNoPer-request realm selector: global or a 24-hex id (also accepted as ?realm=). Rejected (400 realm_scope_unsupported) on active-only / no-realm routes.
realmquerystringNoPer-request realm selector, the in:query alias of the X-Hoody-Realm header (read only when the header is absent): global or a 24-hex id. Rejected (400 realm_scope_unsupported) on active-only / no-realm routes.
FieldTypeRequiredDescription
modelstringYesModel spec to switch to (provider-prefixed, e.g. anthropic/claude-opus-4-8, or fusion/<slug>). A blank value is rejected and never treated as a silent no-op.
Terminal window
curl -X PATCH "https://67e89abc123def456789abcd-890abcdef12345678901cdef-agent-1.node-example-1.containers.hoody.com/api/v1/agent/sessions/{id}/model" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{"model":"anthropic/claude-opus-4-8"}'

Applied.

{
"status": "ok",
"model": "anthropic/claude-opus-4-8",
"persisted": true
}
FieldTypeDescription
statusstringok on a successful switch.
modelstringThe model spec now active on the session.
persistedbooleanWhether the choice was written to the chat agent’s frontmatter. false means the live switch stands but reverts next session.

Live reasoning-effort change. Accepts low, medium, high, xhigh, max, or an empty string for the model default. Safe to call while a turn is running; deferred between turns if a gate is parked.

NameInTypeRequiredDescription
idpathstringYesPath identifier.
X-Hoody-CwdheaderstringNoPer-request working-directory scope: the .hoody project layer / record cwd / tool+workflow cwd. Required by routes that resolve a cwd (e.g. POST /todos; todos.create also accepts a body cwd).
X-Hoody-Config-DirheaderstringNoPer-request --config-dir override selecting which on-disk .hoody install a stateless read/write resolves against.
X-Hoody-ContainerheaderstringNoPer-request bound remote container (omitted = local). Rejected (400) on routes with no container dimension.
X-Hoody-RealmheaderstringNoPer-request realm selector: global or a 24-hex id (also accepted as ?realm=). Rejected (400 realm_scope_unsupported) on active-only / no-realm routes.
realmquerystringNoPer-request realm selector, the in:query alias of the X-Hoody-Realm header (read only when the header is absent): global or a 24-hex id. Rejected (400 realm_scope_unsupported) on active-only / no-realm routes.
FieldTypeRequiredDescription
effortstringNolow, medium, high, xhigh, max, or "" for the model default.
Terminal window
curl -X PATCH "https://67e89abc123def456789abcd-890abcdef12345678901cdef-agent-1.node-example-1.containers.hoody.com/api/v1/agent/sessions/{id}/effort" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{"effort":"high"}'

Applied.

{
"status": "ok"
}

When a gate is parked, the response also carries deferred: true and a note explaining why the command has not yet been applied.

FieldTypeDescription
statusstringok on success.
deferredbooleanPresent and true when a gate is parked: the command is applied only between turns.
notestringPresent alongside deferred: why the command has not been applied yet.

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. Safe to call while a turn is running; deferred between turns if a gate is parked.

NameInTypeRequiredDescription
idpathstringYesPath identifier.
X-Hoody-CwdheaderstringNoPer-request working-directory scope: the .hoody project layer / record cwd / tool+workflow cwd. Required by routes that resolve a cwd (e.g. POST /todos; todos.create also accepts a body cwd).
X-Hoody-Config-DirheaderstringNoPer-request --config-dir override selecting which on-disk .hoody install a stateless read/write resolves against.
X-Hoody-ContainerheaderstringNoPer-request bound remote container (omitted = local). Rejected (400) on routes with no container dimension.
X-Hoody-RealmheaderstringNoPer-request realm selector: global or a 24-hex id (also accepted as ?realm=). Rejected (400 realm_scope_unsupported) on active-only / no-realm routes.
realmquerystringNoPer-request realm selector, the in:query alias of the X-Hoody-Realm header (read only when the header is absent): global or a 24-hex id. Rejected (400 realm_scope_unsupported) on active-only / no-realm routes.
FieldTypeRequiredDescription
levelstringNonormal, concise, terse, or minimal.
Terminal window
curl -X PATCH "https://67e89abc123def456789abcd-890abcdef12345678901cdef-agent-1.node-example-1.containers.hoody.com/api/v1/agent/sessions/{id}/verbosity" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{"level":"concise"}'

Applied.

{
"status": "ok"
}

When a gate is parked, the response also carries deferred: true and a note explaining why the command has not yet been applied.

FieldTypeDescription
statusstringok on success.
deferredbooleanPresent and true when a gate is parked: the command is applied only between turns.
notestringPresent alongside deferred: why the command has not been applied yet.

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, including the round budget, replier model, and write opt-in. Safe to call while a turn is running; deferred between turns if a gate is parked.

NameInTypeRequiredDescription
idpathstringYesPath identifier.
X-Hoody-CwdheaderstringNoPer-request working-directory scope: the .hoody project layer / record cwd / tool+workflow cwd. Required by routes that resolve a cwd (e.g. POST /todos; todos.create also accepts a body cwd).
X-Hoody-Config-DirheaderstringNoPer-request --config-dir override selecting which on-disk .hoody install a stateless read/write resolves against.
X-Hoody-ContainerheaderstringNoPer-request bound remote container (omitted = local). Rejected (400) on routes with no container dimension.
X-Hoody-RealmheaderstringNoPer-request realm selector: global or a 24-hex id (also accepted as ?realm=). Rejected (400 realm_scope_unsupported) on active-only / no-realm routes.
realmquerystringNoPer-request realm selector, the in:query alias of the X-Hoody-Realm header (read only when the header is absent): global or a 24-hex id. Rejected (400 realm_scope_unsupported) on active-only / no-realm routes.
FieldTypeRequiredDescription
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.
Terminal window
curl -X PATCH "https://67e89abc123def456789abcd-890abcdef12345678901cdef-agent-1.node-example-1.containers.hoody.com/api/v1/agent/sessions/{id}/auto-reply" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{"armed":true,"rounds":5,"model":"anthropic/claude-haiku-4-5","allow_writes":false}'

Applied.

{
"status": "ok"
}

When a gate is parked, the response also carries deferred: true and a note explaining why the command has not yet been applied.

FieldTypeDescription
statusstringok on success.
deferredbooleanPresent and true when a gate is parked: the command is applied only between turns.
notestringPresent alongside deferred: why the command has not been applied yet.

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). Safe to call while a turn is running; deferred between turns if a gate is parked.

NameInTypeRequiredDescription
idpathstringYesPath identifier.
X-Hoody-CwdheaderstringNoPer-request working-directory scope: the .hoody project layer / record cwd / tool+workflow cwd. Required by routes that resolve a cwd (e.g. POST /todos; todos.create also accepts a body cwd).
X-Hoody-Config-DirheaderstringNoPer-request --config-dir override selecting which on-disk .hoody install a stateless read/write resolves against.
X-Hoody-ContainerheaderstringNoPer-request bound remote container (omitted = local). Rejected (400) on routes with no container dimension.
X-Hoody-RealmheaderstringNoPer-request realm selector: global or a 24-hex id (also accepted as ?realm=). Rejected (400 realm_scope_unsupported) on active-only / no-realm routes.
realmquerystringNoPer-request realm selector, the in:query alias of the X-Hoody-Realm header (read only when the header is absent): global or a 24-hex id. Rejected (400 realm_scope_unsupported) on active-only / no-realm routes.
FieldTypeRequiredDescription
allow_writesbooleanNoNew write-class opt-in state.
Terminal window
curl -X PATCH "https://67e89abc123def456789abcd-890abcdef12345678901cdef-agent-1.node-example-1.containers.hoody.com/api/v1/agent/sessions/{id}/auto-reply/writes" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{"allow_writes":true}'

Applied.

{
"status": "ok"
}

When a gate is parked, the response also carries deferred: true and a note explaining why the command has not yet been applied.

FieldTypeDescription
statusstringok on success.
deferredbooleanPresent and true when a gate is parked: the command is applied only between turns.
notestringPresent alongside deferred: why the command has not been applied yet.

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. Safe to call while a turn is running; deferred between turns if a gate is parked.

NameInTypeRequiredDescription
idpathstringYesPath identifier.
X-Hoody-CwdheaderstringNoPer-request working-directory scope: the .hoody project layer / record cwd / tool+workflow cwd. Required by routes that resolve a cwd (e.g. POST /todos; todos.create also accepts a body cwd).
X-Hoody-Config-DirheaderstringNoPer-request --config-dir override selecting which on-disk .hoody install a stateless read/write resolves against.
X-Hoody-ContainerheaderstringNoPer-request bound remote container (omitted = local). Rejected (400) on routes with no container dimension.
X-Hoody-RealmheaderstringNoPer-request realm selector: global or a 24-hex id (also accepted as ?realm=). Rejected (400 realm_scope_unsupported) on active-only / no-realm routes.
realmquerystringNoPer-request realm selector, the in:query alias of the X-Hoody-Realm header (read only when the header is absent): global or a 24-hex id. Rejected (400 realm_scope_unsupported) on active-only / no-realm routes.
FieldTypeRequiredDescription
enabledbooleanNoWhether to inject the HOODY_* shell-env contract.
Terminal window
curl -X PATCH "https://67e89abc123def456789abcd-890abcdef12345678901cdef-agent-1.node-example-1.containers.hoody.com/api/v1/agent/sessions/{id}/hoody-env" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{"enabled":false}'

Applied.

{
"status": "ok"
}

When a gate is parked, the response also carries deferred: true and a note explaining why the command has not yet been applied.

FieldTypeDescription
statusstringok on success.
deferredbooleanPresent and true when a gate is parked: the command is applied only between turns.
notestringPresent alongside deferred: why the command has not been applied yet.

PUT /api/v1/agent/sessions/{id}/after-compaction

Section titled “PUT /api/v1/agent/sessions/{id}/after-compaction”

Sets the text the agent re-adds to the conversation as a user message right after the summary of every compaction (automatic, manual, or the recovery pass that follows a context overflow), so it is in place before the next model request. This is the exception to the “from the next turn” rule above: the text is re-added right after the summary, not deferred to the next turn. The text is stored and re-added byte for byte, never in the system prompt; an empty or whitespace-only text removes the message. The cap is 16384 bytes (16 KiB). The message is saved with the session, kept across restarts, and inherited by a fork; GET /sessions/{id} and GET /sessions/{id}/state show it as after_compaction. A Claude Code session answers 409 delegated_session because Claude Code manages its own context; a closed session answers 404 not_found. Active-realm-scoped.

NameInTypeRequiredDescription
idpathstringYesThe session id.
X-Hoody-CwdheaderstringNoPer-request working-directory scope: the .hoody project layer / record cwd / tool+workflow cwd. Required by routes that resolve a cwd (e.g. POST /todos; todos.create also accepts a body cwd).
X-Hoody-Config-DirheaderstringNoPer-request --config-dir override selecting which on-disk .hoody install a stateless read/write resolves against.
X-Hoody-ContainerheaderstringNoPer-request bound remote container (omitted = local). Rejected (400) on routes with no container dimension.
X-Hoody-RealmheaderstringNoPer-request realm selector: global or a 24-hex id (also accepted as ?realm=). Rejected (400 realm_scope_unsupported) on active-only / no-realm routes.
realmquerystringNoPer-request realm selector, the in:query alias of the X-Hoody-Realm header (read only when the header is absent): global or a 24-hex id. Rejected (400 realm_scope_unsupported) on active-only / no-realm routes.
FieldTypeRequiredDescription
textstringYesThe message text, at most 16384 bytes in UTF-8. Empty or whitespace-only removes the message.
Terminal window
curl -X PUT "https://67e89abc123def456789abcd-890abcdef12345678901cdef-agent-1.node-example-1.containers.hoody.com/api/v1/agent/sessions/{id}/after-compaction" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{"text":"Identity: you are reviewing PRs for the payments service. Always run the unit tests before reporting back."}'

Saved.

{
"status": "ok",
"bytes": 121
}
FieldTypeDescription
statusstringok.
bytesintegerThe size of the saved text in bytes; 0 when the message was removed.