Here's the problem
A session with an AI coding agent evaporates the moment it ends. The decisions you made that day, where you got stuck, how you got unstuck, even the "let's do it this way next time" resolution — all of it.
Keeping the chat log doesn't really help. Tens of thousands of tokens of raw transcript aren't searchable and never get read again.
/agent-memory-log is a slash command that solves this. It summarizes a session into a structured markdown note and files it into an Obsidian-based AgentMemory vault.
What it keeps
It doesn't dump the raw log. It sorts things by what kind of knowing they are, which is why the note sections are fixed.
- Work summary — one to three sentences on what happened
- Changed files — what was actually touched
- Key decisions — why that approach was chosen
- Where I got stuck / how it resolved — what debugging produced
- What I learned — knowledge to hand to the next session
- Rule candidates for next time — things worth turning into habits
The reason for fixing the sections is simple. When you later sweep across many session notes mechanically (a digest job, a promotion pipeline), you need to predict where things are. If the shape changes every time, neither people nor tools can read it.
What I paid attention to in the design
Saving several times on the same day
The note path is 10-sessions/claude/{date}-claude-{project}.md. So what happens if you save twice or three times for the same project in one day?
The CLI leaves existing files completely alone and creates a new one with a -2, -3 suffix. It used to handle this by temporarily moving the existing note aside and restoring it afterward — and if that ever failed halfway, the note was gone. That can't happen now.
Why I dropped automatic hook saving
At first it saved automatically when a session ended. Seemed convenient.
In practice, not every session is worth recording. A session where I fixed one typo, a session where I only read files — all of them became notes, and the vault filled up with junk fast. Finding the notes that actually mattered got harder.
So now it runs only when I ask for it.
Where it sits in the pipeline
This command is the first stage of a [record → knowledge → writing] flow.
The session notes and daily TILs collected here become the input to the next stage, /til-to-knowledge. That's where project-specific circumstances get stripped out and the material is promoted into knowledge that holds anywhere.
What I took away
The value of a note-taking system is decided by "how likely it is to be read again," not by "how cheap it is to write."
Fixing the structure, defending against collisions, refusing to generate junk — all three were devices for raising the odds of a second read. No matter how diligently you write, a note that never gets read again is the same as one you never wrote.