cd /news/ai-agents/the-codebase-is-the-harness · home › topics › ai-agents › article
[ARTICLE · art-172129] src=jonathannen.com ↗ pub= topic=ai-agents verified=true sentiment=↑ positive

The Codebase Is the Harness

Pyn runs a monorepo in which the bots that modify its product code also modify their own harness — their markdown instruction files, databases and MCPs — so agents can update their own instructions after a fix, the company's engineering blog reports. In one example, an agent given access to PostHog session recordings diagnosed and fixed two bugs without intervention: a user making a change, clicking back and getting stale data, and a user unable to log in because the error message wasn't showing, with the review bot assisting. The author argues a human still supplies macro direction and self-improvement is currently only a carve-out, but that even a fraction of self-improvement applied to the system itself yields a compounding system.

recommendation

Keep agent instructions and tooling in the product monorepo so agents can update their own instructions after a verified fix and proactively catch similar bugs in new code.

more in playbook: Designing agent systems
by read2 min views5 publishedNov 18, 2026
The Codebase Is the Harness
Image: source

I have a growing belief that self-improving codebases are the end goal. Perhaps that self-improvement starts small and niche, but it can grow and compound. To get there a codebase has to understand itself (to the extent necessary). That has changed what I think a "harness" is.

The word usually means the wrapper around a model: the prompts, the tools and the loop that make it an agent. I've used it that way on this blog, and it's where half my day goes. But to be self-improving it needs to be self-referencing. I now think the codebase is the harness.

At Pyn we have a handful of bots that perform work on the codebase. They have their own markdown files, databases, MCPs and so on, and all of it is oriented toward the codebase. Even the code review process is part of the harness<sup>[1]</sup>.

It's a monorepo. The bots and their tooling live in the same repo as the product, so the agents that change the product also change the harness. It sits inside the codebase and gets improved the same way everything else does.

A handy example I have is PostHog. We gave an agent access to the session recordings<sup>[2]</sup>, and it can diagnose issues and fix them without intervention. It saw someone click in, make a change, then click back and get stale data. It saw someone else having trouble logging in because the error message wasn't showing. It diagnosed and fixed both (with the help of the review bot).

You find bugs like those by watching someone use the product, and that's what I mean by the codebase understanding itself. It can see how it's being used, and it can act on what it sees.

The next part is key: after a fix like that the agents can assess if it was successful, and then alter their own instructions to suit. Those instructions live in the same repo, so they can be changed to proactively find other similar issues and stop them slipping into new code. That is the tiniest increment, but an incredibly powerful one.

A human still needs to provide the macro direction. The part that improves itself is only a carve-out at the moment, but it's growing<sup>[3]</sup>. If you can get even a fraction of self-improvement, and it's improving the system itself, then you have a system that can compound.

── more in #ai-agents 4 stories · sorted by recency
── more on @pyn 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/the-codebase-is-the-…] indexed:0 read:2min 2026-11-18 · —