The core agentic loop: receive message, call LLM, execute tools, iterate, respond.
max_iterations
The call_llm_with_recovery method classifies errors and responds accordingly:
call_llm_with_recovery
retry_after_secs
config.toml.lastgood
During the loop, each tool call receives:
_session_id
_untrusted_source
email_trigger
event_{uuid}
sub-{depth}-{uuid}