Do you just let your AI agent read the git log to catch up on changes?

by•

Project files usually explain what an app does, but they don't really tell the AI what actually changed since yesterday.

I'm trying to figure out the best way to give an agent context on recent updates without feeding it a massive wall of text every time.

16 views

Add a comment

Replies

Best

I'd have the agent leave a short note at the end of each session: what changed, what's still open, and the next command to run. Start the next session with that note plus `git status` and the recent diff; the commit log rarely says why the work stopped.

Honestly, I'm a bit surprised myself at how well it works. Here's the setup:

A global every project inherits, plus one per project.

A memory folder per project. The agent writes down what I corrected and why, anything it changed in production, incidents and their causes, and anything that took over 30 minutes to figure out. Only the index loads at the start, one line per memory.

A worklog saved automatically every day, so nobody has to remember to write it.

A session card saved automatically, so if a session hangs, the next one picks up from there.

93 incident notes, each linked from the rule it created.

So the next session never reads the git log. It reads what mattered.

The git log tells it what changed, but rarely why, and the why is what the next session needs. My rule: when the agent learns something that isn't obvious, a vendor quirk, a trap in the toolchain, a decision and its reason, it writes it into the notes file for that area at that moment. Not only in the commit message, where nobody reads it again. Commits stay small and get pushed as soon as a piece is done, so "git log" plus "git status" is enough for what happened, and the notes carry the reasons. One more reason I like that: several sessions work in my repo at once, and status shows changes that belong to someone else, which a log never would.