Skip to main content
POST
/
api
/
v2
/
sessions
/
{id}
/
force_answer
Force an answer
curl --request POST \
  --url https://agp.eu.hcompany.ai/api/v2/sessions/{id}/force_answer \
  --header 'Authorization: Bearer <token>'
Injects a force_answer flow-control event into the session. The agent stops exploring and produces a final answer on its next step, using whatever context it has gathered so far. Mirrors pause and resume: no body, authenticated, fire-and-forget. If the session has subagents still running, force_answer propagates down to them: each in-flight subagent is asked to wrap up, gets a short grace window to finalize, and any that don’t finish in time are cancelled. Their partial results are folded into the parent’s answer. The same cascade repeats through any deeper subagents. Returns 202 Accepted. The command is delivered asynchronously.

Path parameters

id
string
required
The session ID.

Examples

curl -X POST https://agp.eu.hcompany.ai/api/v2/sessions/$SESSION_ID/force_answer \
  -H "Authorization: Bearer $H_API_KEY"

Errors

StatusCause
404Session not found, or you don’t have access.