One of my agents asked for a lock on a machine while a measurement was running. The lock refused the request. The agent went ahead and started its command anyway.
The lock and the command had separate entry points. I changed the interface so that the lock runs the command itself, and only after it has been acquired. The same refusal now leaves the machine alone. That repair changed how I decide where a safeguard belongs.
Six places to keep a lesson
I use the constraint stack to describe the ordered layers that bound what an agent can do: structure, static checks, rules and skills, authorization at the act, independent review and dynamic verification.
Most of these will be familiar to anyone who has shipped software. What I want to make visible is the moment an agent goes from preparing work to acting on someone’s behalf. In the diagram, start at the bottom with the choices I make when building the system. The copper band marks the point where a specific action needs authorization.
- 6 Dynamic verification
- What did the running system actually do?
- 5 Independent review
- Did someone other than the implementer check the result?
- 3 Rules and skills
- Does the agent know which procedure to follow?
- 2 Static checks
- Can a check catch the error before execution?
- 1 Structure
- Can this action happen at all?
When an agent acts in my name
An agent can draft a message, check the address and show me exactly what the recipient will see. All of that can go well while one question remains open. Who authorized the agent to send it?
For work in my own environment I put standing permissions in writing. They cover particular kinds of actions and reserve others for me. When an agent is about to act in my name, it records the proposed action and the permission that covers it. If it cannot establish that permission, it stops. After the attempt, it records the outcome. Those two entries form the audit trail. I can go back to the decision itself, including an authorized action that ultimately failed.
This matters especially when a tool already has the credentials it needs. A successful test can establish that the tool can send a message. Permission to send this message belongs at the point of sending.
What the confirmation missed
In a university admissions workflow, a family can give two names in the same conversation. Admissions defined which name belonged in the applicant’s record. To make that rule testable, I built the Agent Testing Center on top of a colleague’s issue-tracking tool. It brings the conversation, tool calls, timing and issue report together for each turn.
In the public simulation the family says Emilia. The agent confirms the registration. One tool reads Emilia, but the next one saves Emilio. QA can point Engineering to the exact turn. Engineering fixes the handoff, then QA repeats the scenario, opens the saved record and records the verdict. The fictional name and simulated timings make the example shareable. You can try both runs in the guided demo, in Spanish.
The two upper layers do different work here. Running the scenario produces evidence of what the system wrote. A person other than the implementer compares that evidence with the rule Admissions set. Both happen after the test conversation and can inform a separate decision about releasing a version. The university engineering case explains where these checks fit.
When I move a lesson down
In a shared repository, one of two concurrent sessions committed files the other had staged. I wrote a rule requiring each commit to name its paths. That is the third layer. Someone still has to follow the rule.
On another project, all my local checks passed and the site still failed to deploy. A file path assembled at runtime had pulled an entire directory into a single function. I added a size check to the release process. This time the build itself could tell me when the problem returned. With the lock I could go one step further and remove the path that ran the command without permission to use the machine.
Why spend engineering time on those changes? In my study of agent memory, I tracked 157 saved files, each with at least 30 days of follow-up and ten eligible sessions on the same project. Agents explicitly reopened just two through the read tool I measured. The instrument could not see information recalled from an index or supplied in a reminder. That distinction matters when deciding how much protection a written note buys.
What I ask of a guard
I once had a guard that rejected an operation when a counter crossed a limit. An earlier step dropped the counter, so the guard always saw zero. Its tests passed. The test I needed was one that sent a value across the boundary where the information had been lost.
A structural change also has a cost. If the policy is still changing, a written rule can be easier to revise. Before turning it into a hard limit I want to know who owns the decision, which real failure it covers, and what would justify taking it out.
The six layers are a way to make those choices explicit. Whether systems using all six improve faster is still an open question. For the machine lock, I can answer a narrower one with confidence. If the next agent misses the refusal, can its command still start?

