The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
fix: drop the redundant _request_is_current() from the first-event stamp guard
teknium168ef35deec9a
diff --git a/agent/codex_runtime.py b/agent/codex_runtime.pyindex c2d44ce8cac..2b1736359a1 100644--- a/agent/codex_runtime.py+++ b/agent/codex_runtime.py@@ -951,9 +951,9 @@ def run_codex_stream(agent, api_kwargs: dict, client: Any = None, on_first_deltadef _on_event(event: Any) -> None: # TTFB/activity touch — once per SSE event.now = time.time()# Lifecycle frames can precede text, so the first accepted parsed event is the Responses- # equivalent of Chat Completions' first chunk. Preserve the per-attempt reset and never let- # a retired worker overwrite the timestamp owned by a newer request.- if getattr(agent, "_last_api_first_chunk_at", None) is None and _request_is_current():+ # equivalent of Chat Completions' first chunk. Preserve the per-attempt reset; the ``_fenced``+ # wrapper around this callback already keeps a retired worker from overwriting a newer request.+ if getattr(agent, "_last_api_first_chunk_at", None) is None:agent._last_api_first_chunk_at = nowhas_progress = _codex_event_has_content(event)if watchdog_state is not None: