From 69f0acce0dc80297216c3e064d82c88bc568dbed Mon Sep 17 00:00:00 2001 From: Snider Date: Sun, 22 Mar 2026 15:00:49 +0000 Subject: [PATCH] fix(dispatch): model flag splice broke -o argument ordering When model variant was specified, the splice inserted --model between -o and its value, making Codex see -o with no file path. Fixed by appending --model and prompt sequentially instead of splicing into the middle of the args slice. Co-Authored-By: Virgil --- pkg/agentic/dispatch.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/agentic/dispatch.go b/pkg/agentic/dispatch.go index 7b4eebc..915e33f 100644 --- a/pkg/agentic/dispatch.go +++ b/pkg/agentic/dispatch.go @@ -78,11 +78,11 @@ func agentCommand(agent, prompt string) (string, []string, error) { "exec", "--full-auto", "-o", "../.meta/agent-codex.log", - prompt, } if model != "" { - args = append(args[:3], append([]string{"--model", model}, args[3:]...)...) + args = append(args, "--model", model) } + args = append(args, prompt) return "codex", args, nil case "claude": args := []string{