Hand off a session to the next one
A session ends with one dated markdown file in your own repository: what got built, what is next, what slowed the session down. The Sessions tab lists those files newest first, and the next session's briefing reads the entry back.
Watch it
Read the narration
- 0:00 Tomorrow you reopen the repo.
- 0:02 Nothing says where last night stopped.
- 0:06 The captured facts are not the account.
- 0:08 Only the person who was there writes why.
- 0:13 The hook scaffolds three sections and rolls up the session's turns.
- 0:17 A drafted entry waits in a sidecar until you confirm it.
- 0:23 The next session opens with what got built and what is next.
Synthetic example. Read the guide
How to
A tracked repository with a .claude/brain/sessions/ directory.
For the automatic scaffold: the SessionEnd hook registered in that repository's .claude/settings.json, running node scripts/cc-hook.mjs SessionEnd.
- End the session and let the hook write the file.
The SessionEnd hook creates a dated file under .claude/brain/sessions/ with three headings, What got built, What's next and What slowed us down / do differently, each holding a placeholder, then the branch, the commits since midnight and the files they touched. With captured turns it adds an Active session log block. It writes one file per day per repository and nothing outside a git work tree.
- Fill in the three sections yourself.
The hook writes facts; only the person who ran the session can say what it was for. Write one file per unit of work, so a day that shipped two pull requests gets two files. Commit the entry with the change it describes.
- Or let RepoOps draft them, and decide each draft.
On the Session drafts card of Memory's Corrections tab, turn on Draft a session entry when a session ends (off by default). With an Anthropic key on this machine and at least three captured turns, the hook writes a draft beside the entry as a .draft.md file. Press Confirm to fold it into the placeholders, Edit then Save and confirm to fold your version, or Reject (press it twice) to delete it. Text you already wrote is never replaced.
- Open Attribution, then Sessions under All tools.
Each row is badged with the date from the filename and titled with the entry's first heading, newest first, with a filter box. Click a row to read the entry.
- Start the next session from What's next.
The session briefing reads the newest dated entry from the last 14 days (REPOOPS_BRIEFING_WINDOW_DAYS) and quotes its What got built and What's next sections at session start.
- Sweep the directory when it gets long.
npm run session-forget prints the plan and changes nothing. npm run session-forget -- --apply keeps the newest 400 entries and the last 30 days, gzips the rest into month archives, and lists them in ARCHIVE-INDEX.md. --restore brings one back.
Use cases
Cold-starting the next morning
- Situation
- Yesterday's session ended with the entry filled in, and you open the repository with no memory of where it stopped.
- You do
- Open Sessions, click the top row, and read What's next.
- You see
- The first move of today comes from yesterday's own account, and the briefing quotes the same lines at session start. What the entry does not say, nobody wrote down.
A drafted entry to review
- Situation
- Drafting is on and a session ended with an Anthropic key on the machine.
- You do
- Open Session drafts on Memory's Corrections tab, read the three drafted sections beside the source facts, and press Confirm or Reject.
- You see
- Confirm folds the draft into the entry's placeholders and deletes the sidecar; Reject deletes the sidecar and leaves the entry alone. The model never writes the entry on its own.
Expected outcome
Next step: That directory is empty. Write an entry, or check which repository the tab is scoped to.
Next step: The SessionEnd hook is not registered for that repository, or the session ran outside a git work tree.
Next step: No Anthropic key, fewer than three captured turns, or the daily token cap was reached. The [cc-hook] line in the app's output names which.
Next step: That is a pending draft. Confirm or reject it on Session drafts, on Memory's Corrections tab, and it disappears.
What else to consider
Who else is working right now: Running now
Running now, on the Agent sessions tab of Attribution in the desktop app, lists every Claude Code session running on your devices across worktrees and repositories, with its branch, last turn and the files it touches; Refresh reads it again. Will conflict at merge lists each file two or more branches are changing at once, from open pull requests, uncommitted edits in another worktree, or claims. An agent can ask check_session_overlap over MCP before it starts, and claim_files sets a soft claim that lapses after 30 minutes by default (1 to 240). On repoops.ai the same card is Recent sessions: the sessions with a turn in the evidence store's last 2 hours, with who ran each and its tool. The store loads each hour at 17 minutes past the next, so a turn shows there 17 to 77 minutes after it happened, and the card names the newest turn it holds. Recent is not running: for the sessions running now, open the desktop app.
Hours and consent per day
On the desktop app, Hours worked on Attribution's Agent sessions tab gives one row per day from Claude Code telemetry: idle-capped hours worked, the first-to-last span, sessions, prompts and spend, with each repository's share beside it. Contractor consent, next to it, grants or revokes each contractor per repository, and a strict export keeps only rows that were granted when recorded. Check the integrity badge before you invoice: Integrity verified, No journal yet, or Tampering found.
Counting your own agent habits: trajectory markers
Commit a YAML file to .repoops/markers/ in a tracked repository to count a habit you keep correcting. A marker names a tool, an argument pattern, or both, and in_a_row, how many matching calls in a row count once; for example tool Bash, args npm test, in_a_row 3 counts each time the agent ran the test three times running. The desktop app counts every marker over the session transcripts in the window and lists each on Attribution's Agent sessions tab, under Trajectory markers, with the sessions it fired in and the times it fired. A file that does not load is listed with its name and line. A marker's pattern is checked for cost before it runs, its severity is low or medium so it never pages anyone, and repoops.ai does not show the counts because the transcripts stay on the machine that ran the agent.
Replaying one session
On the desktop app, Transcript on a session's row on Attribution's Agent sessions tab opens its user prompts and agent replies end to end in a slide-over, 100 prompts at a time, with the files it changed. It reads the local telemetry store directly: the capture mode (metadata or content) applies when telemetry leaves the machine, not to this view.
Two different session counts
The Sessions tab lists hand-written journal entries. Agent sessions and Hours worked count captured Claude Code sessions. The two numbers differ on purpose.
Cost, egress and storage
Reading costs nothing. Drafting is one Anthropic call per drafted session on your key, charged against a daily cap of 20,000 tokens. Entries are ordinary tracked files in your repository and travel only with your commits: the brain snapshot the desktop publishes leaves sessions/ out, so the entries stay on the desktop; on repoops.ai, /team/sessions opens the Attribution page.