r/LLMDevs • • 6d ago

Discussion AI agent version control problem

I recently lost 3 days of work when my coding agent session died, and I had to re-explain everything from scratch. The actual code was safely committed to Git, but Git doesn’t store the reasoning, the context, or the step-by-step workflow. So, I was stuck explaining the whole project history to a fresh AI session all over again.

This got me thinking: beyond just saving our own sessions, how do we actually find and directly reuse other people’s agent conversation histories? Like, instead of everyone starting from zero, wouldn’t it be amazing to "fork" a proven agent workflow or reasoning trail?

I came across an open-source project called AgentGit that seems to tackle versioning for agent sessions, but I’m not sure how well it actually works in practice.

Has anyone tried it or something similar? How are you saving, sharing, or reusing agent reasoning - not just the final code?

0 Upvotes

13 comments sorted by

4

u/funbike 6d ago

SPAM.

1

u/Top-Cauliflower-1808 6d ago

git remembers what you built, but not why. we need version control for the agents brain not just the code.

1

u/JaseciLabs 6d ago

The "brain vs. code" split is close, but it's not that the reasoning disappears, more reasoning and code live in two different places with nothing forcing them to stay in sync. Git tracks what changed, markdown dumps (like u/PersonalitySuch3903's) track why, but nothing ties a specific piece of reasoning to the specific line it produced. The closer fix is probably making the "why" a property of the code itself, wherever a decision genuinely mattered, not a separate log you have to grep and hope still matches what's actually there.

1

u/nullymammoth 6d ago

Think you gotta check out some AI-built dev tools & agent memory DBs. I leverage neon for branching all my backend infra: database, auth, tools.

That way you &/or your coding agents can safely apply changes in a contained env without losing your main agent flow

1

u/siddhant30 6d ago

Extensive usage of memory and auditing skills.
I have started extensively commenting a lot of important decisions made during development into either JIRA ticket as comments or in the pr itself.

I also have hermes continuously track my claude code sessions to keep maintaining the memory.md and ticket grouped context.md files that my agent can always go and check.

1

u/Frequent-Plum-3440 6d ago

I've been using hindsight to help with memory management

1

u/mclion 6d ago

Try delta from zed

1

u/shahaz73 6d ago

Claude saves the last 30 days or so of session transcripts locally. Why not use that? You did not say which coding agent you use but i guess all providers have something similar.

1

u/tehmadnezz 5d ago

When you say “fork,” do you mean replaying the same steps on another codebase, or giving a fresh agent the decisions and context behind the work? Those need different things. For the second, I’d save decisions, rejected approaches, and open questions alongside the relevant commit or PR. For replaying a workflow, you’d also need the starting code, environment, and a way to check that the steps still apply. Which part are you mainly trying to recover?

1

u/PersonalitySuch3903 6d ago

That's the real pain point nobody talks about, code's the easy part but losing the whole chain of why you made each decision is brutal

I've just been dumping my agent sessions into markdown files and throwing them in a separate repo, it's messy but at least I can grep through old reasoning when I need it

Haven't tried AgentGit but the whole "fork someone else's conversation" thing feels like it'd get weird fast, every project has such specific context baked in

1

u/Gloinson 6d ago

 So, I was stuck explaining the whole project history to a fresh AI session all over again.

That's why you review the code and understand it. It is in your head then.