Skip to content

Commit 4dcb3ed

Browse files
committed
Remove --output-last-message flag; generalize error msg
Remove the deprecated --output-last-message option from CodexProvider CLI invocations and simplify error messages in WaitWithSpinner and WaitWithPanel from "Claude failed" to the more generic "agent failed" for compatibility and clearer messaging. Changes in internal/agent/codex.go and internal/prd/generator.go.
1 parent 95d9e86 commit 4dcb3ed

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

internal/agent/codex.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ func (p *CodexProvider) ConvertCommand(workDir, prompt string) (*exec.Cmd, loop.
5353
}
5454
outPath := f.Name()
5555
f.Close()
56-
cmd := exec.Command(p.cliPath, "exec", "--sandbox", "read-only", "--output-last-message", "-o", outPath, "-")
56+
cmd := exec.Command(p.cliPath, "exec", "--sandbox", "read-only", "-o", outPath, "-")
5757
cmd.Dir = workDir
5858
cmd.Stdin = strings.NewReader(prompt)
5959
return cmd, loop.OutputFromFile, outPath, nil
@@ -67,7 +67,7 @@ func (p *CodexProvider) FixJSONCommand(prompt string) (*exec.Cmd, loop.OutputMod
6767
}
6868
outPath := f.Name()
6969
f.Close()
70-
cmd := exec.Command(p.cliPath, "exec", "--sandbox", "read-only", "--output-last-message", "-o", outPath, "-")
70+
cmd := exec.Command(p.cliPath, "exec", "--sandbox", "read-only", "-o", outPath, "-")
7171
cmd.Stdin = strings.NewReader(prompt)
7272
return cmd, loop.OutputFromFile, outPath, nil
7373
}

internal/prd/generator.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,7 @@ func WaitWithSpinner(cmd *exec.Cmd, title, message string, stderr *bytes.Buffer)
451451
case err := <-done:
452452
clearPanelLines(prevLines)
453453
if err != nil {
454-
return fmt.Errorf("Claude failed: %s", stderr.String())
454+
return fmt.Errorf("agent failed: %s", stderr.String())
455455
}
456456
return nil
457457
case <-ticker.C:
@@ -491,7 +491,7 @@ func WaitWithPanel(cmd *exec.Cmd, title, activity string, stderr *bytes.Buffer)
491491
case err := <-done:
492492
clearPanelLines(prevLines)
493493
if err != nil {
494-
return fmt.Errorf("Claude failed: %s", stderr.String())
494+
return fmt.Errorf("agent failed: %s", stderr.String())
495495
}
496496
return nil
497497
case <-ticker.C:

0 commit comments

Comments
 (0)