From b9546ba123beb9c5421973feabc15a8963e03cd9 Mon Sep 17 00:00:00 2001 From: nornen0202 Date: Wed, 8 Apr 2026 03:51:18 +0900 Subject: [PATCH] Allow mocked Codex preflight sessions --- tradingagents/llm_clients/codex_preflight.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tradingagents/llm_clients/codex_preflight.py b/tradingagents/llm_clients/codex_preflight.py index 04927db9..c191e9d4 100644 --- a/tradingagents/llm_clients/codex_preflight.py +++ b/tradingagents/llm_clients/codex_preflight.py @@ -27,6 +27,8 @@ def run_codex_preflight( session_factory: Callable[..., CodexAppServerSession] = CodexAppServerSession, ) -> CodexPreflightResult: binary = resolve_codex_binary(codex_binary) + if not binary and codex_binary and session_factory is not CodexAppServerSession: + binary = codex_binary if not binary: raise CodexAppServerBinaryError(codex_binary_error_message(codex_binary))