Debug a failing network request
Diagnoses a failing HTTP request layer by layer (DNS, TLS, proxy, CORS, auth, timeouts, payload) from error output and curl or browser traces, giving the next command at each step.
A failing request can break at any layer between the client and the handler: name resolution, the TCP connection, TLS, a proxy or corporate gateway, the browser's CORS and mixed-content rules, authentication, timeouts at any hop, or the server rejecting the payload. Error messages from clients often hide which layer failed ("Network Error", "Failed to fetch", "socket hang up"), and people fix the wrong layer: adding CORS headers to a request that actually failed on TLS, or retrying a 401. Walking the layers in order, with one command that proves or rules out each, finds the cause quickly.
Diagnose this failing requestOnly if [CLIENT] is given: made with :
Only if [REQUEST_DETAILS] is given:
Request details:
- Read the error precisely and decide which layer it points to: an HTTP status means the server (or a proxy in front of it) answered, so connection, DNS and TLS worked; a browser CORS message means the request may have succeeded server-side and the browser blocked the response; connection refused, reset or timed out, certificate and name-resolution errors point lower. Say what the error rules out as well as what it suggests.
- Walk the layers from the one most likely at fault, and for each give one command or check, what output to expect if the layer is fine, and what output means it is the problem:
- DNS:
digornslookupfrom the same machine or container, split-horizon DNS,/etc/hosts, stale caches. - Connection:
curl -vornc -vz host port; firewalls, security groups, network policies, wrong port, IPv6 versus IPv4. - TLS:
openssl s_client -connect host:443 -servername host; expired or incomplete certificate chain, SNI, hostname mismatch, client trust store (corporate proxies that re-sign traffic, runtimes with their own CA bundle). - Proxies and gateways:
HTTP_PROXY,HTTPS_PROXYandNO_PROXY, API gateways, header and body size limits, redirects that change the method or drop headers. - Browser rules: the preflight
OPTIONSrequest and itsAccess-Control-Allow-*response headers, credentials with a wildcard origin, mixed content, cookies'SameSiteandSecureattributes. CORS is fixed on the server, never in the client. - Authentication: missing or expired token, wrong audience or scope, clock skew, header stripped by a redirect or proxy, 401 versus 403 meaning.
- Timeouts: which hop timed out (client, load balancer idle timeout, gateway, upstream), and the configured values at each.
- Payload: content type versus body format, encoding, size, schema validation errors in a 400 or 422 body.
- Reproduce outside the client with
curlwhen possible, copying the browser request ("Copy as cURL") or translating the client's request, so client-library behaviour is separated from the server's. Say what differences between the two would be meaningful. - When the cause is found, give the fix at the right layer and how to confirm it.
Ask for the specific output of the next command when you need it, one or two commands at a time, rather than requesting everything up front. If the error suggests several layers equally, start with the cheapest check.
- Never recommend disabling TLS verification, setting a wildcard CORS origin with credentials, or turning off browser security as a fix. If used to narrow down a cause locally, label it a temporary diagnostic and never for production.
- Tell the user to remove tokens, cookies and API keys from anything they paste; use placeholders in commands.
- Give commands for the platform where the request runs (inside the container or pod if that is where it fails).
- Lead with the answer. Add reasoning only where it changes what the reader will do.
- No preamble, no restating the request and no closing summary on a short answer.
Most likely layer
One sentence with the reason.
What the error tells us
Two or three bullets: what it rules in and what it rules out.
Next commands
Numbered. Each: the command in a code block, the healthy output, and the output that confirms the problem.
Fix
Only once the cause is clear: the change, at which layer, and how to confirm it. Otherwise "Pending the output above."
If that was not it
The next layer to check and why.
1 required value still a placeholder; the assistant will ask for it.
details
- kind
- Prompt: a task you run by name to get one finished thing back
- domain
- Software engineering
- category
- Debugging
- level
- Intermediate
- made for
- Software engineer, Frontend engineer, Backend engineer, DevOps / platform engineer
- risk
- read-only
- version
- v1.0.0 · experimental
- reviewed
- 2026-10-02
- works in
- Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Antigravity, OpenCode, Windsurf, Zed, Continue, AGENTS.md, ChatGPT, claude.ai
use in
npx @hermes-hq/hodios install debug-network-request --target claude-codenpx skills add hermes-hq/hodios-dist --skill debug-network-request -a claude-codeclaude plugin marketplace add hermes-hq/hodios-distclaude plugin install hodios-software-engineering@hodiosThe plugin brings every entry in this domain at once.
pairs well with
All of DebuggingExplain a stack trace
Explains an error and its stack trace in plain words, finds the frame that matters, and ranks the likely causes with the next checks to run. Use when an exception or crash is hard to read.
explain-stack-traceIntegrate a third-party API
Implements a typed client for a third-party HTTP API from its docs, with auth, pagination, retries, rate limits and a test fake. Use when wiring an external service into your code.
integrate-third-party-apiHarden web app headers and cookies
Produces hardened HTTP security headers, a Content Security Policy, CORS and cookie settings for a web app, rolled out first in report-only mode. Use before launch or after a security scan.
harden-web-app-configDebugger
Debugs by reproducing first, testing one hypothesis at a time and fixing root causes, never symptoms. Use as a persona or subagent for bugs, crashes and failing builds.
debuggerDebug a production-only bug
Debugs a bug that happens only in production by diffing environment, config, data, traffic, versions and timing, then plans safe instrumentation to confirm the cause. Use for works-on-my-machine bugs.
debug-production-only-bugBisect a regression
Finds the commit or input that introduced a regression by writing an automated good/bad check first, then bisecting. Use when something that used to work is broken and the cause is unclear.
bisect-regression