# Your AI Agent Is Hiding Its Mistakes From You - Ben Holmes, Warp

## Executive summary

The presentation details the concept of building self-improving AI agents within a 'software factory' infrastructure. The core mechanism involves agents introspecting their own historical work—including transcripts, tool calls, and outputs—and using LLM-as-judge scoring rubrics to identify patterns of failure (e.g., redundant tests, verbosity, inefficiency). This data then feeds a self-improvement agent that suggests concrete configuration patches or skill updates via pull requests (PRs) to enhance the system's overall performance.

## Key takeaways

- Software Factories and Meta-Engineering: A software factory automates the entire development lifecycle. The most advanced aspect is 'meta-engineering' or 'factory engineering'—the process of applying engineering work to improve the system that drives the agents themselves, focusing on agent skills and configuration.
- The Self-Improvement Loop: The process involves setting up scoring agents that grade past conversations against defined rubrics (e.g., efficiency, code quality). A subsequent agent analyzes aggregated failures to find common root causes and suggests improvements to the skills or code base.
- Data Requirements for Introspection: To enable analysis, it is crucial to centralize all agent conversations and capture not only the transcript but also the tool calls, file system calls, and outputs (like code diffs) in a single location.
- Practical Tool: Skill Doctor: Skill Doctor is a skill that can be run on a single-player setup (e.g., Claude Code or Codex history) to perform a one-time grading across defined metrics, providing immediate optimization insights.

## Technical details

- Data Aggregation: To centralize agent conversations, teams can use methods like setting up an S3 bucket to collect local agent folders (e.g., dot Claude folders) or, ideally, running agents within a shared compute instance (like isolated Docker sandboxes) where all traces belong to a single, easily introspectable source.
- Scoring Metrics (LLM-as-Judge): Three key metrics for scoring agent performance are: 1) Redundant tests (evaluating excessive test coverage); 2) Verbosity (assessing if the agent is overly verbose in communication or code comments); and 3) Efficiency (analyzing tool calls and MCP calls to determine if the agent is efficiently reaching the solution or 'spinning its wheels').
- The Improvement Cycle: The process is automated: 1) Conversations are scored as they happen (e.g., upon PR merge). 2) A cron job runs periodically (e.g., every 24 hours) to sample failed conversations. 3) A self-improvement agent analyzes these failures to find commonalities and suggests specific patches or changes to the skills repository or factory configuration.

## Practical implications

- Implement a centralized logging system to capture all agent traces, including tool calls and outputs, not just the transcript.
- Define clear, measurable scoring rubrics (e.g., for test coverage or communication style) and use an LLM-as-judge approach to grade agent performance.
- Automate the review process by scheduling a self-improvement agent to analyze failure reports and suggest configuration patches, thereby closing the feedback loop.
- Use the resulting score dashboard to track performance trends over time, providing proof points for successful system improvements.

## Topics

AI Agents, Software Factory, Meta-Engineering, LLM-as-Judge, CI/CD, Self-Improvement, Warp Factories, Skill Doctor

Source: https://www.youtube.com/watch?v=pz74r-4dGfQ
