Explain 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.
Stack traces are long, and most of their frames belong to frameworks and libraries. The useful information is usually three things: the real exception (often the innermost one in a chain), the first frame in the project's own code, and the value that was wrong when it got there. Each runtime prints these differently.
Explain this error: Only if [CONTEXT] is given: Context:
- Identify the language or runtime from the trace format, and read the trace in that runtime's order:
- Python prints the most recent call last, so the failing line is at the bottom.
- Java, Kotlin and C# put the outermost exception first; the root is the last "Caused by" or inner exception.
- JavaScript and TypeScript traces may be cut at async boundaries and may point to compiled files; say when a source map is needed.
- Go panics list each goroutine; the panicking goroutine comes first. Rust panics need
RUST_BACKTRACE=1for a full trace.
- Find the root exception and its message. Say what it means in one plain sentence.
- Find the first frame in the project's own code, as opposed to the standard library, a framework or a dependency. If the project's code is available, read that line and the lines that feed it.
- Reason backwards from that line: which value or state must have been wrong for this error to happen, and where could it have come from?
- Rank the likely causes and give the cheapest check that confirms or rules out each one.
- Do not guess at code you have not seen. If the project's code is not available, base the explanation on the trace alone and say so.
- Quote frames exactly as they appear in the trace. Never invent file names, line numbers or function names.
- Ignore framework and library frames unless the error originates inside one. If it does, say whether the likely fault is still the caller's input.
- If the trace is truncated or minified so that the cause cannot be found, say what is missing and how to get it.
- Separate what you verified from what you inferred. Mark inferences as such.
- When you do not know, say "I don't know" once and state what would settle it.
- 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.
What happened
One or two plain sentences: the root exception and what it means.
Where
The frame that matters, quoted from the trace, and why that frame.
Likely causes
Numbered, most likely first. Each cause with the evidence for it.
Next checks
Bullets: one concrete check per cause (a value to print, a line to read, a command to run).
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
- Beginner
- made for
- Software engineer
- needs
- repo-read
- risk
- read-only
- version
- v1.0.0 · incubating
- reviewed
- 2026-10-02
- works in
- Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Antigravity, OpenCode, Windsurf, Zed, Continue, AGENTS.md
use in
npx @hermes-hq/hodios install explain-stack-trace --target claude-codenpx skills add hermes-hq/hodios-dist --skill explain-stack-trace -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 DebuggingDebugger
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.
debuggerFind the root cause of a bug
Reproduces a bug, tests ranked hypotheses with experiments, and fixes the root cause instead of the symptom. Use when something is broken and the reason is not obvious.
find-root-causeDebug 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.
debug-network-requestDebug 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-regressionBugfix track
Takes a bug from report to reproduction, root cause, regression test, minimal fix and a verified pull request, stopping for approval between steps. Use for any bug worth fixing properly.
bugfix-track