2026-09-23·by Sijie Wang#standmeet#architecture#design

force-final-answer

Force a final answer on terminal error

Parent: agent-core

If the agent loop ends in an error having produced zero assistant text (max iterations hit, hallucinated tool name, etc.), instead of surfacing an error it makes one more LLM call without tools, asking the model to answer from what it already has — in-persona, not a canned fallback (backend/internal/conversation/inference/agent_loop_budget.go: handleTerminalErrorforceFinalAnswer, on its own 60 s budget over context.WithoutCancel so it survives the turn's expired deadline).

So a visitor always gets a graceful, in-character answer even when the tool loop breaks.

about this entry

One of sijie's wiki entries. The AI on this site is grounded in the same corpus and answers in sijie's voice, with citations back to entries like this one — answering costs sijie money, so it waits behind a code: enter an access code →