Project
cortex
Description
When --json is specified, the command still prints human-readable text and errors instead of JSON. This breaks scripting and JSON parsing in error cases.
Error Message
mDNS error: Failed to create mDNS daemon: failed to create signal_sock for daemon: Operation not permitted (os error 1)
Debug Logs
System Information
OS: Darwin 25.2.0 (arm64)
Cortex version: 0.1.1
Screenshots
No response
Steps to Reproduce
- Run
cortex servers --json; echo EXIT:$?.
- Observe the plain text banner and error output.
Expected Behavior
With --json, output should be valid JSON even on failure.
Actual Behavior
The command prints a plain text banner and error message, then exits with status 1.
Additional Context
The non-JSON banner appears before any error output, making JSON parsing impossible.
Repro output:
Discovering Cortex servers on local network...
Error: mDNS error: Failed to create mDNS daemon: failed to create signal_sock for daemon: Operation not permitted (os error 1)
EXIT:1
Project
cortex
Description
When
--jsonis specified, the command still prints human-readable text and errors instead of JSON. This breaks scripting and JSON parsing in error cases.Error Message
mDNS error: Failed to create mDNS daemon: failed to create signal_sock for daemon: Operation not permitted (os error 1)Debug Logs
System Information
Screenshots
No response
Steps to Reproduce
cortex servers --json; echo EXIT:$?.Expected Behavior
With
--json, output should be valid JSON even on failure.Actual Behavior
The command prints a plain text banner and error message, then exits with status 1.
Additional Context
The non-JSON banner appears before any error output, making JSON parsing impossible.
Repro output: