I built Last Signal: an offline-first forensic CLI that investigates why AI agents fail

Wait 5 sec.

I built Last Signal: an offline-first forensic CLI that investigates why AI agents fail I've been working on a problem that I think will become increasingly relevant as autonomous AI agents become more common. What happens when an AI agent doesn't actually make progress, but keeps executing anyway? Imagine this: An agent calls a tool. The tool fails. The agent retries. It fails again. The agent enters an unproductive retry cycle. Eventually, the process crashes. You have execution logs, timestamps, tool calls, and error messages. But reconstructing the complete failure sequence and determining what actually went wrong can be surprisingly tedious. Existing monitoring solutions can tell you that something failed. Raw logs tell you what happened. But identifying recurring failure patterns and distinguishing explicit evidence from inferred causes requires additional investigation. So I built Last Signal, an open-source, offline-first digital forensics CLI for failed AI-agent executions. What does it do? Last Signal supervises agent processes and reconstructs their execution traces to perform evidence-grounded digital autopsies. It currently detects four failure patterns: Repeated Tool Failure: Identifies repeated operational failures associated with a tool. Unproductive Retry Loop: Detects retries without a subsequent recorded success. Terminal Tool Failure: Identifies a tool failure immediately preceding process termination. Unrecovered Execution Failure: Detects fatal execution failures without a recorded recovery path. The interesting part is how the analysis works. Instead of asking an LLM to guess why an agent failed, Last Signal applies deterministic rules first. Optional local AI through Ollama can then interpret the findings and suggest recovery strategies. Deterministic ground truth first. AI interpretation second. Technical details Python 3.10+ Typer and Rich JSONL execution traces Deterministic failure-detection engine Ollama for optional local AI analysis GitHub-flavored Markdown autopsy reports The forensic core works without cloud AI services, and deterministic analysis can run without Ollama. Installation pip install last-signal Published on PyPI: v0.1.0 Links Documentation: https://lastsignaldocs-five.vercel.app/ GitHub: https://github.com/sahilsalunke42/last-signal PyPI: https://pypi.org/project/last-signal/ Looking for contributors The current implementation is Python-based. One of my next goals is developing a native TypeScript module so the same forensic capabilities can eventually reach the JavaScript ecosystem. I'm particularly interested in collaborating with developers experienced in TypeScript, Node.js, and backend infrastructure. If that sounds interesting, contributions and architectural discussions are welcome on GitHub. I'd genuinely appreciate technical feedback, especially around the failure-detection rules, trace reconstruction, and how agent observability could be improved. What failure patterns have you encountered when building autonomous AI agents that existing logging and monitoring tools made difficult to diagnose?   submitted by   /u/Ashamed-Job-5491 [link]   [comments]