Discovered during v0.4.2 post-merge stress testing. JSON mode is the primary surface for agents, but several local errors render worse in JSON than human mode:
local server remove <running> — human mode says stop it first with `clickhousectl local server stop dev` ; JSON mode suggests "command": "clickhousectl local server list" (crates/clickhousectl/src/local/output.rs:198-202). Hint should point at stop <name>.
- Unmapped local errors collapse to a bare
{"code":"local_error","message":"Local command failed"} with no detail. E.g. local server start x --config does-not-exist: human shows config 'does-not-exist' not found ... (available: hereabouts-ai.xml); JSON loses all of it.
local remove <not-installed-version>: human says "Version X not found"; JSON maps it to version_unavailable / "try local list --remote" (src/local/output.rs:213-228), conflating not-installed with unresolvable download.
Expected
JSON errors should carry the same detail and accurate hints as human output.
Discovered during v0.4.2 post-merge stress testing. JSON mode is the primary surface for agents, but several local errors render worse in JSON than human mode:
local server remove <running>— human mode saysstop it first with `clickhousectl local server stop dev`; JSON mode suggests"command": "clickhousectl local server list"(crates/clickhousectl/src/local/output.rs:198-202). Hint should point atstop <name>.{"code":"local_error","message":"Local command failed"}with no detail. E.g.local server start x --config does-not-exist: human showsconfig 'does-not-exist' not found ... (available: hereabouts-ai.xml); JSON loses all of it.local remove <not-installed-version>: human says "Version X not found"; JSON maps it toversion_unavailable/ "trylocal list --remote" (src/local/output.rs:213-228), conflating not-installed with unresolvable download.Expected
JSON errors should carry the same detail and accurate hints as human output.