Skip to content

[plan] Wrap org_runner.go and mcp_list_tools.go raw stderr output with console helpers #43576

Description

@github-actions

Objective

Replace raw fmt.Fprintf(os.Stderr, ...) calls in pkg/cli/org_runner.go and pkg/cli/mcp_list_tools.go with proper console.FormatInfoMessageStderr / console.FormatListItemStderr wrappers.

Context

Identified in Terminal Stylist analysis: discussion #43520. These files output user-facing status messages directly to stderr, bypassing the console formatting layer. Wrapping them gives users the consistent i / prefix, color, and TTY guards the rest of the codebase already uses.

Implementation Plan

Files to Modify

  • pkg/cli/org_runner.go lines 87–103: Replace fmt.Fprintf(os.Stderr, " - ...") bullet lines with console.FormatListItemStderr(...)
  • pkg/cli/mcp_list_tools.go lines 77–136: Replace raw info strings to stderr with console.FormatInfoMessageStderr(...)

Approach

  1. Identify all raw fmt.Fprintf(os.Stderr, ...) user-facing message callsites in each file (skip blank-line spacers).
  2. Replace bullet/list item lines with console.FormatListItemStderr.
  3. Replace informational status lines with console.FormatInfoMessageStderr.
  4. Run make build (or go build ./...) and existing tests.

Notes

  • Blank-line spacers (fmt.Fprintln(os.Stderr, "")) are acceptable — leave as-is.
  • Do NOT change pkg/cli/logs_format_compact.go — its [tag] value format is intentional machine output.

Acceptance Criteria

  • org_runner.go bullet lines use console.FormatListItemStderr
  • mcp_list_tools.go info lines use console.FormatInfoMessageStderr
  • No raw user-facing fmt.Fprintf(os.Stderr, ...) messages remain in those two files
  • Build passes and existing tests pass

Generated by 📋 Plan Command · 25.5 AIC · ⌖ 8.2 AIC · ⊞ 4.9K ·
Comment /plan to run again

  • expires on Jul 7, 2026, 7:23 AM UTC-08:00

Metadata

Metadata

Labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions