Jones: AI complexity now requires agents to debug their own code

AI Engineer////3 min read

Modern AI systems have reached a level of internal complexity where manual human debugging is no longer tractable. When an automated SRE tool like incident.io runs an investigation, it triggers hundreds of telemetry queries across logs, metrics, and traces. Founding engineer Lawrence Jones argues that when these systems fail, the resulting trace data is too vast for a human to parse. The solution isn't better UIs, but building internal tools specifically designed for Claude Code and other coding agents.

CLI tools bridge the agent context gap

Evals are essentially unit tests for prompts. At incident.io, these are stored in YAML files alongside Go code. However, as an AI system matures, these files often grow into multi-megabyte behemoths that exceed the context window of most LLMs. To solve this, the team built a specialized CLI called eval-tool. This allows a coding agent to query, edit, and append test cases without needing to ingest the entire file. This enables a robust red-green development cycle where an agent can programmatically verify that a prompt fix doesn't break existing behaviors.

File systems outperform custom debug UIs

While traditional dashboards help humans visualize traces, they are often useless for AI agents. The team discovered a massive unlock by serializing complex UI debugging views into downloadable, self-documenting file systems. By dropping these directories into a sandbox with Claude Code, the agent can use standard tools like grep to navigate the hierarchy of prompts and tool calls.

# Example agent workflow for debugging a failed trace
$ eval-tool get-case --id "incident-123"
$ claude-code "Analyze why the RCA in ./traces/123/ failed. Fix the prompt in ./prompts/analysis.go"
Jones: AI complexity now requires agents to debug their own code
Fighting AI with AI — Lawrence Jones, Incident

Parallel analysis at fleet scale

When tracking systemic performance across hundreds of customer accounts, individual debugging isn't enough. The team utilizes a "scrapbook" repository that runs 25 agents in parallel. Each agent performs a deep-dive analysis on a single investigation, storing its findings in Markdown files. A secondary clustering stage then aggregates these findings to identify cohort-level failure patterns. This structured pipeline transforms raw telemetry into actionable engineering tasks, allowing developers to focus on architectural fixes rather than data mining.

Tips for building agent-friendly internals

To replicate this success, prioritize plain-text formats over proprietary UIs. Use ASCII representations for complex traces to make them readable for LLMs. Finally, treat your internal runbooks as code; by defining analysis steps in structured Markdown, you provide the necessary guardrails for agents to perform repeatable, reliable work.

Topic DensityMention share of the most discussed topics · 14 mentions across 11 distinct topics
Claude Code
14%· products
incident.io
14%· companies
Markdown
14%· products
Anthropic
7%· companies
Code X
7%· products
Other topics
43%
End of Article
Source video
Jones: AI complexity now requires agents to debug their own code

Fighting AI with AI — Lawrence Jones, Incident

Watch

AI Engineer // 17:29

We turn high signal in-person events for the top AI engineers, founders, leaders, and researchers in the world into the best free learning opportunities for millions around the world here on YouTube. Your subscribes, likes, comments, speaking, attendance, or sponsorships goes a long way toward making our biz model sustainable indefinitely. We strongly believe this industry deserves a better class of community and that we know how to do this well; we just need your support.

Who and what they mention most
Anthropic
26.9%21
Claude
21.8%17
OpenAI
19.2%15
Cursor
15.4%12
3 min read0%
3 min read