Back to Coding

Should You Let an Assistant Edit Files Directly?

Should You Let an Assistant Edit Files Directly?
AI Tutorials Team 14 April 2026

Every serious assistant can now apply changes rather than suggest them. It removes the tedious part, which is copying code between a panel and a file, and it also removes the moment where you read what you were about to accept.

What is the actual risk?

Not that the tool does something malicious. It is that a change is applied, appears to work, and contains something you would have questioned if you had read it. The absence of a review step is the risk rather than the editing itself.

What makes it safe?

Version control with a clean starting state. If everything is committed before the tool runs, the diff afterwards is exactly what it did, and reviewing that diff is straightforward.

Running it over uncommitted work makes the change impossible to separate from your own, which is the single most common way this goes wrong.

The boundary worth drawing is whether an action can be undone with a version control command. Everything inside that line is low consequence; everything outside it deserves a prompt regardless of how routine it seems.

What should require approval?

  • Deleting files. Always.
  • Running commands. Anything beyond reading.
  • Installing packages. Since invented names are a real risk.
  • Anything touching version control. Committing, pushing, branching.
  • Configuration and infrastructure files. Where effects are broad.
  • Anything outside the project directory.

What is safe to allow freely?

Reading files, and editing source files inside the project when everything is committed. Those two cover most of the benefit and carry the least consequence, since both are visible in a diff and reversible.

Approval settings are worth reviewing after any product update as well, since defaults occasionally become more permissive without anybody noticing.

What about running tests?

Usually worth allowing, since the feedback loop is where agentic tools get most of their capability, and a test command is normally harmless. The caveat is test suites that touch real services or real data, which some do.

Reviewing at the end of a task rather than during it also produces a better reading, since the diff is coherent by then rather than a sequence of intermediate states.

What is the review discipline?

Read the diff before committing, every time, at the same level of attention you would give a colleague's change. This sounds obvious and it is the step that erodes first, particularly when the change is large and appears to work.

Show me the plan before changing anything. Make the changes. Then list every file you touched with a one-line summary of what changed in each.

Does approving each edit individually help?

For a few edits, yes. For a task producing thirty, no: people approve rapidly and stop reading by the eighth, which is worse than reviewing the whole diff carefully afterwards.

Batching the review is more honest than a stream of approvals nobody evaluates.

What about anything that leaves your machine?

Keep it manual. Pushing, deploying, calling external services and contacting anything with credentials attached all have consequences that cannot be reverted with a version control command, which is the relevant distinction.

What happens when it edits the wrong thing?

Usually nothing serious, provided the starting state was committed, because reverting is one command. That is the entire argument for the discipline: it converts a category of alarming events into a minor inconvenience.

Where it does become serious is anything outside version control. Configuration in a home directory, files in another project, or anything already pushed are all outside the safety net, which is why the approval boundary should follow that line rather than any judgement about how risky an operation sounds.

What is the sensible default?

Free rein inside a committed working directory, approval for anything destructive or external, and a genuine read of the diff before it becomes a commit. That arrangement keeps almost all of the time saving and none of the situations people write about afterwards.