See context for a code change
git blame tells you which commit last changed a line. gage blame tells you
which tool call wrote it, and in which session. From there you open the session
at the prompt that led to the edit and read what was asked, what your agent
reasoned, and what it changed. You do not search for the session. You start
from the line.
To ask your agent the same thing in conversation, see Recall code decisions and reasoning.
Before you start
Install Gage and run gage init. See Quick start. The file must
be in a Git repository, because Gage uses each line’s commit to narrow the
search for the tool call.
Steps
-
Run
gage blameon the file. Use-lto select lines. -
Read the output. Each line of the file is shown with the session that wrote it, the lines of that session to read, and the time of the tool call.
113509cdis the session.432-1113is the part of the session that runs from your prompt to the tool call that wrote the line. A-means that no session wrote the line. -
Open the session at those lines. Copy the first column as it is.
The view opens at your prompt. Read forward to the tool call.
Find the tool call itself
Add --json to get the ID and the name of the tool call for each line.
Sessions that are gone
gage blame reads the sessions your coding agent keeps on disk. When your
coding agent has deleted a session, read the copies in the Gage store:
See gage blame for every option.