I let my AI agent change its own code. First, it started talking to itself.

I have an AI agent that works through my backlog. It picks up a task, writes the change and sends it to me for review. For weeks, most of the fixes I made were to the agent itself, and every one of them waited for me.
So this week I did it. I gave the agent the keys to its own code. It can now read it and propose changes to itself.
And the first thing it did with the keys? It talked to itself! It posted a message, read that message back as a new request, and answered it.
Why I gave it the keys
The fixes were small and obvious: an instruction missing a step, a message going to the wrong channel. And guess what? I was the slow step in improving the thing whose whole job was to stop me being the slow step.
Can it put a change live by itself? No. It sends every change for review, like anyone on a team, and I read it like anyone else's.
Two surprises on day one
The agent posts its updates to a chat channel and listens to the same channel for new work. You can guess the rest.
It saw its own message, took it for a new request, and replied. It is the first thing that happens when anything writes to and reads from the same place. If you build something that posts where it listens, teach it to ignore itself before you switch it on.
The second surprise: it wanted to restart itself after every change. Every single one! That makes sense when the program itself changed. It makes no sense when only a document changed, and a restart in the middle of a job throws the work away. So the rule is now written down: restart when the program changes, never for a document.
The three brakes
A kill switch with levels. Stopping one run, stopping every run, and refusing to start anything new are three different needs. You want all three ready before something goes wrong. Not designed in a panic while it does.
Every session signs in. A kill switch is useless if you cannot see what to kill. So anything that starts an AI session writes it on a list first. There is always something to point at.
One at a time, in total. Only one job that changes code runs at once. Not one per project. One.
The rule: keys and brakes ship together
Give the power and the limits in the same change. Same day, same change. If the clever part ships on Monday and the brakes on Friday, then for 4 days the only thing keeping you safe is that nothing bad has happened yet.
This is not a rule about AI. It is the same rule as giving a new colleague access to the live systems on their first day. The difference? This colleague works at 4 in the morning and never gets tired. So your Friday comes much sooner than you think.
What it taught me about trust
For weeks I had been the only one allowed to change how the agent works. Letting it change itself felt like letting go of the wheel for a second, just to see if the car drives straight.
The lesson surprised me. Trust does not come from the agent being clever. The agent was clever on day one, and on day one it was answering its own messages! Trust comes from what happens when it gets something wrong. Can I see it? Can I stop it? Does one mistake stay one mistake, or does it spread?
With the three brakes, I can see it, I can stop it, and one mistake stays one mistake. And that is what lets me say yes to more. The brakes are not there to slow the agent down. They are the reason I can let it go faster.
This is how it will go with AI at work. The teams that move fastest will not be the ones with the smartest agents. They will be the ones who built the brakes first, and then dared to press the gas.
Things I did not expect
The agent talking to itself was funny for 10 seconds. Picture someone reading their own text message, then replying to it very politely, as if a stranger had sent it. The loop was not a bug in the AI. It was a bug in where I let it listen.
Which rule did I expect to hate? One job at a time. It sounded like a speed limit, and I never felt it. Not once. The slow part of the work was always thinking and checking, never waiting in line. A rule that costs nothing and prevents a whole kind of mess is the best kind there is.
If I started again, I would add one thing: a dry run mode for the first two weeks, where the agent writes the change but cannot save it. I got the same result by reading every pull request closely. But a switch is cheaper than discipline, and a switch never gets tired either.
The agent can change itself now. But never behind my back.
I post one of these every week. Follow along on LinkedIn or YouTube, or by RSS. Want this on your team? Work with me.
The 527 rules I give my AI agents, free
Every one comes from a real mistake. The best 100 are open on /rules, or download them as AGENTS.md, no email. All 527 come by email, as one file you can drop straight into your repo as AGENTS.md or CLAUDE.md, so your agents follow them from the next session. Plus the occasional email when I learn a new one.
One click to unsubscribe.