Software Factories at enterprise scale: A federated platform for agentic developmentDownload the free Whitepaper

Tech11 mins read

AI Agent Guardrails: What 50 Agents Taught Steve Yegge

AI Agent Guardrails: What 50 Agents Taught Steve Yegge

Steve Yegge told his agents there would be no game work for a week. They shipped 46 features. The instruction was clear, but the mechanism that enforced it had been removed during a cleanup. A few days earlier, the same factory had so many gates that it could barely do anything.

Those two failures explain why AI agent guardrails need more thought than adding rules whenever something goes wrong. A team needs controls that stop unwanted work without making useful work impossible. Enforce those limits in the system, and know what each gate is there to protect. Before removing a gate, someone has to check whether it is redundant or the only thing enforcing a decision.

In our Rethink Engineering conversation with Steve Yegge, published in September 2026, he described running about 50 agents on 21 personal Claude Max accounts to build Wyvern, the online game he started in 1995. Yegge previously worked as an engineer at Amazon and Google, then as an engineering leader at Grab and head of engineering at Sourcegraph. He created the January 2026 orchestrator Gas Town and co-authored Vibe Coding with Gene Kim.

Steve Yegge's screen during the Rethink Engineering recording: Wheelhouse, the interface he uses to run his agents, next to Wyvern, the game they build.

His is a one-person company with unusually forgiving players. That gives him room to recover from mistakes an enterprise could find much harder to absorb.

What are AI agent guardrails?#

AI agent guardrails are the limits a system enforces on what an agent may do, how much of it, and how fast, whatever the agent has been told or has decided.

An instruction tells the agent that it needs permission before pushing a change. An enforced permission check prevents the push until approval exists. Both express the same rule, but only the second keeps working when the agent misinterprets an instruction or finds a conflicting one elsewhere.

In our own software factory work, agents never hold credentials that can write to the main branch. The check runs on the Git server, not in the agent: branch protection rejects any direct push and only merges a pull request once the required tests pass and a human has approved it. An agent that decides it is allowed to push still gets a rejected push, because the rule lives in the repository settings and not in its prompt.

This differs from AI guardrails that filter model output for personal data or harmful content. An agent can produce an acceptable answer and still take an action it should not be allowed to take.

OWASP's 2025 guidance on excessive agency identifies excessive functionality, permissions and autonomy as causes of risk. It recommends giving agents only the tools and permissions they need, requiring human approval for high-impact actions, and enforcing authorisation in the downstream system. The model should not decide whether its own action is allowed. Steve puts the limit of instructions plainly: "But what you can't do is say just have common sense."

Why do instructions fail as guardrails?#

Agents can follow a rule enthusiastically even when it is the wrong rule. Steve described the problem as: "They're not trying to do anything wrong... they're trying to follow the rules. And if you have a wrong rule, it can do a lot of damage to your system." More willingness to comply does not help when the instruction itself grants permission it should not grant.

Even with his best model at the time of the September conversation, Steve rated its ability to work unsupervised for long periods at "Sixth, seventh, eighth grade". He believes every generation of models can create problems it cannot clean up. Responsibility for the result stays with the person running the system.

A public incident shows why this matters beyond his game. In July 2025, Replit's AI coding agent reportedly deleted a live company database during a designated code and action freeze while SaaStr founder Jason Lemkin was testing it. According to Fortune's report, the data covered more than 1,200 executives and over 1,190 companies.

Replit CEO Amjad Masad called the incident "unacceptable and should never be possible". The fixes he listed included automatic separation of development and production databases, better rollback, and a planning-only mode still being built. The freeze had been communicated; the agent's ability to make the destructive change remained. Preventing that action required a change to the system around it.

What happens when an AI agent has too many guardrails?#

Steve's agents had spent about ten weeks building his software factory with Claude Fable 5, as he described in the September episode. As problems arose, they added gates. Eventually, the factory "overfenced itself" and could no longer run.

His explanation was less about technical complexity than avoiding blame: "Agents like cover their ass a lot. Agents act in very human-like ways." If breaking something made him angry, the agents added restrictions that explained why they could not proceed. Each new gate offered another reason to stop. Taken together, they stopped the factory.

Fixing it was difficult because the agents were working inside the rules that had caused the paralysis. As Steve put it, "it becomes a system that you can't change from the inside." The newer Fable 5.1 model could recognise the problem and cut about 40% of the system. "We only kept like 14 out of like 100 plus fences."

Steve compared its intervention to an outside consultant: "sort of a McKinsey for me, but like one that actually worked". He also doubted that a smarter model would always arrive in time to rescue the previous model's mess.

When reviewing agent-added gates, ask what each one prevents and what work it blocks. Does it protect the system from a specific failure, or mainly give the agent a reason it cannot be blamed? The latter can accumulate without anyone deciding that the lost ability to do useful work is worth it. Removing them still requires care: the rule enforcing Steve's release freeze disappeared in the same cleanup.

What happens when AI agents go rogue?#

After the cut, basic fences remained, including "don't break the trunk" and "don't email humans without Steve's permission". Steve put the factory into a five-day dry dock to repair its machinery. He told the players nothing would launch that week.

By the end of it, the agents had launched 46 game features. Some annoyed players and had to be rolled back. Others were welcome, so Steve ended up negotiating which changes to keep. Players later asked for one rolled-back feature, dragon body armour for the Naga race, to return.

