Fix Codex Remote thread writer conflicts

This commit is contained in:
2026-08-23 02:39:00 +00:00
parent 927c90de43
commit a7d61d812e
5 changed files with 23 additions and 8 deletions
+5 -2
View File
@@ -77,6 +77,7 @@ limit_re = "usage limit|limit reached"
[backend.codex]
bin = "codex"
preamble = "{bin} remote-control start --json >/dev/null"
remote_addr = "unix://"
flags = "--dangerously-bypass-approvals-and-sandbox --dangerously-bypass-hook-trust --no-alt-screen"
supports_resume = false
prompt_delivery = "arg"
@@ -260,7 +261,7 @@ class TestExampleConfig(unittest.TestCase):
self.assertIn(be, cfg["backends"], f"backend {be} missing from example")
self.assertEqual(len(agents.phases(cfg)), 2)
def test_codex_launch_prepares_remote_control_then_starts_tui(self):
def test_codex_launch_prepares_remote_control_then_connects_tui_to_daemon(self):
tmp = tempfile.mkdtemp(prefix="aotest-ut-codex-")
old_alive, old_new, old_log = agents.session_alive, agents.new_session, agents.log
old_capture, old_run = agents.capture_pane, agents._run
@@ -277,7 +278,9 @@ class TestExampleConfig(unittest.TestCase):
self.assertEqual(len(launched), 1)
cmd = launched[0]
self.assertTrue(cmd.startswith(
"codex remote-control start --json >/dev/null && codex "))
"codex remote-control start --json >/dev/null && "
"codex --remote 'unix://' --model 'gpt-test' "))
self.assertEqual(cmd.count("--remote 'unix://'"), 1)
self.assertIn("--model 'gpt-test'", cmd)
self.assertIn(
"--dangerously-bypass-approvals-and-sandbox --dangerously-bypass-hook-trust --no-alt-screen",