diff --git a/tests/adapters/test_codex_adapter.py b/tests/adapters/test_codex_adapter.py index 231bf773f..32cb1bcfe 100644 --- a/tests/adapters/test_codex_adapter.py +++ b/tests/adapters/test_codex_adapter.py @@ -888,6 +888,9 @@ def test_codex_logs_into_mcp_server_before_first_turn( mock_codex.mcp_auth_statuses["remote"] = adapter.McpAuthStatus.not_logged_in open_browser = AsyncMock(return_value=True) monkeypatch.setattr(adapter, "_open_authorization_url", open_browser) + # Give the login an exact remaining budget, so the rounding check does not + # depend on how long the runner takes before the adapter reads the clock. + monkeypatch.setattr(adapter, "_remaining_timeout", lambda _: invocation_timeout) output = invoke_once(codex_payload)