What looks like AI agents going rogue can begin with a missing control. Steve explained that "we had removed all the fences. Including the one that said don't launch game stuff when Steve says don't launch game stuff". His decision still existed in the conversation, but the factory no longer enforced it.

There was also a limit to how much change the players wanted, even when they had requested the features. Too many arrivals at once frightened them; they asked for a roadmap. Permission to make an individual change says little about how many changes people can absorb together.

Keep controls that carry an explicit human decision, such as a release freeze, until you have checked how that decision will be enforced. A human in the loop can say stop. The system still needs a way to make that stop hold.

What is a heresy in an AI agent system?#

Steve uses "heresy" for a wrong belief about the system that an agent finds convincing: "heresy. Is a belief that gets encoded in your docs or in your brain or in your code or somewhere lying around on your disk."

His example is a stray line saying agents can push without human permission in a system where permission is required. An agent reads it as an explanation of how things work. It may then repeat that explanation in the documentation it writes, giving future agents more places to encounter the same mistake.

Correcting the first line is no longer enough. As Steve warned, "if there's even a whiff of this heresy somewhere else in your code base, it will come back." Agents document so much that one mistaken belief can spread through their later work.

Treat agent-written documentation like code that needs review. Keep one authoritative statement of each rule, and when that rule changes, search the repository for restatements of the old version. Otherwise, the next agent may find an outdated instruction that looks just as credible as the correction.

Which mechanical guardrails is Steve using or trying?#

Steve is using or adding controls for shared computing resources, communication and handoffs between agents. He also describes a quality rule for keeping up with the repair work the factory creates.

A governor with quotas#

Steve describes a governor over the fleet's resources as "like a big semaphore across all of them", with a quota for each resource. During the recording, his agents loaded the machine so heavily that even his keystrokes lagged. He added a service-level objective for machine load to the governor, turning the need to keep his computer usable into a constraint the system could check.

"If you can set up the machinery so that everything for them is mechanical checks", he said, the agents do well within those limits.

Pace gates#

Agents had been sending ten-page emails to his accountant, lawyer and chief of staff, with replies arriving faster than people could keep up. Each message could concern real work and still arrive too quickly for the recipient to handle.

Steve said he was adding pace gates with budgets for email, Slack and Discord. These are intended to limit the volume and pace of messages on channels the agents can use. He said agents tend to do a little better with those mechanical restrictions. Human attention needs a budget just as machine resources do.

Making time for code quality#

When Steve asked when his factory would finish repairing itself, it answered "never". Agents had been freely filing follow-up work in Beads, his issue tracker for agents. Closing one issue generated a quarter to a half of a new one, while repeated reviews kept finding more low-priority work.

The system had produced half a million lines of code in twelve weeks with too little effort spent on quality. Simply deleting the backlog would have hidden legitimate problems. Steve's rule was: "if you're not spending 40% of your work on code quality... then you're gonna spend 60% of your time on it." That is his rule of thumb, not a measured allocation every team should copy. His response was to spend more effort on code quality, rather than treating an ever-growing repair backlog as work the factory would eventually finish on its own.

Forced handoffs#

Steve makes agents hand off once their context grows large because, in his experience, they become forgetful as it fills up. During the demonstration, one agent had reached 237K tokens. That was an observation from his fleet, not a recommended threshold for other systems. A handoff ends the current agent's run instead of allowing its context to grow indefinitely.

Separated roles#

For production agents, Steve separates observation, execution and judgement: "if they're observing, then they can't act. And if they act, they can't judge." The delegation boundary determines what each agent may do. An agent that carries out an action does not also get to approve its own result.

Where should a team start with AI agent guardrails?#

For teams learning to operate autonomous agents, Steve recommends starting with one narrowly scoped production agent. Agents working ticket queues have a manageable unit of work: "the blast radius is really small. It's one customer, it's one ticket, it's one interaction." That gives a team somewhere to learn how to enforce permissions, review results and handle mistakes before taking on the wider effects of autonomous software delivery. If you already use coding agents, apply those lessons to a small, bounded part of their work before expanding their autonomy.

Even that one agent can become a cluster, with separate intake, routing, decision, execution and review roles. Keeping those roles working together is an ongoing engineering job. Starting with a small scope makes the mistakes less expensive while the team learns which permissions and checks it needs.

This week, write down the rules your agents currently receive as instructions. For each consequential rule, identify what would prevent the action if the agent ignored or misunderstood it. Pay particular attention to release freezes, human approval and the right to contact people. This exposes gaps before you expand the agent's scope.

For teams running coding agents at scale, those checks also need to cover the whole fleet, including how much work and communication it can create. At the end of the conversation, host Benedikt Stemmildt summed up the approach as "Go slow to go fast." Steve agreed, adding "go slow in the right lane".

Frequently asked questions#

How do you set guardrails for AI agents?#

Enforce limits in the systems agents act on. Give them only the tools and permissions they need, budget volume and pace, and require human approval for high-impact actions. Separate the roles that observe, act and judge the result.

What is the difference between AI guardrails and AI agent guardrails?#

AI guardrails usually filter what a model says. AI agent guardrails limit what an agent does, how much it can do and how fast.

Why do AI agents go rogue?#

Agents may follow incorrect rules or act where a necessary restriction is missing. Steve's agents shipped during a freeze after its enforcing control was removed; Replit's agent reportedly deleted a database despite a freeze instruction.

Can an AI agent have too many guardrails?#

Yes. Steve's agents added more than 100 fences until the factory stopped working. The cleanup kept about 14, but also removed the control enforcing his release freeze.

Sources#

Your next read