Motivation
Callers using --format=json can parse successful results, but failures such as approval-required, hook failure, and Git failure still require compatibility matching against human-readable stderr.
Request
For JSON-mode commands, return a stable structured error envelope or another documented machine-readable error channel with codes for at least:
- approval required;
- hook failure;
- Git failure;
- invalid input or unsupported operation.
Human diagnostics can remain on stderr, but callers should not need regexes to classify failures.
Motivation
Callers using
--format=jsoncan parse successful results, but failures such as approval-required, hook failure, and Git failure still require compatibility matching against human-readable stderr.Request
For JSON-mode commands, return a stable structured error envelope or another documented machine-readable error channel with codes for at least:
Human diagnostics can remain on stderr, but callers should not need regexes to classify failures.