Skip to content

The agent that grows with you

docs(agent): the authorization-gate bound follows the turn's approval window

Brooklyn Nicholson214998ecc0cf
diff --git a/agent/tool_executor.py b/agent/tool_executor.py
index 50a9e625999..a37ac4ee556 100644
--- a/agent/tool_executor.py
+++ b/agent/tool_executor.py
@@ -132,14 +132,14 @@ _DEFAULT_IMAGE_PARALLEL_REQUESTS = 4
_DEFAULT_CONCURRENT_TOOL_TIMEOUT_S = 420.0
# Long enough for an approval round-trip, short enough that one wedged dispatch can't starve the batch.
_START_ORDER_GATE_TIMEOUT_S = 120.0
-# Fallback only; the effective bound derives from approvals.timeout (_authorization_gate_lock_timeout).
+# Fallback only; the effective bound derives from the turn's approval window (_authorization_gate_lock_timeout).
_AUTHORIZATION_GATE_LOCK_TIMEOUT_S = 360.0
def _authorization_gate_lock_timeout() -> float:
- """Authorization-lock bound = ``tools.approval_human_wait.human_wait_ceiling`` (approval timeout +
- margin, capped so it can't overflow Lock.acquire): never break serialization while a
- prompt is answerable, never let a wedged holder park workers forever. Deliberately NOT
+ """Authorization-lock bound = ``tools.approval_human_wait.human_wait_ceiling`` (the turn's approval window +
+ margin — unbounded on CLI/TUI/Desktop — capped so it can't overflow Lock.acquire): never break serialization
+ while a prompt is answerable, never let a wedged holder park workers forever. Deliberately NOT
min()'d with the fallback so the gate never gives up early.
Delegates to ``tools.approval_human_wait.human_wait_ceiling`` — the same bound that clamps a human-wait window's