I've been doing a lot of vibe coding with Claude Code and Codex, and I keep running into the same problem: I ask for one small change, then later discover that the agent modified several files or areas I didn't expect. By then, I can't always remember exactly what changed or when. Besides using Git, are there good ways to maintain an AI coding activity log or otherwise keep track of its work, or is this simply part of the risk of agent-assisted development?
4 Answers
Keep the agent from making unreviewed changes whenever possible. Ask it to describe its plan and list the files it expects to modify before starting, disable automatic edit approval if your tool supports that, and require a summary of every changed file afterward. If it starts touching unrelated areas, tighten the task or prompt.
Use isolated Git worktrees for each task. The agent can make as many changes as it wants in the temporary directory, while your main checkout stays untouched. After reviewing the result, merge the work, copy over only the useful changes, or delete the worktree entirely.
Git is still the most reliable answer. Make a commit before each AI task, use a separate branch or worktree for experiments, and review the diff before committing the result. Keeping tasks small and making atomic commits makes it easy to identify and undo anything unexpected.
A generated changelog can be useful alongside Git. I have the agent produce a short summary and a more technical record of the files, decisions, and behavior it changed. Some teams also keep architectural decision records or developer notes in the repository, but those documents supplement version control rather than replace it.

The important part is actually reviewing the diff and staging carefully. Don’t blindly use `git add -A`; explicitly stage the files you intended to change, then inspect `git diff --staged` so the commit contains exactly what you reviewed.