The agent hook endpoints manage the lifecycle hooks that fire shell commands on agent session events. The hook system is session-scoped: every operation takes a live session_id, and write operations (upsert, delete, toggle, set_disabled) additionally require a single-use nonce minted by the begin-write route. Use these endpoints when you want to inspect the live hook state, define or remove hooks, toggle individual hooks, test-fire a hook command, reload the on-disk configuration, disable all hooks at once, or acknowledge the hook-trust prompt.
All endpoints live under the agent container’s public hostname of the form https://{projectId}-{containerId}-agent-1.{server}.containers.hoody.com. Requests must reach the agent through the Hoody proxy — direct container connections are rejected with forbidden.
Note
Hook writes are guarded by a two-step nonce handshake. Before calling upsert, delete, toggle, or set_disabled, first POST to begin-write with the matching op and scope; the returned nonce is bound to that session+op+scope tuple and is single-use. A nonce minted for op:toggle is not accepted by upsert, and vice versa.
Returns the live and on-disk hook summaries, the per-scope settings files, and the execution-trust probe. hooks.list is session-scoped — supply session_id in the body or as the ?session_id query alias (the body value wins). The daemon payload is surfaced verbatim, so this is not a paginated envelope.
Name In Type Required Description session_idquery string No Live session id (hooks are session-scoped; required by the daemon RPC). Query alias of the body session_id (the body value wins). X-Hoody-Cwdheader string No Per-request working-directory scope: the .hoody project layer / record cwd / tool+workflow cwd. Required by routes that resolve a cwd. X-Hoody-Config-Dirheader string No Per-request --config-dir override selecting which on-disk .hoody install a stateless read/write resolves. X-Hoody-Containerheader string No Per-request bound remote container (omitted = local). Rejected with 400 on routes with no container dimension. X-Hoody-Realmheader string No Per-request realm selector: global or a 24-hex id (also accepted as ?realm=). Rejected with 400 realm_scope_unsupported on active-only routes. realmquery string No Per-request realm selector — the query alias of the X-Hoody-Realm header (read only when the header is absent).
Field Type Required Description session_idstring No Live session id (hooks are session-scoped). May be supplied here OR as the ?session_id query alias; the body value wins.
" session_id " : " sess_8f3c2a1b9d4e5f60a1b2c3d4 "
" name " : " format-on-pre-tool " ,
" description " : " Run prettier on files before any tool call " ,
" command " : " npx prettier --write \" $HOODY_FILE_PATH \" " ,
" id " : " sess_8f3c2a1b9d4e5f60a1b2c3d4 " ,
" path " : " /repo/.hoody/settings.json " ,
" acknowledged_at " : " 2026-01-15T18:22:04Z "
" 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 reach the service through the public endpoint. 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.
curl -X GET " https://{projectId}-{containerId}-agent-1.{server}.containers.hoody.com/api/v1/agent/hooks " \
-H " Authorization: Bearer $HOODY_TOKEN " \
-H " Content-Type: application/json " \
-d ' { "session_id": "sess_8f3c2a1b9d4e5f60a1b2c3d4" } '
import { HoodyClient } from ' hoody-sdk ' ;
const client = new HoodyClient ({ baseURL : ' https://{projectId}-{containerId}-agent-1.{server}.containers.hoody.com ' , token : process . env . HOODY_TOKEN });
await client . agent . hooks . listHooks ({ session_id : ' sess_8f3c2a1b9d4e5f60a1b2c3d4 ' });
Issues the two-step write nonce required before every guarded hook mutation. Pass the live session_id, the target op (one of upsert, delete, toggle, set_disabled), and the scope path. The returned nonce binds to that session + op + scope tuple and is single-use; the nonce for op:toggle is not accepted by upsert, and so on.
Name In Type Required Description X-Hoody-Cwdheader string No Per-request working-directory scope: the .hoody project layer / record cwd / tool+workflow cwd. Required by routes that resolve a cwd. X-Hoody-Config-Dirheader string No Per-request --config-dir override selecting which on-disk .hoody install a stateless read/write resolves. X-Hoody-Containerheader string No Per-request bound remote container (omitted = local). Rejected with 400 on routes with no container dimension. X-Hoody-Realmheader string No Per-request realm selector: global or a 24-hex id (also accepted as ?realm=). Rejected with 400 realm_scope_unsupported on active-only routes. realmquery string No Per-request realm selector — the query alias of the X-Hoody-Realm header (read only when the header is absent).
Field Type Required Description session_idstring Yes Live session id (hooks are session-scoped). opstring Yes The write the nonce authorizes; one of upsert, delete, toggle, set_disabled. The nonce is rejected by any other op. scopestring Yes Scope of the settings file the write targets (e.g. project, user); the nonce binds to its resolved path.
" session_id " : " sess_8f3c2a1b9d4e5f60a1b2c3d4 " ,
" nonce " : " nb_nE4kM2xR8pWq3vT7sJ9aB6cF1dL5hY " ,
" session_id " : " sess_8f3c2a1b9d4e5f60a1b2c3d4 " ,
" expires_at " : " 2026-01-15T18:27:04Z "
" 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 reach the service through the public endpoint. 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). The gateway rejects an oversized body at the edge before the handler reads it. Reduce the request body below the configured limit (default 8 MiB); split a large payload into smaller requests.
" 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.
" 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.
curl -X POST " https://{projectId}-{containerId}-agent-1.{server}.containers.hoody.com/api/v1/agent/hooks/begin-write " \
-H " Authorization: Bearer $HOODY_TOKEN " \
-H " Content-Type: application/json " \
-d ' { "session_id": "sess_8f3c2a1b9d4e5f60a1b2c3d4", "op": "upsert", "scope": "project" } '
import { HoodyClient } from ' hoody-sdk ' ;
const client = new HoodyClient ({ baseURL : ' https://{projectId}-{containerId}-agent-1.{server}.containers.hoody.com ' , token : process . env . HOODY_TOKEN });
await client . agent . hooks . beginHookWrite ({
session_id : ' sess_8f3c2a1b9d4e5f60a1b2c3d4 ' ,
Creates or updates a hook (hooks.upsert). Requires the begin-write nonce for op:upsert and a live session_id. Defining a hook persists an arbitrary command that fires on lifecycle events.
Name In Type Required Description X-Hoody-Cwdheader string No Per-request working-directory scope: the .hoody project layer / record cwd / tool+workflow cwd. Required by routes that resolve a cwd. X-Hoody-Config-Dirheader string No Per-request --config-dir override selecting which on-disk .hoody install a stateless read/write resolves. X-Hoody-Containerheader string No Per-request bound remote container (omitted = local). Rejected with 400 on routes with no container dimension. X-Hoody-Realmheader string No Per-request realm selector: global or a 24-hex id (also accepted as ?realm=). Rejected with 400 realm_scope_unsupported on active-only routes. realmquery string No Per-request realm selector — the query alias of the X-Hoody-Realm header (read only when the header is absent).
Field Type Required Description session_idstring Yes Live session id (hooks are session-scoped). noncestring Yes The single-use write nonce from beginHookWrite minted for op:upsert + this scope; the RPC fails closed without it. scopestring No Scope of the settings file to write (must match the nonce’s scope). eventstring No Lifecycle event the hook fires on. matcherstring No Matcher selecting when the hook fires. commandstring No Command to run when the hook fires. timeoutinteger No Per-fire timeout (optional). namestring No Short human label shown in the Hooks tab (required when creating a new hook; omit to preserve on update). descriptionstring No Short description of what the hook does (required when creating a new hook; omit to preserve on update).
" session_id " : " sess_8f3c2a1b9d4e5f60a1b2c3d4 " ,
" nonce " : " nb_nE4kM2xR8pWq3vT7sJ9aB6cF1dL5hY " ,
" command " : " npx prettier --write \" $HOODY_FILE_PATH \" " ,
" name " : " format-on-pre-tool " ,
" description " : " Run prettier on files before any tool call "
" name " : " format-on-pre-tool " ,
" description " : " Run prettier on files before any tool call " ,
" command " : " npx prettier --write \" $HOODY_FILE_PATH \" " ,
" 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 reach the service through the public endpoint. 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). The gateway rejects an oversized body at the edge before the handler reads it. Reduce the request body below the configured limit (default 8 MiB); split a large payload into smaller requests.
" 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.
" 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.
curl -X PUT " https://{projectId}-{containerId}-agent-1.{server}.containers.hoody.com/api/v1/agent/hooks " \
-H " Authorization: Bearer $HOODY_TOKEN " \
-H " Content-Type: application/json " \
"session_id": "sess_8f3c2a1b9d4e5f60a1b2c3d4",
"nonce": "nb_nE4kM2xR8pWq3vT7sJ9aB6cF1dL5hY",
"command": "npx prettier --write \"$HOODY_FILE_PATH\"",
"name": "format-on-pre-tool",
"description": "Run prettier on files before any tool call"
import { HoodyClient } from ' hoody-sdk ' ;
const client = new HoodyClient ({ baseURL : ' https://{projectId}-{containerId}-agent-1.{server}.containers.hoody.com ' , token : process . env . HOODY_TOKEN });
await client . agent . hooks . upsertHook ({
session_id : ' sess_8f3c2a1b9d4e5f60a1b2c3d4 ' ,
nonce : ' nb_nE4kM2xR8pWq3vT7sJ9aB6cF1dL5hY ' ,
command : ' npx prettier --write "$HOODY_FILE_PATH" ' ,
name : ' format-on-pre-tool ' ,
description : ' Run prettier on files before any tool call '
Deletes a hook (hooks.delete). Requires the begin-write nonce minted by beginHookWrite for op:delete plus a live session_id.
Name In Type Required Description X-Hoody-Cwdheader string No Per-request working-directory scope: the .hoody project layer / record cwd / tool+workflow cwd. Required by routes that resolve a cwd. X-Hoody-Config-Dirheader string No Per-request --config-dir override selecting which on-disk .hoody install a stateless read/write resolves. X-Hoody-Containerheader string No Per-request bound remote container (omitted = local). Rejected with 400 on routes with no container dimension. X-Hoody-Realmheader string No Per-request realm selector: global or a 24-hex id (also accepted as ?realm=). Rejected with 400 realm_scope_unsupported on active-only routes. realmquery string No Per-request realm selector — the query alias of the X-Hoody-Realm header (read only when the header is absent).
Field Type Required Description session_idstring Yes Live session id (hooks are session-scoped). noncestring Yes The single-use write nonce from beginHookWrite minted for op:delete + this scope; the RPC fails closed without it. scopestring No Scope of the settings file to write (must match the nonce’s scope).
" session_id " : " sess_8f3c2a1b9d4e5f60a1b2c3d4 " ,
" nonce " : " nb_Z8rQ5yN1kP4tV9wX3mC7sL2bH6jF0dG " ,
" deleted " : " format-on-pre-tool " ,
" 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 reach the service through the public endpoint. 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; 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.
" 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.
curl -X DELETE " https://{projectId}-{containerId}-agent-1.{server}.containers.hoody.com/api/v1/agent/hooks " \
-H " Authorization: Bearer $HOODY_TOKEN " \
-H " Content-Type: application/json " \
"session_id": "sess_8f3c2a1b9d4e5f60a1b2c3d4",
"nonce": "nb_Z8rQ5yN1kP4tV9wX3mC7sL2bH6jF0dG",
import { HoodyClient } from ' hoody-sdk ' ;
const client = new HoodyClient ({ baseURL : ' https://{projectId}-{containerId}-agent-1.{server}.containers.hoody.com ' , token : process . env . HOODY_TOKEN });
await client . agent . hooks . deleteHook ({
session_id : ' sess_8f3c2a1b9d4e5f60a1b2c3d4 ' ,
nonce : ' nb_Z8rQ5yN1kP4tV9wX3mC7sL2bH6jF0dG ' ,
Toggles a single hook’s enabled state (hooks.toggle). This is a guarded write: it requires the begin-write nonce minted for op:toggle (the daemon RPC fails closed without it) plus a live session_id.
Name In Type Required Description X-Hoody-Cwdheader string No Per-request working-directory scope: the .hoody project layer / record cwd / tool+workflow cwd. Required by routes that resolve a cwd. X-Hoody-Config-Dirheader string No Per-request --config-dir override selecting which on-disk .hoody install a stateless read/write resolves. X-Hoody-Containerheader string No Per-request bound remote container (omitted = local). Rejected with 400 on routes with no container dimension. X-Hoody-Realmheader string No Per-request realm selector: global or a 24-hex id (also accepted as ?realm=). Rejected with 400 realm_scope_unsupported on active-only routes. realmquery string No Per-request realm selector — the query alias of the X-Hoody-Realm header (read only when the header is absent).
Field Type Required Description session_idstring Yes Live session id (hooks are session-scoped). noncestring Yes The single-use write nonce from beginHookWrite minted for op:toggle + this scope; the RPC fails closed without it. scopestring No Scope of the settings file to write (must match the nonce’s scope).
" session_id " : " sess_8f3c2a1b9d4e5f60a1b2c3d4 " ,
" nonce " : " nb_T3gH7vL2mK9pQ5wX4nR1sJ8bC6dF0yN " ,
" toggled " : " format-on-pre-tool " ,
" 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 reach the service through the public endpoint. 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). The gateway rejects an oversized body at the edge before the handler reads it. Reduce the request body below the configured limit (default 8 MiB); split a large payload into smaller requests.
" 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.
" 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.
curl -X POST " https://{projectId}-{containerId}-agent-1.{server}.containers.hoody.com/api/v1/agent/hooks/toggle " \
-H " Authorization: Bearer $HOODY_TOKEN " \
-H " Content-Type: application/json " \
"session_id": "sess_8f3c2a1b9d4e5f60a1b2c3d4",
"nonce": "nb_T3gH7vL2mK9pQ5wX4nR1sJ8bC6dF0yN",
import { HoodyClient } from ' hoody-sdk ' ;
const client = new HoodyClient ({ baseURL : ' https://{projectId}-{containerId}-agent-1.{server}.containers.hoody.com ' , token : process . env . HOODY_TOKEN });
await client . agent . hooks . toggleHook ({
session_id : ' sess_8f3c2a1b9d4e5f60a1b2c3d4 ' ,
nonce : ' nb_T3gH7vL2mK9pQ5wX4nR1sJ8bC6dF0yN ' ,
Disables (or re-enables) all hooks at once (hooks.set_disabled). This is a guarded write: it requires the begin-write nonce minted by beginHookWrite for op:set_disabled (the daemon RPC fails closed without it) plus a live session_id.
Name In Type Required Description X-Hoody-Cwdheader string No Per-request working-directory scope: the .hoody project layer / record cwd / tool+workflow cwd. Required by routes that resolve a cwd. X-Hoody-Config-Dirheader string No Per-request --config-dir override selecting which on-disk .hoody install a stateless read/write resolves. X-Hoody-Containerheader string No Per-request bound remote container (omitted = local). Rejected with 400 on routes with no container dimension. X-Hoody-Realmheader string No Per-request realm selector: global or a 24-hex id (also accepted as ?realm=). Rejected with 400 realm_scope_unsupported on active-only routes. realmquery string No Per-request realm selector — the query alias of the X-Hoody-Realm header (read only when the header is absent).
Field Type Required Description session_idstring Yes Live session id (hooks are session-scoped). noncestring Yes The single-use write nonce from beginHookWrite minted for op:set_disabled + this scope; the RPC fails closed without it. scopestring No Scope of the settings file to write (must match the nonce’s scope).
" session_id " : " sess_8f3c2a1b9d4e5f60a1b2c3d4 " ,
" nonce " : " nb_D1sA6bF8cJ2kM4nP7qR5tV9wX3yL0hG " ,
" 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 reach the service through the public endpoint. 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). The gateway rejects an oversized body at the edge before the handler reads it. Reduce the request body below the configured limit (default 8 MiB); split a large payload into smaller requests.
" 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.
" 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.
curl -X POST " https://{projectId}-{containerId}-agent-1.{server}.containers.hoody.com/api/v1/agent/hooks/disable-all " \
-H " Authorization: Bearer $HOODY_TOKEN " \
-H " Content-Type: application/json " \
"session_id": "sess_8f3c2a1b9d4e5f60a1b2c3d4",
"nonce": "nb_D1sA6bF8cJ2kM4nP7qR5tV9wX3yL0hG",
import { HoodyClient } from ' hoody-sdk ' ;
const client = new HoodyClient ({ baseURL : ' https://{projectId}-{containerId}-agent-1.{server}.containers.hoody.com ' , token : process . env . HOODY_TOKEN });
await client . agent . hooks . disableAllHooks ({
session_id : ' sess_8f3c2a1b9d4e5f60a1b2c3d4 ' ,
nonce : ' nb_D1sA6bF8cJ2kM4nP7qR5tV9wX3yL0hG ' ,
Reloads the hook configuration from disk (hooks.reload). Pass a live session_id in the body to also receive the reloaded summary.
Name In Type Required Description X-Hoody-Cwdheader string No Per-request working-directory scope: the .hoody project layer / record cwd / tool+workflow cwd. Required by routes that resolve a cwd. X-Hoody-Config-Dirheader string No Per-request --config-dir override selecting which on-disk .hoody install a stateless read/write resolves. X-Hoody-Containerheader string No Per-request bound remote container (omitted = local). Rejected with 400 on routes with no container dimension. X-Hoody-Realmheader string No Per-request realm selector: global or a 24-hex id (also accepted as ?realm=). Rejected with 400 realm_scope_unsupported on active-only routes. realmquery string No Per-request realm selector — the query alias of the X-Hoody-Realm header (read only when the header is absent).
This endpoint takes no parameters.
" session_id " : " sess_8f3c2a1b9d4e5f60a1b2c3d4 "
" /repo/.hoody/settings.json "
" 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 reach the service through the public endpoint. 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). The gateway rejects an oversized body at the edge before the handler reads it. Reduce the request body below the configured limit (default 8 MiB); split a large payload into smaller requests.
" 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.
" 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.
curl -X POST " https://{projectId}-{containerId}-agent-1.{server}.containers.hoody.com/api/v1/agent/hooks/reload " \
-H " Authorization: Bearer $HOODY_TOKEN " \
-H " Content-Type: application/json " \
-d ' { "session_id": "sess_8f3c2a1b9d4e5f60a1b2c3d4" } '
import { HoodyClient } from ' hoody-sdk ' ;
const client = new HoodyClient ({ baseURL : ' https://{projectId}-{containerId}-agent-1.{server}.containers.hoody.com ' , token : process . env . HOODY_TOKEN });
await client . agent . hooks . reloadHooks ({ session_id : ' sess_8f3c2a1b9d4e5f60a1b2c3d4 ' });
Test-fires a hook command (hooks.test) — this EXECUTES an arbitrary command now. Requires a live session_id (hooks are session-scoped).
Name In Type Required Description X-Hoody-Cwdheader string No Per-request working-directory scope: the .hoody project layer / record cwd / tool+workflow cwd. Required by routes that resolve a cwd. X-Hoody-Config-Dirheader string No Per-request --config-dir override selecting which on-disk .hoody install a stateless read/write resolves. X-Hoody-Containerheader string No Per-request bound remote container (omitted = local). Rejected with 400 on routes with no container dimension. X-Hoody-Realmheader string No Per-request realm selector: global or a 24-hex id (also accepted as ?realm=). Rejected with 400 realm_scope_unsupported on active-only routes. realmquery string No Per-request realm selector — the query alias of the X-Hoody-Realm header (read only when the header is absent).
This endpoint takes no parameters.
" session_id " : " sess_8f3c2a1b9d4e5f60a1b2c3d4 "
" hook " : " format-on-pre-tool " ,
" stdout " : " src/index.ts 120ms \n " ,
" 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 reach the service through the public endpoint. 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). The gateway rejects an oversized body at the edge before the handler reads it. Reduce the request body below the configured limit (default 8 MiB); split a large payload into smaller requests.
" 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.
" 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.
curl -X POST " https://{projectId}-{containerId}-agent-1.{server}.containers.hoody.com/api/v1/agent/hooks/test " \
-H " Authorization: Bearer $HOODY_TOKEN " \
-H " Content-Type: application/json " \
-d ' { "session_id": "sess_8f3c2a1b9d4e5f60a1b2c3d4" } '
import { HoodyClient } from ' hoody-sdk ' ;
const client = new HoodyClient ({ baseURL : ' https://{projectId}-{containerId}-agent-1.{server}.containers.hoody.com ' , token : process . env . HOODY_TOKEN });
await client . agent . hooks . testHook ({ session_id : ' sess_8f3c2a1b9d4e5f60a1b2c3d4 ' });
Acknowledges the hook-trust prompt (hooks.trust_ack). Requires a live session_id (hooks are session-scoped). Call this after the user has reviewed the pending hook changes and agreed to let them run.
Name In Type Required Description X-Hoody-Cwdheader string No Per-request working-directory scope: the .hoody project layer / record cwd / tool+workflow cwd. Required by routes that resolve a cwd. X-Hoody-Config-Dirheader string No Per-request --config-dir override selecting which on-disk .hoody install a stateless read/write resolves. X-Hoody-Containerheader string No Per-request bound remote container (omitted = local). Rejected with 400 on routes with no container dimension. X-Hoody-Realmheader string No Per-request realm selector: global or a 24-hex id (also accepted as ?realm=). Rejected with 400 realm_scope_unsupported on active-only routes. realmquery string No Per-request realm selector — the query alias of the X-Hoody-Realm header (read only when the header is absent).
This endpoint takes no parameters.
" session_id " : " sess_8f3c2a1b9d4e5f60a1b2c3d4 "
" acknowledged_at " : " 2026-01-15T18:31:12Z " ,
" session_id " : " sess_8f3c2a1b9d4e5f60a1b2c3d4 "
" 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 reach the service through the public endpoint. 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). The gateway rejects an oversized body at the edge before the handler reads it. Reduce the request body below the configured limit (default 8 MiB); split a large payload into smaller requests.
" 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.
" 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.
curl -X POST " https://{projectId}-{containerId}-agent-1.{server}.containers.hoody.com/api/v1/agent/hooks/trust/ack " \
-H " Authorization: Bearer $HOODY_TOKEN " \
-H " Content-Type: application/json " \
-d ' { "session_id": "sess_8f3c2a1b9d4e5f60a1b2c3d4" } '
import { HoodyClient } from ' hoody-sdk ' ;
const client = new HoodyClient ({ baseURL : ' https://{projectId}-{containerId}-agent-1.{server}.containers.hoody.com ' , token : process . env . HOODY_TOKEN });
await client . agent . hooks . ackHookTrust ({ session_id : ' sess_8f3c2a1b9d4e5f60a1b2c3d4 ' });