diff --git a/codeagent-wrapper/executor.go b/codeagent-wrapper/executor.go index 66acde1..653942a 100644 --- a/codeagent-wrapper/executor.go +++ b/codeagent-wrapper/executor.go @@ -983,6 +983,9 @@ func runCodexTaskWithContext(parentCtx context.Context, taskSpec TaskSpec, backe if cfg.Backend == "gemini" { stderrFilter = newFilteringWriter(os.Stderr, geminiNoisePatterns) stderrOut = stderrFilter + } else if cfg.Backend == "codex" { + stderrFilter = newFilteringWriter(os.Stderr, codexNoisePatterns) + stderrOut = stderrFilter } stderrWriters = append([]io.Writer{stderrOut}, stderrWriters...) } diff --git a/codeagent-wrapper/filter.go b/codeagent-wrapper/filter.go index ab5c522..f75d388 100644 --- a/codeagent-wrapper/filter.go +++ b/codeagent-wrapper/filter.go @@ -18,6 +18,11 @@ var geminiNoisePatterns = []string{ "YOLO mode is enabled", } +// codexNoisePatterns contains stderr patterns to filter for codex backend +var codexNoisePatterns = []string{ + "ERROR codex_core::codex: needs_follow_up:", +} + // filteringWriter wraps an io.Writer and filters out lines matching patterns type filteringWriter struct { w io.Writer