Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/ouroboros/orchestrator/codex_cli_runtime.py
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,7 @@ def _build_command(
prompt: str | None = None,
) -> list[str]:
"""Build the CLI command args. Prompt is fed via stdin separately."""
command = [self._cli_path, "exec"]
command = [self._cli_path, "exec", "--ignore-user-config"]

command.extend(
[
Expand Down
1 change: 1 addition & 0 deletions src/ouroboros/providers/codex_cli_adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,7 @@ def _build_command(
command = [
self._cli_path,
"exec",
"--ignore-user-config",
"--json",
"--skip-git-repo-check",
"-C",
Expand Down
16 changes: 8 additions & 8 deletions tests/unit/orchestrator/test_codex_cli_runtime.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,13 +209,15 @@ def test_build_command_for_new_session(self) -> None:
output_last_message_path="/tmp/out.txt",
)

assert command[:2] == ["/usr/local/bin/codex", "exec"]
assert Path(command[0]) == Path("/usr/local/bin/codex")
assert command[1] == "exec"
assert "--ignore-user-config" in command
assert "--json" in command
assert "--full-auto" in command
assert "--model" in command
assert "o3" in command
assert "-C" in command
assert "/tmp/project" in command
assert Path(command[command.index("-C") + 1]) == Path("/tmp/project")

def test_build_command_for_resume(self) -> None:
"""Builds an exec resume command when a session id is provided."""
Expand All @@ -233,7 +235,7 @@ def test_build_command_for_resume(self) -> None:
assert command.index("--skip-git-repo-check") < resume_index
assert command.index("--output-last-message") < resume_index
assert command.index("-C") < resume_index
assert command[command.index("-C") + 1] == "/tmp/project"
assert Path(command[command.index("-C") + 1]) == Path("/tmp/project")

def test_resolve_cli_path_falls_back_from_wrapper(self, tmp_path: Path) -> None:
"""Runtime should bypass wrappers the same way provider adapters do."""
Expand Down Expand Up @@ -452,7 +454,7 @@ async def test_execute_task_routes_ooo_input_through_shared_stateless_router(
request = mock_resolve.call_args.args[1]
assert isinstance(request, ResolveRequest)
assert request.prompt == "ooo run seed.yaml"
assert request.cwd == "/tmp/project"
assert Path(request.cwd) == Path("/tmp/project")
assert request.skills_dir == tmp_path
dispatcher.assert_awaited_once()
intercept_request = dispatcher.await_args.args[0]
Expand Down Expand Up @@ -1120,10 +1122,8 @@ async def test_execute_task_dispatches_interview_with_initial_context(
intercept_request = dispatcher.await_args.args[0]
assert intercept_request.mcp_tool == "ouroboros_interview"
assert intercept_request.first_argument == "Build a REST API"
assert intercept_request.mcp_args == {
"initial_context": "Build a REST API",
"cwd": "/tmp/project",
}
assert intercept_request.mcp_args["initial_context"] == "Build a REST API"
assert Path(intercept_request.mcp_args["cwd"]) == Path("/tmp/project")
mock_exec.assert_not_called()
assert [message.content for message in messages] == [
"Starting interview",
Expand Down
3 changes: 2 additions & 1 deletion tests/unit/providers/test_codex_cli_adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ def test_build_command_uses_read_only_by_default(self) -> None:
model=None,
)

assert "--ignore-user-config" in command
assert "--sandbox" in command
assert "read-only" in command

Expand Down Expand Up @@ -244,7 +245,7 @@ async def fake_create_subprocess_exec(*command: str, **kwargs: Any) -> _FakeProc
output_index = command.index("--output-last-message") + 1
Path(command[output_index]).write_text("Final answer", encoding="utf-8")
assert "--model" not in command
assert kwargs["cwd"] == "/tmp/project"
assert Path(kwargs["cwd"]) == Path("/tmp/project")
# Prompt is now fed via stdin, not as a positional argument
assert kwargs.get("stdin") is not None
return _FakeProcess(
Expand Down
Loading