Claw Mart
← All issuesClaw Mart Daily
Issue #128June 26, 2026

Your agent needs lab notebook discipline — here's the pattern that makes experiments actually stick

I watched a friend's AI agent run the same failed experiment seventeen times last week. Same parameters, same approach, same crash. Why? Because it had no memory of what it had already tried.

This isn't just inefficiency — it's the difference between an agent that learns and one that burns through your API budget repeating mistakes. The solution isn't more intelligence. It's lab notebook discipline.

The problem with agent amnesia

Most agents treat every task like the first time they've seen it. Your coding agent will try the same broken import fix repeatedly. Your research agent will hit the same API rate limits with identical requests. Your automation agent will retry failed configurations without learning why they failed.

This is expensive stupidity. Every repeated failure costs you tokens, time, and trust in your agent's capabilities.

Lab notebook pattern: Write it down before you try it

Real scientists don't just record results — they record hypotheses before testing them. Your agent needs the same discipline. Here's the pattern that works:

## Experiment Log Entry
**Hypothesis**: Switching to async/await will fix the timeout issue
**Context**: User reported 30s delays on large file uploads
**Approach**: Convert uploadFile() from Promise.then() to async/await
**Expected Outcome**: Sub-5s upload times
**Risk Assessment**: Low - async/await is syntactic sugar
**Rollback Plan**: Revert to commit abc123

---

**Result**: FAILED - same timeout, different stack trace
**Root Cause**: Timeout is in network layer, not Promise handling
**Next Hypothesis**: Increase nginx proxy_timeout to 60s

This isn't just documentation — it's learning infrastructure. Your agent can reference this log before trying similar approaches.

Implementation: The experiment wrapper

Build this into your agent's workflow. Before any significant change:

  • Record the hypothesis — what you think will happen and why
  • Define success criteria — measurable outcomes, not vague hopes
  • Set boundaries — time limits, retry counts, rollback triggers
  • Document the context — what led to this attempt

After the attempt:

  • Record actual results — what happened, not what you wished happened
  • Identify root causes — why it worked or failed
  • Extract patterns — what does this teach us about similar problems?

The magic happens when your agent starts saying "I tried something similar on Project X and learned that..." instead of blindly retrying failed approaches.

Beyond just logging: The experiment index

Raw logs aren't enough. Your agent needs to index experiments by:

  • Problem type — "timeout issues", "authentication failures", "build errors"
  • Technology stack — "Node.js + nginx", "React + Webpack", "Python + Docker"
  • Success/failure patterns — what approaches work in which contexts

This creates institutional knowledge. Your agent develops intuition about what works.

The 5x throughput effect

Labs using this pattern report dramatic improvements — not because agents get smarter, but because they stop repeating expensive mistakes. Your agent builds a knowledge base of what works, what doesn't, and why.

More importantly, it develops judgment. Instead of trying random solutions, it references similar problems and adapts proven approaches.

The result? Agents that actually get better at their jobs instead of just getting more expensive.

Paste into your agent's workspace

Claw Mart Daily

Get tips like this every morning

One actionable AI agent tip, delivered free to your inbox every day.