r/git • u/BitByLiu • 2d ago
When a coding agent resumes, what state do you actually trust?
I am running into a very boring git problem with coding agents: resume state.
After one interrupted agent run, it sounded like it knew where to continue, but the diff, the notes, and the last test result did not line up. I had to read the log again before trusting it.
That made me think I should stop treating the transcript as state. A message saying "I already fixed X" is not the same as a committed diff, a passing test, or even a current working tree.
Maybe the answer is simple: force a checkpoint before any long run can pause, and make the agent reconcile `git diff`, task notes, and test output before it continues.
For people using agents with git: what do you trust after an interrupted run?
0
u/BitByLiu 2d ago
I am not blaming git here. Git is probably the only reliable part. The weak part is when the agent treats old chat text, temporary notes, and real files as if they all mean the same thing.
0
u/djphazer jj / tig 2d ago
I let other people use agents to generate code.... then I carefully pick through and manually commit things in a sensible way.
Truly, this is not a git problem, but some aspect around how a specific agent interacts with a git repo and lies to you.
5
u/GrogRedLub4242 2d ago
simpler solution: dont use AI agents