Why AI coding agents change files you didn't ask about

Two identical buttons. One instruction. Both of them gone. This is the story of every guardrail in Super Terminal, and each one exists because something went wrong first.

"Remove the login button."

Five minutes later the diff came back. Clean, well-formatted, nicely commented. Both login buttons were gone — the one in the navbar I meant, and the one in the mobile drawer I did not. The agent had also reformatted a component it passed through on the way, because the file didn't match the project's Prettier config and fixing that seemed helpful.

Nothing was broken, exactly. The tests still passed. It just wasn't what I asked for, and I only found out by reading every line of a diff I had hoped not to read. That is the part nobody warns you about: the tool is fast right up until you have to check all of it, every time, and then it is slower than doing it yourself.

Here is what I learned taking that apart, in the order I learned it.

Why does Claude Code change files I didn't ask it to?

AI coding agents act on the most likely reading of a request, and when a request is ambiguous the most likely reading is often wrong. Ask for one of two identical buttons to be removed and the agent has no way to know which one you meant, so it picks, or it removes both.

The word "just" is doing enormous work in "just remove the login button". In my head there was one button. In the repository there were two, plus a story file that rendered a third. The instruction was complete in my head and badly underspecified on disk, and no amount of model quality fixes that — the information genuinely wasn't in the prompt.

What made it click for me was reading the vendors' own documentation. Anthropic's docs describe CLAUDE.md as context, "not enforced configuration", and add that there is "no guarantee of strict compliance". Cursor's docs say rule contents are "included at the start of the model context". Both are describing the same thing: your rules are text added to a prompt, not settings a program obeys.

A rules file is a strongly worded suggestion. The industry spent two years arguing about which filename to put the suggestion in.

My AI assistant deleted the wrong element — how do I prevent that?

The fix is to be asked before the edit rather than after. When a description matches more than one element, the honest answer is a question, not a guess.

So the first thing I built was a classifier that runs before the agent does. It parses the actual files — a real DOM and AST walk, not a regex over source text — and sorts each request into one of four bands. If a description resolves to exactly one thing, the run proceeds. If it resolves to several, the run stops and asks which one. If the action is destructive and ambiguous, it blocks outright rather than picking.

That last case is the two-button case. Deleting the wrong element is not the same class of mistake as renaming the wrong variable, and it deserves a different default.

How do I stop an AI coding agent from editing unrelated files?

Mark the paths that are off limits in a rules file, and check what actually changed after the run. The second half is the half people skip.

Asking nicely beforehand is not enough, for the reason above — instructions are context, and context gets partially followed. So Super Terminal reads the rules a project already has, applies them to whichever agent runs, and afterwards compares the files that changed against those rules, offering to restore anything that broke one. The check runs after the agent finishes and does not depend on the agent cooperating.

How do I stop an AI agent from doing more than I asked?

Two controls, one before and one after. Before the run, an ambiguous request gets a clarifying question instead of a guess. After it, the files that actually changed are checked against the project's rules, and anything that broke one can be restored.

Neither control is clever. That's deliberate. Every clever version I tried involved asking the model to police itself, and a model that reliably policed itself would not have removed both buttons.

How do I undo everything an AI coding agent just did?

Every Super Terminal run is backed up before it starts, so super-t revert restores the files an agent changed in one command.

super-t revert

Multi-step workflows are covered too: a chain that goes wrong at step three rolls back all three steps, not only the last one. I added that after losing an afternoon to a partial rollback that left the repo in a state neither the agent nor I could describe.

Then I switched editors, and lost all of it

Somewhere in month two I moved a project to Cursor for a week. Every rule I had written for Claude Code stayed exactly where it was, doing nothing, because it was in a file Cursor doesn't read.

How do I make Cursor follow the rules in my CLAUDE.md?

Cursor does not read CLAUDE.md. That file belongs to Claude Code, while Cursor reads its own instruction files. Rules written for one vendor are invisible to the other, and no error message tells you — the agent simply behaves like a new hire who never got the onboarding doc.

The ecosystem has partly solved this. In December 2025 the Linux Foundation formed the Agentic AI Foundation, with AGENTS.md contributed by OpenAI as a founding project. It's now read natively by roughly two dozen tools, Cursor among them. That is real progress and you should use it.

It is also not finished. Claude Code still reads CLAUDE.md and not AGENTS.md — Anthropic's documentation says so in as many words, and recommends a symlink or an @AGENTS.md import as the bridge. So the state of the art for "one rulebook" is currently a symlink you have to remember to create.

Can I use the same coding rules for Claude Code, Cursor and Codex?

Yes, with a layer that sits above all three. Each vendor reads only its own instruction file, so rules written for one are invisible to the others. Super Terminal reads every one of those files — CLAUDE.md, .cursorrules, AGENTS.md — and passes their combined contents to whichever agent is running.

super-t init

One rule, written once, followed by all of them. And to be clear about what this does and doesn't fix: portability means every agent now receives your rules. It does nothing at all to make them follow the rules. Those are separate problems, and the industry has been loudly solving the easy one.

What I tried before building anything

I want to be fair to the alternatives here, because I used most of them first and some are genuinely good.

