The Diff Is the Evidence
An agent finishes a task and reports back in one sentence — confident, tidy, done. It reads like a summary of work you watched happen. It’s closer to a claim, generated by the same process that did the work and checked against nothing.
The actual record lives elsewhere: in the diff, the exact lines that changed between two points in your history. Nobody wrote it by hand, and it came out of a program with no stake in whether you’re satisfied. The gap between what an agent tells you and what the diff shows is what this post is about.
Start Clean, Check Before You Keep It
Turn an agent loose on a real task and it will touch more of your codebase, faster, than you would working alone — forty files changed in ninety seconds isn’t unusual, followed by a tidy sentence like “updated the export flow, tests pass.” That sentence can be true and still leave thirty-nine files you haven’t looked at.
The habit that closes the gap: commit before you start the agent, and commit again only after you’ve reviewed what changed. Run git status to see what moved, git diff to see exactly what changed line by line, decide, then commit or discard. Each run then sits between two points you personally verified, not two points you were told about.
Skipping the diff because the summary already sounds complete is the most common way this breaks down — the summary was generated by the same tool you’re trying to check, so treating it as sufficient evidence is circular. An oversized commit mixing correct and incorrect agent edits, with no seam to split them apart later, costs far more to untangle than committing often ever costs to produce.
Write the Commit Message for Whoever Reads It Next
A commit records what changed. The message is the only place that records why, worth writing for a reader who wasn’t in the room — three weeks from now, that’s usually you, and increasingly it’s an agent too.
Coding agents read your commit history before touching a project they don’t know, so that log doubles as onboarding material. A history of “fix,” “wip,” and “update stuff” hands it nothing to work from; a message that states what changed and why gives it an actual starting point.
Decide What Never Gets Committed
There’s a second decision buried inside “what goes into this commit,” and it’s the one you can’t undo later: what should never enter the history at all. Anything that grants access on its own — a password, an API key, a token, usually sitting in a file like .env — belongs on that list before your first commit, not after.
Git’s own documentation on ignoring files covers the syntax, and GitHub maintains a collection of starter templates for most languages, so there’s rarely a reason to write one from scratch. I’ve never met anyone who has the node_modules pattern memorized, and I don’t think less of them for it.
The order matters because of what happens if you get it backwards. Deleting a committed secret doesn’t remove it from history — every prior snapshot is still reachable, including the one where the key sat in plain text. That’s the same permanence that makes git trustworthy for recovering old work, working against you here. The fix isn’t deleting the file; it’s rotating the secret.
Agents make this sharper, not different. An agent reads your whole working directory, so a credentials file sitting in the project folder is in its field of view whether you meant it to be or not, and may get repeated back to you in a summary unflagged. Ignoring the file keeps it out of history; keeping credentials outside the project directory keeps them out of the agent’s context entirely.
Why This Is the Part We Teach
git status and git diff take an afternoon to learn. Knowing to run them every time, including on the runs that feel routine, is judgment — and that doesn’t show up in a man page.
That’s the gap our developer training at Imagile is built around. The commands are easy to pick up; treating an agent’s account of its own work as something to verify, not something to accept, is the habit that protects you. The diff still records what happened, same as always. Agents just make it easier to skip checking it, especially when the summary sounds so sure of itself.