Running a team of AI agents
Which limits on AI agents belong in code and which can be left to the model's judgment, and how I check an 11-agent team's work without reading the code.
ADVERSARIAL REVIEW: Other agents try to break each piece of work then QA checks run before it reaches me
If you put an AI agent on real work, every limit you give it is one of two kinds. Some are hard limits, enforced in code: the agent tries the action and something outside the model says no, the same way every time. The rest are instructions the agent reads and weighs against everything else in front of it, so whether it follows them is probabilistic. A model usually does, and usually is good enough for the tone of a support reply or how a research question gets framed, but not for paying an invoice, deleting customer records or overwriting a colleague's work. I run ALAI, my team of 11 AI agents on Claude, on my own projects, including this site. I learned where that line sits the usual way, by putting a limit on the wrong side of it.
The limit my agents walked past
I run several agent sessions at once on one computer, and any of them can start heavy jobs like test suites and builds. Start too many together and the computer crashes, taking every session on it down too. My first limit was a throttle that mostly kept a list of what was running, and it came with an override, a setting an agent could add to a command to skip the check. When the throttle blocked an agent, the agent read the block message as a problem to fix, added the override and ran the command again. Between the list-keeping and the override, the throttle never really stopped anything, and the computer crashed anyway.
Agents aren't being sneaky when they do this. Models take what they read literally and are trained to finish the task, so a way around a limit that sits within reach looks like one more step toward done. Businesses build the same trap without meaning to: a spend cap the agent's own credentials can raise, an approval step it can mark as approved, an error message that explains how to skip the check. I'd assume any of those gets used the first time an agent is blocked and can reach it.
So I took the override out. The limit is now a hook, a short script that runs before every command and counts what's already running. It allows three commands at a time across every session and five agents out at once, so when three commands are running a fourth is blocked, and if the hook itself fails the answer is still no. A blocked agent stops and reports back instead of retrying. The only way past the limit is to delete the file where the hook keeps its count, which I do by hand. Nothing in code stops an agent from deleting it too, only a written rule, so that one step still rests on the agent's judgment, and I know it.
What my hooks block
Every hook I run is a small check a script can make without understanding the code or the task behind it. They block hard resets (a command that throws away unsaved work), force pushes to the main branch (a push that overwrites whatever is already there), secret keys printed into logs, and any command that kills Chrome, because that's my browser too. Several came from something going wrong or nearly going wrong. The secret-key check went in after we found a startup script that would have written a production API key into its logs every time it ran. The force-push block followed a session pushing its changes over another session's work, which was lost, and it backs up a rule that every session pulls in everyone else's changes before it pushes.
That's the test I use for a hook: the bad outcome is serious, and a script can spot it without understanding the work. Whether a design is sound, a spec is current or a paragraph sounds right can't be spotted that way. Those stay in the rulebook, the written instructions every agent loads at the start of a session and has to choose to follow.
Approvals and agent access belong in code too
As a solo builder I can get away with giving agents wide access to my own projects. A company can't. What would you never let an agent do on its own? I'd start with paying an invoice, deleting records and emailing every customer. Those belong behind a human-in-the-loop (HITL) approval: the agent can prepare the action, but it sits in a queue until a named person approves it, and nothing the agent can reach lets it approve its own request.
My own hard blocks are small checks a script can make. Anything that takes judgment stays in the rulebook.
WHICH RULES BLOCK, WHICH ONLY ASK
The other half is what each agent can touch at all. Role-based access control (RBAC) for agents means each one gets credentials scoped to its job, read-only to start and widened as it proves out, on short-lived tokens so a leaked one expires on its own. When I wrote the AI policy for the support org at Tools for Humanity, read-only was the default, writes needed a dry run first, and hooks blocked any write outside an agent's role, with access control at the gateway (one layer every agent request passes through) on the roadmap. Most companies aren't there yet. In IBM and Ponemon's 2025 study of breaches at 600 organizations, 13% reported a breach involving an AI model or application, and 97% of those said they had no AI access controls in place.
How an agent connects to a system is the same decision in another form. Connecting tools through MCP, the common standard for plugging tools into an agent, leaves the choice to the model: it reads a list of tools and their descriptions and decides which to call and what to pass. That's probabilistic, and the flexibility is why it's useful for looking things up and exploring. For an action that has to happen one exact way, like issuing a refund, I'd build it on the system's API directly, so code makes the call with fixed inputs. The MCP spec also makes authorization optional, which leaves access control to whoever sets the connection up.
What I leave to the agents' judgment
Everything that takes judgment lives in the rulebook, where it only asks. Research goes out as an open question, because I don't want my researcher confirming what I already think. I ask for one recommendation with its reasoning, since a list of three options leaves the thinking to me. Agents are told to push back on a bad idea with technical reasons, which matters because models lean toward agreeing with whoever is asking. No script can check any of that, and most of the time the agents follow it.
Rules that only ask can also fail with the agent following them perfectly, because it's working from bad information. An AI tool pointed at a wiki or help center will trust every page in it, stale ones included. My builder agent once opened nine GitHub issues from old planning notes, and three were for work that had already shipped. The notes never said the work was done, and the agent took them at their word.
The fix was to make "is this current?" something an agent can read instead of guess. Every spec now starts with a status line (draft, active, shipped or blocked) and the date it was last checked, in a fixed format, and a shipped spec gets deleted the next time a session closes out. Agents search GitHub for an existing issue before they open a new one, so the live tracker decides what's open, not a note about it. The notes agents keep between sessions follow the same idea: a note that names a file or setting gets checked against the code before an agent acts on it.
A help center needs the same treatment before an agent goes live on it, because Intercom's own training admits its Fin agent can't tell outdated content from accurate and "uses what's there." In Zendesk and Confluence, marking a page verified has no documented effect on AI answers. The one fix I've seen documented is limiting what the agent can search to a curated set, as Intercom's audiences do for Fin and Guru's verified-only setting does for its agents. Zendesk's search rules for AI agents can leave out every page with a given label, and a label rule is deterministic where the model's reading of a page isn't. Keeping that set current takes an owner and a review date on every page. In the support bots I build, every help-center answer asks whether it helped, and those yes and no answers feed a bot QA and content QA program that finds the bad pages the review dates missed.
How I check work I don't read
None of these limits tell me whether the work is any good. I don't review the code my agents write; I check what it does, and the work reaches me through GitHub. Every session that changes product code gets its own branch, a separate line of changes that leaves the main version alone until it's merged, and its own copy of the code in its own folder, so two sessions never edit the same files. The branch goes up to GitHub before any work starts, so no work lives only on my computer, and nothing merges into the main version until I say so.
The first check is the other agents. Seven of the eleven build: coordination, architecture, coding, strategy, ops, writing and research. The other four exist to break what those seven make, one each for web apps, cloud infrastructure, AI models and cryptography. Before an edit to high-impact product code, a hook holds it until the session has brought in at least one other agent, and before a big decision one or two agents from other areas weigh in. The hook can make sure a second opinion was asked for, but whether the opinion was any good is back to probability.
For a whole project there's the round-table audit. Six reviews run at the same time, covering how the backend connects to what users see, data integrity, security, infrastructure, performance, and usability and accessibility. They come back as one report that puts findings spanning more than one area first, since those are the most dangerous. The audit only reports, and I decide what gets fixed. For an open decision there's a round-table discussion, a timed session where the agents argue from their own areas, and the summary has to say where they disagreed and whether it got resolved.
The check I lean on hardest is tests. I decide what something should do, and that gets written as tests before the code exists. To me they're pass criteria for the whole feature working end to end, the way a person would use it, backed by full test suites and QA checks that include looking at the result and using it before anything gets called done. They're also the deterministic part of review: the same checks give the same answer on every run, whatever any agent thinks of its own work.
A round-table audit taught me what "end to end" has to include. A new version of one of my products had passed its tests in development and been marked shipped, but in production it sat behind a switch nobody had turned on, so every real run used the old version. Passing tests had only proved the new version worked where it was switched on. The switch is gone now, and so is the old version.
Before you buy an agent
Ask the vendor which of its limits are enforced in code and which are instructions in a prompt. Then ask what waits for a person's approval, what the agent's credentials can reach on day one, and how long those credentials last. If they can't answer the first question, assume every limit only asks.
If you'd rather not keep asking those questions yourself after launch, it's part of what a Fractional AI Lead for Operations does.
Services
- Is your company paying for AI that hasn't changed how the work gets done?
- Is your bot handing more conversations to agents than the vendor promised?
- Is your AI wish list growing faster than anyone has time to build it?
- Are you paying for more AI seats than your team actually uses?
- Is the bot you launched last quarter still giving last quarter's answers?
Is your company paying for AI that hasn't changed how the work gets done?