From 05db53e8f516567711c980ef035e45803109a199 Mon Sep 17 00:00:00 2001 From: Mengye Ren Date: Sat, 29 Aug 2026 09:40:14 -0400 Subject: [PATCH 1/2] Codex web search uses the exec-compatible config override MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #189 passed --search, which only the interactive codex command accepts: codex exec rejected it and every new fleet attempt aborted at session start. The exec form is -c tools.web_search=true, verified live on the deployed 0.130.0 — the probe session made real web_search calls. Co-Authored-By: Claude Fable 5 --- src/autoresearch/role_runner.py | 8 ++++++-- tests/test_attempt.py | 7 ++++++- tests/test_role_runner.py | 5 ++++- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/src/autoresearch/role_runner.py b/src/autoresearch/role_runner.py index 32d37a0c..e0a0b007 100644 --- a/src/autoresearch/role_runner.py +++ b/src/autoresearch/role_runner.py @@ -115,8 +115,12 @@ def build_harness( the ephemeral boundary (CI). The tokenless split keeps credentials out of the session either way.""" if backend == "codex": - # the web: codex's native web_search tool, on when the spec grants it - web = ("--search",) if "WebSearch" in spec.tools else () + # the web: codex's native web_search tool, on when the spec grants it. + # `--search` exists only on the interactive command — `codex exec` + # rejects it (it aborted every fleet attempt on 2026-08-29); the + # config override is the exec-compatible form, verified live on the + # deployed 0.130.0 (the session makes real web_search calls). + web = ("-c", "tools.web_search=true") if "WebSearch" in spec.tools else () return CodexHarness( api_key=api_key, binary=binary or "codex", diff --git a/tests/test_attempt.py b/tests/test_attempt.py index abb6fa50..7df5302b 100644 --- a/tests/test_attempt.py +++ b/tests/test_attempt.py @@ -1529,7 +1529,12 @@ def test_editor_harness_codex_backend_is_contained() -> None: assert harness.model == "gpt-5.6-terra" assert harness.timeout_s == 300 # host codex config, then the web (the author spec grants WebSearch) - assert harness.extra_args == ("-c", "use_legacy_landlock=true", "--search") + assert harness.extra_args == ( + "-c", + "use_legacy_landlock=true", + "-c", + "tools.web_search=true", + ) assert harness.supports_resume is True # codex exec resume, validated on 0.130.0 with pytest.raises(ValueError, match="unknown backend"): build_harness("sk-o", spec, backend="bogus", container_image="img.sif") diff --git a/tests/test_role_runner.py b/tests/test_role_runner.py index 35ec7d1a..3546cae1 100644 --- a/tests/test_role_runner.py +++ b/tests/test_role_runner.py @@ -201,7 +201,10 @@ def test_build_harness_codex_is_uniform_for_all_roles() -> None: assert isinstance(judge, CodexHarness) and isinstance(editor, CodexHarness) assert judge.sandbox == editor.sandbox == "danger-full-access" assert judge.container_image == "" and editor.container_image == "img.sif" - assert "--search" in judge.extra_args and "--search" in editor.extra_args # the web + # the web: the exec-compatible config override, never `--search` (which + # `codex exec` rejects — it killed every fleet attempt on 2026-08-29) + for h in (judge, editor): + assert "tools.web_search=true" in h.extra_args and "--search" not in h.extra_args def test_build_harness_hermes_toolsets_follow_the_spec(tmp_path: Path) -> None: From 669c742ecaad5ec8bdb3cccf25cec6af56b10c72 Mon Sep 17 00:00:00 2001 From: Mengye Ren Date: Sat, 29 Aug 2026 09:44:09 -0400 Subject: [PATCH 2/2] Shorter comment (review) Co-Authored-By: Claude Fable 5 --- src/autoresearch/role_runner.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/autoresearch/role_runner.py b/src/autoresearch/role_runner.py index e0a0b007..e6748310 100644 --- a/src/autoresearch/role_runner.py +++ b/src/autoresearch/role_runner.py @@ -115,11 +115,8 @@ def build_harness( the ephemeral boundary (CI). The tokenless split keeps credentials out of the session either way.""" if backend == "codex": - # the web: codex's native web_search tool, on when the spec grants it. - # `--search` exists only on the interactive command — `codex exec` - # rejects it (it aborted every fleet attempt on 2026-08-29); the - # config override is the exec-compatible form, verified live on the - # deployed 0.130.0 (the session makes real web_search calls). + # the web, when the spec grants it: the config override, because + # `codex exec` does not accept `--search` web = ("-c", "tools.web_search=true") if "WebSearch" in spec.tools else () return CodexHarness( api_key=api_key,