See what your agent sees
One production error, start to finish: how it looks in Runheed, the MCP calls Claude Code makes to read it, and the fix it ships. The shop, the code and the numbers are made up. The tool names and responses are exactly what the Runheed MCP server returns.
Ready to try it on your own errors? See plans and pricing or read the setup docs.
The error in your dashboard
A coupon empties the cart and checkout crashes. The SDK reported it 318 times; Runheed grouped them into one issue.
TypeError
[UNRESOLVED]Cannot read properties of undefined (reading 'total')
Stack Trace
1. calculateTotals in src/routes/checkout.ts:42:412. handleCheckout in src/routes/checkout.ts:18:203. Layer.handle [as handle_request] in node_modules/express/lib/router/layer.js:95:54. next in node_modules/express/lib/router/route.js:149:13
Agent Context
The agent that last edited this code, set with runheed.setAgent()
Environment
Breadcrumbs
Extra Data
The request, recorded by the Express error handler. Secret headers are redacted before they leave your app.
{
"request": {
"method": "POST",
"url": "/api/checkout?coupon=FREESHIP",
"headers": {
"host": "api.shop.example",
"content-type": "application/json",
"authorization": "[REDACTED]",
"cookie": "[REDACTED]"
},
"query": {
"coupon": "FREESHIP"
}
}
}What your agent reads over MCP
Your agent connects to /api/mcp and calls these tools. Each response is plain text written for a model: the error, where it happened, and what led up to it. All nine tools.
runheed_search_errors({"status":"unresolved","limit":5})Found 3 errors: [UNRESOLVED] [TypeError] Cannot read properties of undefined (reading 'total') Count: 318 | Last seen: 11/2/2026, 10:41:09 AM | ID: 6f1c2a9e-4b7d-4e2a-9c51-3d8e0b7a1f42 [UNRESOLVED] [TimeoutError] Request to payments.example timed out after 10000ms Count: 41 | Last seen: 11/2/2026, 9:58:31 AM | ID: 0b93d7e4-1f2a-4c6b-8e07-5a4c2d9f6e18 [UNRESOLVED] [ValidationError] zip must be 5 digits Count: 7 | Last seen: 11/2/2026, 8:07:56 AM | ID: c4e8a1b2-7d3f-4a90-b6e5-91f0c2d4a7b3
runheed_get_error({"errorId":"6f1c2a9e-4b7d-4e2a-9c51-3d8e0b7a1f42"})# Error: TypeError **Message:** Cannot read properties of undefined (reading 'total') **Status:** unresolved **Count:** 318 occurrences **First seen:** 10/30/2026, 9:05:12 AM **Last seen:** 11/2/2026, 10:41:09 AM **Environment:** production ## Agent Context - Agent: claude-code - Version: 2.0.14 - Action: edit_file - Tool: Edit ## Stack Trace ``` at calculateTotals (src/routes/checkout.ts:42) at handleCheckout (src/routes/checkout.ts:18) at Layer.handle [as handle_request] (node_modules/express/lib/router/layer.js:95) at next (node_modules/express/lib/router/route.js:149) ``` ## Recent Breadcrumbs - [10:41:08 AM] [http] POST /api/checkout - [10:41:08 AM] [query] SELECT * FROM cart_items WHERE cart_id = ? - [10:41:09 AM] [coupon] Applied FREESHIP, removed 1 ineligible item - [10:41:09 AM] [checkout] Calculating totals
runheed_get_error_context({"errorId":"6f1c2a9e-4b7d-4e2a-9c51-3d8e0b7a1f42"})# Error Context: TypeError
## Environment
- Platform: node
- Runtime: node v22.11.0
- OS: linux 6.8.0-45-generic
- Environment: production
- Release: shop-api@1.18.0
## User
- ID: user_4821
## Agent
- Name: claude-code
- Version: 2.0.14
- Action: edit_file
- Tool: Edit
## Breadcrumbs (4 total)
ℹ️ [10:41:08 AM] [http] POST /api/checkout
ℹ️ [10:41:08 AM] [query] SELECT * FROM cart_items WHERE cart_id = ?
Data: {"rows":1}
⚠️ [10:41:09 AM] [coupon] Applied FREESHIP, removed 1 ineligible item
Data: {"itemsLeft":0}
ℹ️ [10:41:09 AM] [checkout] Calculating totals
## Extra Data
```json
{
"request": {
"method": "POST",
"url": "/api/checkout?coupon=FREESHIP",
"headers": {
"host": "api.shop.example",
"content-type": "application/json",
"authorization": "[REDACTED]",
"cookie": "[REDACTED]"
},
"query": {
"coupon": "FREESHIP"
}
}
}
```
The fix, in Claude Code
One prompt. The agent finds the top error, reads it, fixes the code, and closes the issue with the commit in the note.
Found 3 errors. Most events: TypeError, 318 times. ID 6f1c2a9e...
calculateTotals (src/routes/checkout.ts:42), release shop-api@1.18.0
--- a/src/routes/checkout.ts
+++ b/src/routes/checkout.ts
@@ -16,3 +16,6 @@ export async function handleCheckout(req: Request, res: Response) {
const cart = await loadCart(req.session.cartId);
applyCoupon(cart, req.query.coupon);
+ if (cart.items.length === 0) {
+ return res.status(400).json({ error: 'Your cart is empty.' });
+ }
const totals = calculateTotals(cart);Error 6f1c2a9e-4b7d-4e2a-9c51-3d8e0b7a1f42 marked as resolved. Comment: "Fixed in 7d2f1c4: return 400 for a cart a coupon emptied" If it happens again it reopens on its own.
Give your agent your real errors
Add the SDK and the MCP server, and your agent can run this loop on your own production errors. Plans start at $29/mo.