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')

Events
318
First seen
3d ago
Last seen
4m ago
Project
shop-api

Stack Trace

1. calculateTotals in src/routes/checkout.ts:42:41
2. handleCheckout in src/routes/checkout.ts:18:20
3. Layer.handle [as handle_request] in node_modules/express/lib/router/layer.js:95:5
4. next in node_modules/express/lib/router/route.js:149:13

Agent Context

The agent that last edited this code, set with runheed.setAgent()

Agent
claude-code
Version
2.0.14
Tool
Edit
Action
edit_file

Environment

Platform
node
Runtime
node v22.11.0
OS
linux 6.8.0-45-generic
Environment
production
Release
shop-api@1.18.0

Breadcrumbs

10:41:08 AMhttpPOST /api/checkout
10:41:08 AMquerySELECT * FROM cart_items WHERE cart_id = ?
10:41:09 AMcouponApplied FREESHIP, removed 1 ineligible item
10:41:09 AMcheckoutCalculating totals

Extra Data

The request, recorded by the Express error handler. Secret headers are redacted before they leave your app.

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"
    }
  }
}

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.

Tool call
runheed_search_errors({"status":"unresolved","limit":5})
Response the agent reads
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
Tool call
runheed_get_error({"errorId":"6f1c2a9e-4b7d-4e2a-9c51-3d8e0b7a1f42"})
Response the agent reads
# 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
Tool call
runheed_get_error_context({"errorId":"6f1c2a9e-4b7d-4e2a-9c51-3d8e0b7a1f42"})
Response the agent reads
# 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.

sample session in claude code
>
fix the top production error
runheed_search_errors({"status":"unresolved","limit":5})
Found 3 errors. Most events: TypeError, 318 times. ID 6f1c2a9e...
runheed_get_error and runheed_get_error_context
calculateTotals (src/routes/checkout.ts:42), release shop-api@1.18.0
*
The top error is the TypeError in checkout, 318 events since shop-api@1.18.0 went out. The breadcrumbs show the FREESHIP coupon removing the only item in the cart (itemsLeft: 0), so calculateTotals reads .total of an item that isn't there. I'll return a 400 when a coupon leaves the cart empty, before totals are calculated, and add a test for that case.
src/routes/checkout.tsdiff
--- 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);
bun test test/checkout.test.ts: 12 pass, 0 fail
*
Tests pass, including the new empty-cart case. Committed as 7d2f1c4. Marking the error resolved.
runheed_resolve_error({"errorId":"6f1c2a9e-4b7d-4e2a-9c51-3d8e0b7a1f42","comment":"Fixed in 7d2f1c4: return 400 for a cart a coupon emptied"})
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.