Skip to content

fix: suppress config deprecation stderr in JSON mode globally (#824)#3198

Merged
code-yeongyu merged 1 commit into
mainfrom
fix/json-mode-suppress-config-warnings
May 29, 2026
Merged

fix: suppress config deprecation stderr in JSON mode globally (#824)#3198
code-yeongyu merged 1 commit into
mainfrom
fix/json-mode-suppress-config-warnings

Conversation

@code-yeongyu
Copy link
Copy Markdown
Collaborator

Fixes ROADMAP #824.

Root cause: emit_config_warning_once() in runtime/src/config.rs always used eprintln! with no output-format awareness, leaking enabledPlugins is deprecated to stderr on every JSON-mode surface.

Fix: Add SUPPRESS_CONFIG_WARNINGS_STDERR: AtomicBool flag. Set it before any settings load when --output-format json detected in argv. All JSON-mode surfaces (status, sandbox, system-prompt, mcp list, skills list, agents list, --resume /config*) now exit with empty stderr. Text-mode unchanged.

Tests: 572 pass, 1 pre-existing failure unrelated.

Add SUPPRESS_CONFIG_WARNINGS_STDERR AtomicBool flag in runtime/config.rs
and expose suppress_config_warnings_for_json_mode() via runtime crate.

In main.rs, scan raw argv for --output-format json before parse_args
and activate the flag so no settings-load warnings reach stderr on any
JSON-mode surface (status, sandbox, system-prompt, mcp list, skills list,
agents list, --resume /config*, etc.).

Text-mode surfaces are unaffected; prose deprecation warnings continue
to appear on stderr.

All 572+ tests pass (one pre-existing worker_boot failure unrelated).
@code-yeongyu code-yeongyu merged commit de7edd5 into main May 29, 2026
6 checks passed
@code-yeongyu code-yeongyu deleted the fix/json-mode-suppress-config-warnings branch May 29, 2026 05:00
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 participant