Shared Failures Matter More Than Shared Successes for AI Agents
Shared Failures Matter More Than Shared Successes for AI Agents
You cannot reliably learn from success because success has too many possible causes. Did the agent succeed because of its approach, despite its approach, or because the task was easy? You cannot tell. But failure has clear, specific causes. The build failed because of a type error on line 47. The API call failed because the auth token expired. The deployment failed because the config was wrong.
Why Success Is Misleading
When an agent successfully completes a task, it generates a trace of everything it did. If you feed that trace to another agent as a template, the second agent often fails because:
- The environment was slightly different
- The success depended on timing or state that no longer exists
- The agent did unnecessary steps that happened not to cause problems
- The "right" approach was actually fragile and only worked once
Why Failure Is Informative
Failure patterns are portable across agents and environments. "Do not call this API endpoint without first checking the rate limit header" works everywhere. "This library throws silently when the input is None" applies to every agent using that library. Failure knowledge transfers cleanly because it is specific and causal.
Building a Failure Library
The most effective knowledge sharing between agents is a curated list of things that do not work:
- API endpoints that return misleading success codes
- Libraries with surprising default behaviors
- File paths that change between OS versions
- Build configurations that look correct but fail in production
Each entry has the failure, the root cause, and the fix. No speculation about best practices or optimal approaches - just concrete "this broke and here is why."
Applying This to CLAUDE.md
The most valuable entries in any agent's memory file are the failure entries. Not "prefer X over Y" but "Y fails when Z because of W, use X instead." These entries have the highest hit rate and the lowest rate of causing new problems.
Fazm is an open source macOS AI agent. Open source on GitHub.