Hey guys! A lot of you have mentioned that it would be great to give Claude Code runtime errors since that’s still a manual process. you have to copy/paste stack traces, server logs, etc… I built something that might help with that. It’s called depct, an open source CLI that instruments your app and gives Claude Code direct access to runtime state. What it does: It instruments your app with zero code changes. While your app runs, it captures errors, argument shapes at every function call, and execution traces into a local SQLite database. Then Claude Code queries it directly via CLI commands. How Claude Code uses it: On first run, depct writes a CLAUDE.md with the commands. Next time you ask Claude Code to debug something, it runs depct errors --json on its own and gets back:
- Error groups with causal chains: the full call path from HTTP entry to crash site, with the argument shape at every hop
- Shape diffs: what the data looks like when the function fails vs succeeds. For example: defaultSource: “null” on failure vs defaultSource: {id, brand, last4} on success.
- Execution traces: full span trees with timing at every function call, so it can see where time is spent and which span errored
- Function profiles: invocation count, error rate, p50/p95/p99 latency, callers and callees
- Test candidates: ranked by how useful the shape diff is, with full reproduction context Claude Code can then one-shot fixes that usually took iteration with you pasting a whole lot of logs. The overall goal is rather ambitious, I want to make a completely self healing codebase so you can write code, push it to prod and prod will actually fix errors and bugs with your approval so you can keep building and stop debugging. It’s completely free, local and open source, please let me know what you think and if it’s missing something that makes it useful! Check it out at depct.dev submitted by /u/depctDev
Originally posted by u/depctDev on r/ClaudeCode