The vendors' own multi-agent features. Claude Code has subagents and agent teams. Codex has multi-agent modes and per-task worktrees. These are well built and getting better. They are also, by construction, intra-vendor: Claude reviews Claude, Codex reviews Codex. A vendor has no commercial reason to route your work to a competitor, so this is not an oversight they will fix.

Multi-agent dashboards. There is a healthy crop of these now — Conductor, Claude Squad, Vibe Kanban, parallel-code and others. They run several agents side by side in git worktrees and give you a view of what each is doing. If your problem is "I want four agents working at once", they solve it well.

My problem wasn't throughput. As far as I've been able to tell, none of them enforce your project's standards, verify what came back, or make rules portable between vendors. They're process managers — very useful ones — but the thing I needed sat one layer up.

Vendor multi-agentMulti-agent dashboardsSuper Terminal
Rules travel between vendorsNo — own file onlyNot their jobReads all of them
Asks before an ambiguous editNoNoBlocks and asks
Checks the result against rulesNoNoAfter every run
Reviewer from a different vendorStructurally can'tNoBy design
Undo the whole runGit, manuallyPer worktreeOne command
Runs several agents at onceYesYes, wellNot the focus

That last row is not a typo. Parallelism is crowded and the vendors will win it. The interesting ground is the part that structurally requires neutrality.

The thing that actually changed my hit rate

Everything above reduces damage. Only one change made the output meaningfully better, and it's the one I'd keep if I had to throw the rest away.

How can I have one AI review another AI's code?

Run them through a layer neither vendor owns. Super Terminal has one agent write the change and a different vendor's agent review it against the project's rules, then reports what it found in plain English.

super-t review codex --always

The reviewer runs read-only, and is verified read-only afterwards, because a reviewer that can edit is not a reviewer. Separation of duties is not a new idea — every engineering org already refuses to let the same person write and approve a change. We just stopped applying it the moment the author became a model.

Why a different vendor rather than a second instance of the same one: a checker that shares the author's blind spots and the author's reading of your rules is not much of a check. When Claude misreads an instruction, Claude re-reading it tends to misread it the same way. ChatGPT reading it brings a different prior. That difference is the entire value, and no single vendor can offer it.

An AI marking its own homework isn't a review. It's a second opinion from the same opinion.

Is there a tool that checks AI-generated code against my project's rules?

Super Terminal checks the files an agent actually changed against the rules in your repository once the run finishes, whichever agent produced them, and offers to restore anything that broke a rule. The check is mechanical and vendor-independent: it compares what changed to what your rules allow, rather than asking the model whether it behaved.

How do I verify an AI coding agent met the ticket's requirements?

Pull the acceptance criteria out of the ticket and judge each one separately. A single "looks good to me" over a whole ticket hides the one requirement that got missed.

Super Terminal reads a ticket from GitHub Issues, Linear or Jira, finds its acceptance criteria, and has a second AI mark each one met, not met, or unknown — then posts that summary back to the ticket if you approve it.

  Acceptance criteria — 1 of 2 met
    ✓ 1. PayPal button appears next to card payment
    ✗ 2. Failed payment shows an error message — error state not implemented

"1 of 2" is a more useful sentence than any confidence score I've seen a model produce. Whoever wrote the ticket can read it without reading the diff.

The rest, briefly

Can I run the same task through Claude Code and Cursor and compare?

Yes. super-t compare "task" runs one task through every connected agent so you can keep the best result, rather than picking a vendor before seeing the work. I use this less often than I expected, but when a task is genuinely ambiguous in approach rather than in target, seeing two solutions side by side beats arguing with one.

How do I chain multiple AI coding agents into one workflow?

super-t flow runs a multi-step task where each step names its own agent and hands its output to the next, so one command can audit with one vendor, fix with another, and review with a third.

super-t flow "audit auth with claude,
              then fix the findings with cursor,
              then review the diff with codex"

How do I share coding standards across a team that uses AI agents?

Keep the standards in the repository, so everyone gets them on git pull and no server or account is involved. Super Terminal's team mode does exactly that: only admins can change the shared rules, and anyone else opens a pull request, the same way every other change gets approved.

The failure mode this avoids is the one where standards live in someone's editor config and arrive by osmosis. A rule that isn't in the repo isn't a team rule; it's a personal preference with good PR.

Two questions I get asked immediately

Does Super Terminal need its own API key?

No. Super Terminal uses the Claude, Cursor or ChatGPT subscription you already have, and never asks for a separate API key. There is no model inside it — adding one would mean charging you twice for the same token.

Is Super Terminal open source?

Super Terminal is source-available, not open source. The full source is public and readable, the licence permits any use including commercial work, and each release becomes MIT two years after it ships. The only restriction is selling a competing product built from it.

I'm spelling that out because "open source" is a term with a definition, and a developer will check the LICENSE file within a minute of caring. Being caught fudging it costs more than the honest version ever would.

Where this leaves things

The agents are good and getting better. The gap is not intelligence — it's that a rules file is context rather than configuration, and context gets partially followed. Every guardrail above exists because that gap produced a specific bad afternoon.

None of this makes an agent careful. It makes an agent's carelessness visible before you've merged it, and reversible after. On current evidence that's the honest ceiling, and it turns out to be enough to stop reading every line of every diff.

npm install -g super-t

Requires Node.js 20 or later. Works with the AI you already have.

← All posts