Fix Codex Remote thread writer conflicts
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
# Isolated live smoke of the Codex backend, driven entirely through agents.py.
|
||||
# It starts one uniquely-named tmux session, verifies Remote Control and the Codex TUI, then
|
||||
# removes only that session. The shared Remote Control daemon intentionally remains available.
|
||||
# It starts one uniquely-named tmux session, verifies Remote Control and a daemon-connected Codex
|
||||
# TUI, then removes only that session. The shared Remote Control daemon intentionally remains
|
||||
# available.
|
||||
set -uo pipefail
|
||||
|
||||
HERE="$(cd "$(dirname "$0")" && pwd)"
|
||||
@@ -54,6 +55,7 @@ watch = "none"
|
||||
[backend.codex]
|
||||
bin = "$CODEX_BIN"
|
||||
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"
|
||||
|
||||
+5
-2
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user