Skip to content
Merged
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
3 changes: 3 additions & 0 deletions codex/wrapper/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,9 @@ func cmdBuild(args []string) {
// Build codex command
cmd := []string{"codex", "exec"}

// JSON output for machine parsing (suppresses prompt echo)
cmd = append(cmd, "--json")

if ba.Task != "" {
cmd = append(cmd, ba.Task)
}
Expand Down
6 changes: 3 additions & 3 deletions codex/wrapper/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,9 @@ func TestCmdBuild_WithTaskAndModel(t *testing.T) {

cmd := result["cmd"].([]interface{})

// Task is positional after "codex exec"
if len(cmd) < 3 || cmd[2] != "fix the bug" {
t.Errorf("cmd[2] = %v, want %q", cmd[2], "fix the bug")
// Task is positional after "codex exec --json"
if len(cmd) < 4 || cmd[3] != "fix the bug" {
t.Errorf("cmd[3] = %v, want %q", cmd[3], "fix the bug")
}
assertSequence(t, cmd, "-m", "gpt-5.2-codex")
}
Expand Down
Loading