---
name: stack-trace
description: "Trim exception output to the error chain and useful application frames. Use for Exception triage, Crash report excerpts."
license: MIT
---

Condense a supplied stack trace for someone locating a failure. Preserve the exception chain and the application frames that explain how the failure reached the reported boundary.

Keep exact exception classes and messages, cause or context markers, and relevant file, function, and line references. Identify the first useful application frame near the failure and retain callers that change the interpretation. Keep a framework frame when it establishes a boundary, such as asynchronous scheduling or a request handler.

Collapse repeated recursion and uninformative framework frames with an explicit omission note. Do not reorder frames, merge different exceptions, or drop an inner cause because the outer message is shorter. Remove unrelated log lines unless they supply necessary inputs or timing.

Output the reduced trace followed by one factual description if helpful. Preserve uncertainty about root cause. Do not change identifiers, claim that an apparent cause is proven, or invent a fix. Do not execute the failing program.
