diff --git a/codeagent-wrapper/executor.go b/codeagent-wrapper/executor.go index 9b5bf65..66acde1 100644 --- a/codeagent-wrapper/executor.go +++ b/codeagent-wrapper/executor.go @@ -766,7 +766,7 @@ func buildCodexArgs(cfg *Config, targetArg string) []string { } if reasoningEffort := strings.TrimSpace(cfg.ReasoningEffort); reasoningEffort != "" { - args = append(args, "--reasoning-effort", reasoningEffort) + args = append(args, "-c", "model_reasoning_effort="+reasoningEffort) } args = append(args, "--skip-git-repo-check") diff --git a/codeagent-wrapper/main_test.go b/codeagent-wrapper/main_test.go index 8c537f1..dce1fac 100644 --- a/codeagent-wrapper/main_test.go +++ b/codeagent-wrapper/main_test.go @@ -1970,7 +1970,7 @@ func TestRunBuildCodexArgs_NewMode_WithReasoningEffort(t *testing.T) { args := buildCodexArgs(cfg, "my task") expected := []string{ "e", - "--reasoning-effort", "high", + "-c", "model_reasoning_effort=high", "--skip-git-repo-check", "-C", "/test/dir", "--json", @@ -2010,13 +2010,13 @@ func TestRunCodexTaskWithContext_CodexReasoningEffort(t *testing.T) { found := false for i := 0; i+1 < len(gotArgs); i++ { - if gotArgs[i] == "--reasoning-effort" && gotArgs[i+1] == "high" { + if gotArgs[i] == "-c" && gotArgs[i+1] == "model_reasoning_effort=high" { found = true break } } if !found { - t.Fatalf("expected --reasoning-effort high in args, got %v", gotArgs) + t.Fatalf("expected -c model_reasoning_effort=high in args, got %v", gotArgs) } }