Git Was Built for Humans but AI Is Writing My Code Now
Git Was Built for Humans but AI Is Writing My Code Now
Git assumes every commit was written by a person who understands what changed and why. That assumption breaks when an AI agent generates 47 commits in an hour across three worktrees. Good luck doing a meaningful git bisect on that.
The Rollback Problem
When a human writes code, each commit roughly maps to an intent - "fix the login bug" or "add the export feature." When an AI agent writes code, commits map to tool calls. The agent might make 12 commits to implement one feature, with intermediate states that were never meant to be standalone.
Rolling back to "before the agent touched authentication" becomes an archaeology exercise. You are reading diffs of code you never wrote, trying to figure out which commits belong to which logical change.
Intent-Based Rollback
What we actually need is a layer above git that tracks intent, not just diffs. Something like - "the agent worked on task X, here are all the commits associated with that task, roll them all back as a unit."
Some teams solve this with branch-per-task workflows, but that breaks down with parallel agents sharing a codebase. The branches conflict, the merges get messy, and you end up spending more time on git management than on the actual work.
What Actually Works Today
The most practical approach right now is disciplined use of claude-md files that log what each agent session did, combined with tagged commits that reference task IDs. It is not elegant, but it gives you enough metadata to reconstruct intent after the fact.
The deeper issue is that our entire version control mental model assumes sequential, human-paced development. AI agents work in parallel, at machine speed, and git was never designed for that.
Fazm is an open source macOS AI agent. Open source on GitHub.