by Martin Monperrus

TLDR: When your application fails, the best moment to write the bug report is now, from inside the process, while the state that explains the failure still exists. An embedded LLM agent can do exactly that: inspect the live runtime state, ask for more, and draft a report that a human approves before it is sent.

Definition

An in-process LLM bug reporter is a component embedded in an application that, upon a failure (uncaught exception, error log, failed assertion, or a softer signal such as a frustrated user), starts an LLM agent that:

  1. receives the failure and a first snapshot of the runtime state (stack, locals, configuration, recent logs),
  2. queries additional state through read-only tools, like a coding agent explores a repository,
  3. writes a structured bug report (title, what happened, expected behavior, evidence, likely cause),
  4. stores it locally as a draft and sends it only after explicit approval.

The key word is in-process. Classical crash reporters ship a dump and analyze it later. Server-side AI debuggers read telemetry after the fact. Here, the agent runs at the failure site, before the process exits and the heap is gone forever.

Prior art

The empirical signal is clear: LLM-written reports are better than human-written ones, and agentic ones are better than one-shot ones. What is missing is putting the agent where the state is.

Why in-process?

Because runtime state is perishable. Once the process dies, you keep what you serialized, and you serialized what you guessed would matter, before knowing the bug. An embedded agent reverses this: it decides what to look at after seeing the failure.

This is exactly what a good developer does in a debugger, except it happens on the user’s machine, in production, at the moment of failure, without the developer.

A second benefit: the LLM widens the notion of failure. Claude Code triggers not only on errors but also on detected user frustration. An embedded reporter can be triggered by a wrong-looking output, a timeout, or a user saying “this is broken”.

Properties of a good LLM bug reporter

Conclusion

Automatic crash reporting gave developers volume. LLM-based bug reporting gives them explanation. The design pattern is simple: at failure time, before the state is gone, let an agent explore it and write the report, then let the human decide.