37affa7ae7
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 5s
CI / Template validation (static) (pull_request) Successful in 6s
CI / Template validation (static) (push) Successful in 7s
CI / Adapter unit tests (pull_request) Failing after 8s
CI / Adapter unit tests (push) Failing after 9s
verify-providers-projection / Regenerate projection, fail on drift, assert registry ⊆ template (pull_request) Successful in 15s
CI / T4 tier-4 conformance (live) (push) Successful in 1m42s
CI / T4 tier-4 conformance (live) (pull_request) Successful in 1m44s
CI / Template validation (runtime) (push) Successful in 2m14s
CI / Template validation (runtime) (pull_request) Successful in 2m16s
CI / validate (pull_request) Successful in 1s
CI / validate (push) Successful in 1s
When the `claude` CLI errors mid-stream, claude-agent-sdk throws a bare
`Exception("Command failed with exit code 1 …")` whose only text is the
useless `Check stderr output for details` placeholder — but the *actual*
failure reason (model 404, rate limit, auth) arrived a moment earlier as a
stream-json `ResultMessage(is_error=True)` carrying `result` text and
`api_error_status`. That was thrown away.
`_run_query` now captures `ResultMessage(is_error=True)` detail (and, as a
fallback, the trailing `AssistantMessage` text) and re-attaches it to the
raised exception as `_molecule_stream_detail`. `_format_process_error`
surfaces it as `cli_stream_error=…`; when present, skips the
`_probe_claude_cli_error` re-probe (#160) — the probe can't replay the
failing `--model` / `--system-prompt` argv so it may succeed and mislead.
The probe stays as last resort when nothing was salvaged.
(Branch rebased onto current main; main now carries an equivalent
ResultMessage → _ResultError path, so this commit adds the regression-test
suite and aligns the stub list with current executor_helpers imports.)
Tests: tests/test_executor_error_detail.py — 6 cases. Stub pattern mirrors
test_runtime_wedge_mirror.py.
Refs internal#226 follow-up #5.