ExAthena.Tools.AskUser (ExAthena v0.17.0)

Copy Markdown View Source

Ask the human a clarifying question mid-run and block until they answer.

This tool only works when the host wires an interactive channel into the tool context: assigns: %{ask_user: pid}, where pid receives an {:athena_ask_user, question} message and replies with {:athena_user_answer, tool_call_id, answer}. The LiveView chat UI does this; headless runs (CLI, cron) do not, so the tool returns an error there telling the model to proceed on its own judgement instead of hanging.

Because the tool returns parallel_safe?: false, it executes serially in the run-loop process. The blocking receive therefore pauses the entire agent loop until the user answers — exactly the "wait for input" semantics we want — without a per-tool timeout killing it (only the concurrent dispatch path applies tool_timeout_ms).