Problem
When an upstream call fails, codedb_remote collapses the failure to a single opaque line:
error: codedb.codegraff.com returned error for justrach/merjs/outline
No HTTP status, no response body, no distinction between 404 (repo not indexed) and 5xx (server bug). The agent has nothing to act on. Today `stderr` is partially included, but `curl -sf` swallows the response body on non-2xx, so the body is empty.
Proposal
Drop `-sf` in favor of explicit status capture:
curl -s -o body.txt -w '%{http_code}' --max-time 30 ...
Then format errors as:
error: codedb.codegraff.com 502 for justrach/merjs/outline — <first 200 chars of body>
This is in `handleRemote` in `src/mcp.zig` — both the codegraff and wiki branches have the same pattern.
Why
Empty error strings are unactionable. The agent retries blindly or escalates needlessly. Surfacing the status code alone fixes 80% of debugging friction.
Problem
When an upstream call fails,
codedb_remotecollapses the failure to a single opaque line:No HTTP status, no response body, no distinction between 404 (repo not indexed) and 5xx (server bug). The agent has nothing to act on. Today `stderr` is partially included, but `curl -sf` swallows the response body on non-2xx, so the body is empty.
Proposal
Drop `-sf` in favor of explicit status capture:
Then format errors as:
This is in `handleRemote` in `src/mcp.zig` — both the codegraff and wiki branches have the same pattern.
Why
Empty error strings are unactionable. The agent retries blindly or escalates needlessly. Surfacing the status code alone fixes 80% of debugging friction.