From b20cc5f787ea816ea8645603b7b2ac8234dcb8b4 Mon Sep 17 00:00:00 2001 From: kshitijk4poor <82637225+kshitijk4poor@users.noreply.github.com> Date: Tue, 1 Sep 2026 03:43:21 +0530 Subject: [PATCH] docs(agent): explain intentional preflight vs in-loop message divergence The preflight handler surfaces the boundary exception's per-request text (token count, 'provider call was not sent') rather than the in-loop _COMPRESSION_TIMEOUT_FINAL_RESPONSE constant, which describes a different state (compression ran and could not reduce). Document the divergence so it is not 'fixed' into a single message later. --- agent/conversation_loop.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/agent/conversation_loop.py b/agent/conversation_loop.py index cd19641542..2b7a336c80 100644 --- a/agent/conversation_loop.py +++ b/agent/conversation_loop.py @@ -2040,6 +2040,11 @@ def run_conversation( from agent.agent_runtime_helpers import note_turn_persisted note_turn_persisted(agent) + # Intentionally NOT _COMPRESSION_TIMEOUT_FINAL_RESPONSE: the boundary's + # exception text carries per-request context (token count, "provider + # call was not sent") that is the actionable guidance this handler + # exists to surface; the in-loop constant describes a different state + # (compression ran and could not reduce). _final_response = str(_preflight_timeout_exc) return { "final_response": _final_response,