Split out of #693, which asks where the journal lives. This asks the smaller question underneath it: can a reader tell?
Context
session_start names the run, the project, the tool and the vendor session. It does not name the worktree, so two sessions from two worktrees of one repository are indistinguishable in the journal.
Today that is hidden, because each worktree keeps its own journal — a report simply never meets the other one's sessions.
Why it is worth doing whichever way #693 goes
- Journal stays per worktree: the field is what lets a reader gather several journals and still tell them apart.
- Journal becomes shared: the field is what stops one repository's sessions collapsing into an undifferentiated pile.
Either way it is one field on a line already written, and it makes "what did this branch cost" answerable without deciding anything else first.
Expected
session_start carries the worktree it ran in, taken from git rather than from an environment variable — an agent runner's own variable names its concept, not the repository's.
git rev-parse --show-toplevel the worktree
git rev-parse --git-common-dir the repository they share
A repository with no worktrees answers the same for both, which is the case to keep cheap.
Acceptance
Out of scope
Where the journal is written, and what a report does with the field. #693 owns the first; the second follows it.
Relations
Split out of #693, which asks where the journal lives. This asks the smaller question underneath it: can a reader tell?
Context
session_startnames the run, the project, the tool and the vendor session. It does not name the worktree, so two sessions from two worktrees of one repository are indistinguishable in the journal.Today that is hidden, because each worktree keeps its own journal — a report simply never meets the other one's sessions.
Why it is worth doing whichever way #693 goes
Either way it is one field on a line already written, and it makes "what did this branch cost" answerable without deciding anything else first.
Expected
session_startcarries the worktree it ran in, taken from git rather than from an environment variable — an agent runner's own variable names its concept, not the repository's.A repository with no worktrees answers the same for both, which is the case to keep cheap.
Acceptance
session_startnames the worktree and the repository it belongs to.Out of scope
Where the journal is written, and what a report does with the field. #693 owns the first; the second follows it.
Relations