Skip to content

The agent that grows with you

test: route codex summary mocks through _interruptible_api_call; strip trailing whitespace (codex-watchdogs)

kshitijk4poord6d77986f2dd
diff --git a/tests/agent/test_responses_watchdog_accommodations.py b/tests/agent/test_responses_watchdog_accommodations.py
index 08862712bf7..e905c105480 100644
--- a/tests/agent/test_responses_watchdog_accommodations.py
+++ b/tests/agent/test_responses_watchdog_accommodations.py
@@ -41,7 +41,7 @@ def _make_mock_agent(provider="xai-oauth", api_mode="codex_responses", base_url=
def test_xai_responses_receives_stale_timeout_floor_in_api_call(monkeypatch):
"""interruptible_api_call elevates stale timeout to context floor (>=900s) for xai-oauth codex_responses.
-
+
When baseline _compute_non_stream_stale_timeout is 0.2s and TTFB watchdog is disabled (0),
a 0.5s execution would fail with stale_call_kill on base (stale timeout at 0.2s), but passes when the floor elevates it to >=900s.
"""
diff --git a/tests/agent/test_run_agent.py b/tests/agent/test_run_agent.py
index 46db617e96b..24da9df2efd 100644
--- a/tests/agent/test_run_agent.py
+++ b/tests/agent/test_run_agent.py
@@ -2832,7 +2832,7 @@ class TestHandleMaxIterations:
],
)
- with patch.object(agent, "_run_codex_stream", side_effect=fake_run_codex_stream):
+ with patch.object(agent, "_interruptible_api_call", side_effect=fake_run_codex_stream):
result = agent._handle_max_iterations([{"role": "user", "content": "do stuff"}], 90)
assert result == "Summary"