ML.ai

Nothing changes on disk until you say so

Every edit and command goes through one approval gate. You see the real diff first, then allow it once, always, or deny it.

ML.ai

Explorer

app/auth/login.tssession.tsMrotate.tsapi/me.tsmiddleware.tstests/session.test.tspackage.json

Found the refresh path. Updating the session helper now.

GreprefreshToken · 6 matches in app/auth

Fs.readapp/auth/session.ts

Fs.writeapp/auth/session.tspending

app/auth/session.ts2 lines changedlines 42-50

42export async function refresh(token) {

43 if (!token) return null;

44 if (!token?.exp) throw new Error('expired');

45 return await rotate(token);

46}

47

48async function rotate(token) {

49 const next = await issue(token.sub);

50 return next;

Permission requiredFs.write app/auth/session.ts

Who permission prompts are for

Developers and teams who need full control over what an AI coding agent writes to disk, with reviewable diffs before every change.

  • Developers who review every change

    See the real diff before any edit lands, then choose Allow, Always or Deny.

  • Teams with sensitive code paths

    Keep migrations, auth and config on Allow so each change gets a fresh look.

  • Anyone tuning approval noise

    Use Always for routine edits so the prompts that remain are worth reading.

How it works

Each edit and command stops at one gate. You see the real diff, choose Allow, Always or Deny, and a denial goes back to the model with your reason.

Answer every change with Allow, Always or Deny

Allow lets this one change through. Always stops asking for that kind of change. Deny blocks it and sends your reason back to the model.

See the real diff before anything is written

The prompt opens the exact change the agent wants to make, file by file, so what you approve is the code that will land on disk.

Compare what you asked for with what it wrote

The request is one line and the diff is what lands. Reading both side by side is how you catch a change that goes further than you meant.

Deny a change and the model hears why

When you deny, your reason is passed back to the model, so the next attempt works around it instead of proposing the same edit again.

Choosing between Allow and Always

Allow or Deny

Allow lets one change through and asks again next time. Deny blocks it and sends your reason to the model. Use these while you learn how the agent works in a repo.

Always

Always approves that kind of change from then on, which saves clicks on routine edits. Keep it for changes you would approve every time and off paths you want to review.

How to use Always without losing control

Always saves time, and it also widens what runs without you. Here is a sensible way to use it.

1Start with Allow on a new repoApprove changes one at a time for the first few tasks so you learn what the agent tends to edit and run.
2Use Always for routine changesPick Always for edits you would approve every time, such as formatting fixes, and keep reviewing the rest.
3Keep sensitive paths on AllowMigrations, auth code and config are worth seeing every time, so answer those prompts one by one.
4Review your Always rules oftenCheck which Always rules you have set and remove any that cover more than you meant.

Common approval mistakes and fixes

Habits that make approval prompts work for you.

Approving without reading the diff

After a dozen prompts it is easy to click Allow on reflex and miss the one change that went too far.

How ML.ai handles it

Reads never prompt, so what reaches you is an edit or a riskier command, shown as its real diff or the command itself.

Always rules that cover too much

A broad Always set early in a project keeps approving changes long after you would have wanted to see them.

How ML.ai handles it

Use Always only for routine changes and keep sensitive paths on Allow, so the risky edits still come to you one at a time.

Denials the agent ignores

Blocking a change without saying why often brings back the same edit on the next try, slightly reworded.

How ML.ai handles it

A denial is passed back to the model with your reason, so the next attempt can take it into account.

ML.ai
New sessionAutomationsReview

Sessions

Clean the workspace and rebuildRotate refresh tokens on use1hAdd rate limiting to /api/search6mUpgrade to React 192dFlaky checkout test3d

The agent proposes

$git statusRead&&rm -rf ~Irreversible deletion

ReadPromptRefuse

Earlier in this session

Command safety

How each shell command is classified by effect before it reaches a permission prompt.

ML.ai

Explorer

src/auth/registration.tssession.tsvalidate.tsapi/search.tstests/registration.test.tssession.test.tspackage.jsontsconfig.json

Fix the registration validation bug and run the relevant tests.

plan.md

Fix registration validation

  1. 1.Reproduce: an empty email passes signupSchema
  2. 2.Tighten email and password rules in src/auth/validate.ts
  3. 3.Add empty, whitespace and short password cases to tests
  4. 4.Run pnpm test registration
Edit refused in Plan modeInvestigate and describe the fix instead: switch to Build to apply it.

Ask ML.ai...

Plan mode

Get a plan first with edit and write tools denied, then switch to Build and approve changes one diff at a time.

FAQs

How do I revoke an Always rule I set by mistake?

Open the saved-permissions list, where every saved rule appears individually, and revoke that one on its own. The next matching change goes back to asking for Allow, Always or Deny.

Which changes need a prompt?

Every edit, and every command except reads. Reads run without asking, so prompts stay rare enough to read properly.

What does Always cover?

It approves that kind of change from then on, so keep it for routine edits and away from migrations, auth and config. In a Git repository the rule is scoped there; in a folder that is not a Git repository it is saved globally, across every non-git folder you open on that machine.

Does Plan mode change how prompts work?

Plan mode denies edit and write tools for that turn, so you get a plan back with no file writes to approve.

What does the prompt show for shell commands?

Shell commands have no diff, so the prompt shows the command itself after it has been classified by effect. Reads skip the prompt altogether.

Review every change before it reaches your disk

See the real diff, answer Allow, Always or Deny, and send your reason back to the model when you say no.