Recently, a patch broke one of my client portals.
Not a hypothetical. A real file, js/healing.js, on a live client system. The patch carried an invisible character, a stray carriage return, in the middle of a line of code. The browser could not parse the file. Five minutes later a user loaded the page and got an uncaught reference error, because the page could not find a display function that, as far as the browser was concerned, no longer existed.
Here is the part worth your attention.
The AI agent running inside that portal caught the error, read the actual source at the crash site, and wrote up what happened in plain English. It traced the failure back to the bad patch. It noted that a corrected file had already been synced a few minutes later, that the error fired exactly once, and that the routing code everyone would have blamed first was in fact fine.
Then it proposed no fix at all.
Its recommendation: no code change is needed, close this and monitor, reopen if it comes back on that page. The board flagged it for a human look and stopped.
The agent's name is PULSE. And the patch that broke the file was one of its own.
An AI that caused a problem, diagnosed the problem, and then declined to write more code into it. That restraint is the entire product. Everything else is plumbing.
1. What I Actually Built
Its sensors have been running for about two months across Linux servers I manage for clients. The healing layer on top of them is the new part. Internally it is the Portal Uptime & Live Self-healing Engine. PULSE, to give it a name.
It is not a monitoring dashboard. Monitoring tells you something broke. PULSE does five things in sequence:
- Sensors. A browser-side monitor rides along in every user session on the portal. Every error, failed request, frozen screen and slow page gets captured with context. Nothing breaks quietly, and nothing depends on a user filing a ticket.
- Triage. Signals land on a board, deduplicated, counted by occurrence and by affected user, and tagged to the page where they fired.
- Diagnosis. The agent pulls the live source code at the failure point and writes a root cause explanation in plain language, with a severity rating and a confidence rating. Not a stack trace. An explanation.
- The patch. For issues it is allowed to fix, it writes the actual patch and shows it to me.
- Ship It. I click one button. A backup is taken first, the patch applies, and the change syncs to the GitHub repository so the codebase never drifts from what is live.
Total AI spend across four recent diagnoses and fixes, running on Claude Fable 5: twenty four cents.
Nine signals scanned. Zero currently open. Four fixes shipped. Twenty four cents.
I want that number on the record, because most of the AI conversation right now happens at a scale of abstraction where nobody has to say what anything costs or whether it worked.
2. What It Is Allowed to Fix, and What It Is Not
Of every issue PULSE can diagnose, exactly one class is allowed to ship on a click. It is the class where PULSE has earned its seat at the engineering table.
It can take small code bugs from detection to fix. A missing check, a typo, a wrong field reference. You get the explanation, you get a ready patch, and you get a Ship It button.
It stops cold on everything else, for now.
| Class of issue | What PULSE hands you | Who acts |
|---|---|---|
| Small code bugs | The explanation, a ready patch and a Ship It button | You, with one click |
| Bigger logic bugs | The explanation. No patch. | A developer |
| Database, SQL, permissions | The explanation and the exact SQL that would fix it | A human runs it |
| Server, PHP, email, hosting | The explanation only | A developer |
| Slowness and performance | What is slow, and why | Structural work, almost always |
One class in. Four classes out. That ratio is not a sign of an immature system. It is the answer to the question every executive is actually asking, which is not "what can AI do" but "what can AI do here without costing me something I cannot get back."
The boundary is not a limitation I apologize for. It is the design.
A wrong code patch is reversible in one click. A wrong database change could destroy quote and invoice data with no undo. So the system physically cannot run SQL or modify the server, even if the model proposes it. The AI does not get to decide what it is allowed to do. That decision was made before the AI ever ran, and it is enforced in code, not in a prompt.
The rule: if it cannot be undone, it cannot be done. Reversibility decides what the AI may touch, not the model's confidence.
3. The Guardrails Are the Product
Everyone building agents right now is optimizing for capability. I spent most of my time on refusal.
- Every fix requires a signed-in human clicking Ship It. Nothing applies itself.
- Only the portal's own JavaScript files are patchable. Never PHP, never the database, never security config, never vendor libraries.
- The code being replaced must match the live file exactly once, or the patch is rejected outright. No fuzzy matching, no best guess.
- Patches are capped at forty lines. Anything bigger goes through the normal development workflow like a grown-up.
- A backup is taken before every change. If the backup fails, nothing is applied.
- Every apply and every rollback is journaled with who did it and when.
Read that list again and notice what it really is. It is not AI safety theater. It is the same set of controls you would put on a junior engineer with commit access in their first week. Scoped permissions. Small changes. Reversibility. An audit trail. A named human accountable for every action.
We already knew how to do this. We have known for thirty years. The novelty is not the governance model. The novelty is that the thing being governed now reads code and writes English at three in the morning for a fraction of a cent.
4. How a Signal Becomes a Fix
Here is the pipeline in a little more detail, because the details are where the safety lives. The most important fact about it fits in one table: the AI appears in exactly one step.
| Step | Where it runs | Does AI touch it? |
|---|---|---|
| Sensors | Every user's browser | No |
| Triage | The Healing Center page in the portal | No |
| Diagnosis | The server, which calls the model | Yes |
| Ship It | The server | No |
| Roll Back | The server | No |
Sensors in every session
A small script loads before anything else on the page, so it sees every request the portal makes. It records JavaScript errors with the file, line and stack, unhandled promise rejections, console errors, failed requests, requests slower than three seconds, page loads slower than four, and any freeze that locks the screen for more than 400 milliseconds.
It also knows how to stay out of the way. It logs each distinct problem once per session, caps itself at 40 events per session, batches its writes, and switches itself off if it cannot write. A monitor that breaks the app it is monitoring is worse than no monitor at all.
A diagnosis with a case file
When I click Diagnose, the server makes the call to the model, not the browser, so the API key never reaches a user's machine. The model gets the error, about 120 lines of the live source file around the failure point, and a case file: the last five commits that touched that file, the latest entries in the patch journal, and any other errors that fired within two minutes of this one, because one root cause often shows up as several symptoms.
The answer comes back in a strict structure: severity, confidence, a plain-English diagnosis, a fix description, an optional patch, and one flag that matters more than it looks, already_resolved. If the evidence says the error fired once, right after a change that has since been corrected, and never came back, the model is told to say so and propose nothing. That flag is why PULSE stood down on July 15 instead of patching a ghost.
Ship It is deliberately dumb
The moment of applying a patch involves no AI at all. The server confirms that the target is one of the portal's own JavaScript files, that the code being replaced appears exactly once, that the patch is forty lines or fewer, and that it contains no hidden control characters. It copies the file to a backup, writes the new version to a temporary file, and swaps it into place in a single step, so a visitor never loads a half-written file. Then it journals who shipped what, and commits the change to GitHub.
That last step has its own guard. Before committing, the server checks that the copy in GitHub matches what was live before the patch. If a developer has pushed newer work in the meantime, PULSE commits nothing and flags the fix for a human to reconcile. It never overwrites someone else's work to keep its own records tidy.
5. Every Guardrail Is a Scar
None of those rules came from a whiteboard. Each one exists because something actually went wrong, and several were written the same afternoon as the incident at the top of this article.
- The invisible character. The bad patch from the opening story carried a stray carriage return inside a string, an artifact of the model's structured output. Nothing about it looked wrong on screen. The fix was not a smarter model. It was a dumb rule: any patch containing a raw control character other than a tab or a normal line break is rejected before the file is touched.
- The wrong clock. Look at the diagnosis screenshot again. The header says the error fired at 3:47 PM EDT. The diagnosis says 7:47 PM. The model read the server's UTC timestamps and repeated them, exactly the kind of detail that confuses a business owner reading a report. Now every timestamp is converted to the business's time zone before the model ever sees it, and the model is told to write times the same way.
- Fixing ghosts. Errors that fired once around a deploy and never came back were getting "fixed" anyway, with patches nobody needed. That is where the case file and the already-resolved flag came from.
- One cause, many symptoms. A single broken file can throw three different errors on three pages. Sending the model the other errors from the same two-minute window lets it see one root cause instead of writing three patches.
- The repo racing production. PULSE can commit to GitHub at any moment, so my deploy script now refuses to run if my local copy is behind, and PULSE refuses to commit if GitHub has moved ahead of production. Neither side is allowed to overwrite the other.
That is the pattern I trust. When something breaks, the answer is a mechanical rule the model cannot talk its way around, not a longer prompt.
6. Where We Are Today
Here is my honest read after running this on production systems that clients pay for.
AI is already excellent at the part nobody wanted to do. Not the writing of code. The reading of it at 2 AM to figure out which of forty files caused a symptom on one page for one user. Diagnosis is drudgery. Diagnosis is where the hours go. Handing that to a model is not a moonshot. It is the single highest-return move available to most technical teams right now, and almost nobody is doing it.
AI is not ready to be trusted uniformly. The mistake in the market is treating autonomy as a single switch. It is not a switch. It is a dial, and it has to be set separately for every class of action, based on what happens when the model is wrong. My agent has meaningful autonomy over a forty-line JavaScript patch and exactly zero autonomy over a database. Same model. Same day. Different blast radius.
The human in the loop is not a training wheel. I keep seeing "human in the loop" framed as a temporary embarrassment we will outgrow once the models get good enough. That gets it backwards. My approval is not compensating for the model's weakness. It is providing something the model structurally cannot: accountability. When a fix ships to a client system, a named person owns it. No amount of model capability creates that. Capability and accountability are different axes, and only one of them scales with parameters.
7. Where We Go Tomorrow
The roadmap from here is not "remove the human." It is "earn the room."
Verified fixes. Before I ever see a patch, it gets run against the test suite. The model does not just propose, it proves. This is the next thing I am building, and it changes the character of the approval, because I stop asking "is this right" and start asking "do I want this."
Earned autonomy. Eventually, and only for the most trivial, lowest-risk classes of issue, after a documented track record, the system applies fixes without me. With a kill switch. Notice how narrow that is. Not "the AI runs the portal." One boring category of bug, promoted to autonomy the way you promote a person: by having a history.
That is the actual future, and it is unglamorous. Trust gets granted in classes, not in bulk. It gets earned through a record, not asserted through a demo. And it stays revocable.
The version of AI that arrives on schedule is not the one that replaces the engineer. It is the one that shows up with a diagnosis, a proposed fix, a backup already taken, and the good sense to say "this one needs a human."
PULSE did that on July 15. The same day, it shipped a patch in seconds. On the fifth issue it stood down and told me to look at it myself.
I will take that trade every time.
8. Update: What Happened Next
Added November 2026. PULSE did not stay in one portal. Within a week of this article it was running in three, and two of them pushed on the ideas above.
The first slice of earned autonomy shipped three days later. In a second portal, PULSE gained a scheduled sweep that groups recent errors, diagnoses anything new, and ships a fix on its own only when the issue is rated low severity, the model's confidence is high, and every mechanical guardrail passes. Anything riskier still lands on the board for a human. It sits behind a kill switch that is off by default, a spend cap of one dollar per rolling 24 hours, and a rule that it never touches an issue a person has already claimed. Every fix it ships is still backed up, journaled, pushed to GitHub and reversible with one click. Turning it on is a decision made per portal, once the record supports it.
Model agnostic, in practice. A third deployment runs its diagnoses on Kimi K3 instead of Claude, behind the same guardrails. Porting it to a different model meant changing the API call. It did not mean changing the cage, which is the point: the model is replaceable, and the rules about what it may touch are the product.
I build and run AI systems end to end, from vectorization and vector stores through LLM query layers, REST endpoints and MCP servers. I have written about AI systems that argue before they decide and what 74 AI projects taught me about the mess underneath the magic. PULSE is the same lesson in production: the model is the easy part, and the boundaries are the work.
So here is my question for you. What are you letting your agents touch, and what are you not? If you want to talk through the answer for your own systems, take a look at how I build AI systems or start a conversation.
9. Frequently Asked Questions
Is PULSE fully autonomous?+
Not yet, and not by accident. In the original deployment every fix requires a human clicking Ship It. Autonomy is reserved for narrow, low-risk classes of issue, only after a proven track record, and only with a kill switch. A scheduled autopilot for low-severity fixes now exists in one portal, and it ships with its kill switch off.
What AI model is behind PULSE?+
Frontier reasoning models sit behind the diagnosis step, but model choice is a routing decision, not an identity. PULSE is built to be model agnostic: it currently runs on Claude, has run on OpenAI models, one deployment runs on Kimi K3, and open-source models from labs around the world have been tested too. The interesting engineering is in the scoping, the backups and the exact-match requirement, not in the model.
What does PULSE cost to run?+
A few cents per diagnosis. Twenty four cents total across the nine signals it processed on its first deployment. Monitoring, triage, Ship It and rollback cost nothing. Diagnosis is the only paid step.
What happens if the AI is wrong?+
For code patches, one click rolls the file back to the backup taken before the change, and the rollback is journaled. That reversibility is exactly why database and server actions are excluded. There is no rollback for destroyed invoice data.
Could a self-healing agent like this work outside a client portal?+
Yes. The pattern is generic: capture real signals from real sessions, diagnose against the live source, propose a scoped and reversible change, require a named human to approve it, and sync the result back to the repository. The domain does not matter. The blast radius does.

