Skip to content

Comments

fix: stderr noise#7346

Merged
michaelneale merged 3 commits intomainfrom
fix-7302-stderr-noise
Feb 19, 2026
Merged

fix: stderr noise#7346
michaelneale merged 3 commits intomainfrom
fix-7302-stderr-noise

Conversation

@michaelneale
Copy link
Collaborator

fixes: #7302

looks like potential regression

…7302)

The catch-all match arm in render_message() and render_message_streaming()
printed 'WARNING: Message content type could not be rendered' to stdout
via println!. This pollutes stdout when piping or scripting (e.g. with
--quiet --text), breaking CI pipelines that expect only model output on
stdout.

Changes:
- Replace println! with eprintln! so the warning goes to stderr, following
  the POSIX convention that stdout is for program output and stderr is for
  diagnostics/warnings.
- Replace the wildcard (_ =>) match arms with explicit matches for
  ToolConfirmationRequest and FrontendToolRequest. This ensures that if a
  new MessageContent variant is added in the future, the compiler will
  flag the missing match arm instead of silently falling through.

Note: The primary cause of #7302 (ReasoningContent not being handled,
causing a flood of warnings) was already fixed by commit f481484
(PR #7296). This commit addresses the secondary concern from the issue:
warnings should never be printed to stdout.
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes stderr/stdout pollution in goose CLI output by ensuring warning messages use stderr instead of stdout, and makes MessageContent pattern matching exhaustive to prevent future regressions.

Changes:

  • Changed warning messages from println! to eprintln! to use stderr
  • Replaced catch-all _ patterns with explicit patterns for ToolConfirmationRequest and FrontendToolRequest in both render_message and render_message_streaming functions

Copy link
Collaborator

@DOsinga DOsinga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, good. in general we shouldn't print warnings in the CLI, only errors. what's the user going to do with any of this?

@michaelneale michaelneale added this pull request to the merge queue Feb 19, 2026
Merged via the queue into main with commit 38684ed Feb 19, 2026
32 of 34 checks passed
@michaelneale michaelneale deleted the fix-7302-stderr-noise branch February 19, 2026 23:37
tlongwell-block added a commit that referenced this pull request Feb 20, 2026
* origin/main: (21 commits)
  feat(ui): show token counts directly for "free" providers (#7383)
  Update creator note (#7384)
  Remove display_name from local model API and use model ID everywhere (#7382)
  fix(summon): stop MOIM from telling models to sleep while waiting for tasks (#7377)
  Completely pointless ascii art (#7329)
  feat: add Neighborhood extension to the Extensions Library (#7328)
  feat: computer controller overhaul, adding peekaboo (#7342)
  Add blog post: Gastown Explained: How to Use Goosetown for Parallel Agentic Engineering (#7372)
  docs: type-to-search goose configure lists (#7371)
  docs: search conversation history (#7370)
  fix: stderr noise (#7346)
  chore(deps): bump hono from 4.11.9 to 4.12.0 in /ui/desktop (#7369)
  Include 3rd-party license copy for JavaScript/CSS minified files (#7352)
  docs for reasoning env var (#7367)
  docs: update skills detail page to reference Goose Summon extension (#7350)
  fix(apps): restore MCP app sampling support reverted by #6933 (#7366)
  feat: TUI client of goose-acp (#7362)
  docs: agent variable (#7365)
  docs: pass env vars to shell (#7361)
  docs: update sandbox topic (#7336)
  ...

# Conflicts:
#	Cargo.lock
tlongwell-block added a commit that referenced this pull request Feb 20, 2026
…extension

* origin/main: (79 commits)
  Post release checklist as a comment on release PRs (#7307)
  unique api key (#7391)
  fix: use correct colors for download progress bar (#7390)
  Add local model settings access from bottom bar model menu (#7378)
  Change Recipe Security Scanner API key (#7387)
  switch Ask AI Discord bot from openrouter to anthropic (#7386)
  feat(ui): show token counts directly for "free" providers (#7383)
  Update creator note (#7384)
  Remove display_name from local model API and use model ID everywhere (#7382)
  fix(summon): stop MOIM from telling models to sleep while waiting for tasks (#7377)
  Completely pointless ascii art (#7329)
  feat: add Neighborhood extension to the Extensions Library (#7328)
  feat: computer controller overhaul, adding peekaboo (#7342)
  Add blog post: Gastown Explained: How to Use Goosetown for Parallel Agentic Engineering (#7372)
  docs: type-to-search goose configure lists (#7371)
  docs: search conversation history (#7370)
  fix: stderr noise (#7346)
  chore(deps): bump hono from 4.11.9 to 4.12.0 in /ui/desktop (#7369)
  Include 3rd-party license copy for JavaScript/CSS minified files (#7352)
  docs for reasoning env var (#7367)
  ...
aharvard added a commit that referenced this pull request Feb 20, 2026
* origin/main: (28 commits)
  [docs] Add Excalidraw MCP App Tutorial (#7401)
  Post release checklist as a comment on release PRs (#7307)
  unique api key (#7391)
  fix: use correct colors for download progress bar (#7390)
  Add local model settings access from bottom bar model menu (#7378)
  Change Recipe Security Scanner API key (#7387)
  switch Ask AI Discord bot from openrouter to anthropic (#7386)
  feat(ui): show token counts directly for "free" providers (#7383)
  Update creator note (#7384)
  Remove display_name from local model API and use model ID everywhere (#7382)
  fix(summon): stop MOIM from telling models to sleep while waiting for tasks (#7377)
  Completely pointless ascii art (#7329)
  feat: add Neighborhood extension to the Extensions Library (#7328)
  feat: computer controller overhaul, adding peekaboo (#7342)
  Add blog post: Gastown Explained: How to Use Goosetown for Parallel Agentic Engineering (#7372)
  docs: type-to-search goose configure lists (#7371)
  docs: search conversation history (#7370)
  fix: stderr noise (#7346)
  chore(deps): bump hono from 4.11.9 to 4.12.0 in /ui/desktop (#7369)
  Include 3rd-party license copy for JavaScript/CSS minified files (#7352)
  ...

# Conflicts:
#	ui/desktop/src/components/bottom_menu/CostTracker.tsx
zanesq added a commit that referenced this pull request Feb 20, 2026
* origin/main: (215 commits)
  docs: voice dictation updates (#7396)
  [docs] Add Excalidraw MCP App Tutorial (#7401)
  Post release checklist as a comment on release PRs (#7307)
  unique api key (#7391)
  fix: use correct colors for download progress bar (#7390)
  Add local model settings access from bottom bar model menu (#7378)
  Change Recipe Security Scanner API key (#7387)
  switch Ask AI Discord bot from openrouter to anthropic (#7386)
  feat(ui): show token counts directly for "free" providers (#7383)
  Update creator note (#7384)
  Remove display_name from local model API and use model ID everywhere (#7382)
  fix(summon): stop MOIM from telling models to sleep while waiting for tasks (#7377)
  Completely pointless ascii art (#7329)
  feat: add Neighborhood extension to the Extensions Library (#7328)
  feat: computer controller overhaul, adding peekaboo (#7342)
  Add blog post: Gastown Explained: How to Use Goosetown for Parallel Agentic Engineering (#7372)
  docs: type-to-search goose configure lists (#7371)
  docs: search conversation history (#7370)
  fix: stderr noise (#7346)
  chore(deps): bump hono from 4.11.9 to 4.12.0 in /ui/desktop (#7369)
  ...

# Conflicts:
#	ui/desktop/package-lock.json
#	ui/desktop/package.json
#	ui/desktop/src/components/GooseSidebar/AppSidebar.tsx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1.25.0: WARNING: Message content type could not be rendered on stdout for reasoning content

2 participants