Skip to main content
POST
Force an answer
Injects a force_answer flow-control event into the session. The agent stops exploring and produces a final answer on its next step, based on whatever context it has gathered so far. Like pause and resume, this request takes no body, requires authentication, and does not wait for the agent to act. 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. On a queued session the event is buffered and delivered when the agent starts. On a finished session it behaves like sending a message: the session restarts and the relaunched agent answers immediately. Returns 202 Accepted. The command is delivered asynchronously.

Path parameters

id
string
required
The session ID.

Examples


Errors