fix: resolve codex shim for harness runner

This commit is contained in:
김경종
2026-06-12 17:33:23 +09:00
parent 2bab84beb6
commit 3ce43c8670
2 changed files with 27 additions and 3 deletions
+11 -1
View File
@@ -12,6 +12,7 @@ import fnmatch
import json
import os
import re
import shutil
import subprocess
import sys
import threading
@@ -373,7 +374,7 @@ class StepExecutor:
prompt = preamble + step_file.read_text(encoding="utf-8")
result = subprocess.run(
["codex", "exec", "--dangerously-bypass-approvals-and-sandbox", "--json", "-"],
[self._codex_command(), "exec", "--dangerously-bypass-approvals-and-sandbox", "--json", "-"],
cwd=self._root, capture_output=True, text=True, input=prompt, timeout=1800,
)
@@ -395,6 +396,15 @@ class StepExecutor:
# --- 헤더 & 검증 ---
@staticmethod
def _codex_command() -> str:
return (
shutil.which("codex.cmd")
or shutil.which("codex.exe")
or shutil.which("codex")
or "codex"
)
def _print_header(self):
print(f"\n{'='*60}")
print(f" Harness Step Executor")