Session Rewind: AI Coding Usage Report
A private report on how you use Claude Code, inside VS Code. Unofficial: not affiliated with Anthropic.
Open the Command Palette (Cmd/Ctrl+Shift+P) and type Session Rewind:
| Command |
What it does |
| Show my Claude Code report |
For this workspace or all your projects. When you work, what Claude does, session shapes, friction, models, and what fills your context window. |
| Save history snapshot and show report |
Also saves a small counts-only history so trends survive after Claude Code deletes old transcripts, and adds an "Over time" section. |
| Export shareable report (HTML) |
Saves the report as one HTML file. It has counts only: no prompts, file contents, or project names. |
| Show where I correct Claude (private) |
For this workspace or all projects. Finds where you repeatedly correct Claude, then asks your own Claude Code (no API key) to judge them and suggest rules for your CLAUDE.md: global rules and project-specific rules, each ready to copy, with counts and quotes. It only suggests; it never edits any file. Shown in an unsaved tab because it contains excerpts of your prompts. |
| Show my timesheet (Claude Code sessions + git) |
Day-by-day task lines for filling a timesheet, built from your Claude Code sessions and your git commits (GitHub). Pick today, yesterday, this week, the last 7 or 30 days, and cover this workspace, all projects, or several projects you choose mixed into one timesheet. See below. |
Timesheet
Show my timesheet turns your Claude Code sessions and git commits into task lines you can copy into a timesheet:
Mon 2026-11-02
- **Fix portfolio names** [tcr-mm-portal] (Feature): fix portfolio names, save company leadership — 2h 49m (2 commits · acme/app#461)
- **Short sessions and questions** [session-rewind] (Planning / Questions): 3 short Claude Code sessions — 8m
Day total: 2h 57m
- Projects. Choose this workspace, all projects, or Choose projects… to tick several and get one combined timesheet. Set
rewind.scope to skip the question.
- Time. Measured time is the time between your messages in a Claude Code session; pauses longer than
rewind.timesheetIdleMinutes (default 30) are left out, so it is a lower bound: raise it (up to 120) if the timesheet looks too low, because reading output, testing and waiting on a deploy are work. Under each day the timesheet shows when you were active (first to last message), so you can see what the limit left out. A line is never shorter than the time between its first and last commit; when that stretches it, it is marked ~. A session is cut into separate tasks after a long pause, at midnight, or when the git branch or folder changes. Sub-agents and git worktrees count toward their main session and repo. Work that has commits but no Claude Code session near it is estimated from how the commits are spaced and marked ~. Short tasks with no commit are rolled into one line per day and project.
- GitHub. Commits come from local
git log on the repos of your projects, the open workspace, and rewind.gitRepos. Nothing is fetched from GitHub unless you turn on the optional GitHub step below. PR numbers are shown as PR #123 on each line and come from, in order: the Merge pull request #N commits in your repo (any author: every commit the merge brought in gets that number), squash-merge subjects ((#123)), and the PR links Claude Code records. Commits that are on an open PR or not yet fetched have no number locally: run git fetch first, or turn on the GitHub step, which asks GitHub which PR each commit belongs to. Commits are grouped by author date, counted once even when on several branches, and bots are dropped. A bare "Merge pull request" commit is not a task of its own.
- Whose commits. A commit counts when its author name and email match your repo's
user.name / user.email, or an entry in rewind.gitIdentities (Name <email>). A commit with one of your emails but another name (a colleague pushing to your branch, GitHub's squash identity) is listed under Needs your confirmation and never counted. Add it to the setting to count it.
- GitHub (optional, off by default). Turn on
rewind.githubPullRequests to also ask GitHub for the title and state (open, merged, closed) of the pull requests on your lines, the PR number of commits that have none locally (open PRs included), and the pull requests you reviewed in the chosen projects. Each review becomes its own ~ line of 15 minutes, because GitHub does not say how long a review took. It uses VS Code's own GitHub sign-in (read only, scope repo so private repos work) after a one-time confirmation: there is no token to paste, and this extension stores nothing. Only repository names and PR numbers found in your local history are sent. If the sign-in is cancelled or GitHub cannot be reached, the timesheet falls back to local git and says so.
- Titles. Without Claude, titles come from commit messages and branch names. After a one-time confirmation, your installed Claude Code writes a 3 to 6 word title, a one-line description and a category per line from commit messages and short scrubbed prompt excerpts. It only writes words: times, counts and commits are computed locally. Turn it off with
rewind.askClaude.
- Meetings (optional, off by default). Turn on
rewind.timesheetMeetings to add your Google Calendar meetings as ~ lines (project "Meetings", category "Meeting", the time the calendar says). After a one-time confirmation, your installed Claude Code reads your events with its Google Calendar connector (read only, your existing login): the event titles, times and guest counts for the chosen days pass through Claude. All-day events and events you declined are left out. A meeting can overlap time measured in a Claude Code session, so check the day totals.
- Output. An unsaved markdown tab, plus Copy for sheet for tab-separated rows (Date, Project, Task, Category, Hours, Details, GitHub). Check every line before you submit it. Days with nothing are listed as such; the tool does not guess why.
Daily spend
The report has a Daily spend section, and the status bar shows today's spend (for example ~$28.84). Hover it for your sessions, status, context fill and cost.
- It is the cost Claude Code itself records for each session (API prices), shared over the days the session was active. On a subscription plan it is not what you were billed.
- A running session's cost is only written now and then, so messages after the last recorded cost are estimated from that model's price, taken from your own sessions.
~ means part of a figure is estimated.
- Turn the status bar off with
rewind.statusBar. It only reads your transcripts, locally.
What leaves your machine
| What |
Default |
Where it goes |
Report, status bar, timesheet from your sessions and git log |
always |
Nowhere. Read and computed locally; shown in a tab with no network; nothing written except the counts-only history file you ask for. |
| Rules from your corrections, and timesheet titles |
on, but asks once |
Short scrubbed excerpts go to your own installed Claude Code (claude -p, your login). Say "Not now" or set rewind.askClaude to false and nothing is sent. |
| PR titles, commit-to-PR lookup, PRs you reviewed |
off (rewind.githubPullRequests) |
api.github.com, read only, through VS Code's GitHub sign-in, after a one-time confirmation. Repo names and PR numbers only. If you decline or cancel, the timesheet is built from local git and says so. |
| Google Calendar meetings |
off (rewind.timesheetMeetings) |
Your installed Claude Code reads your events through its Google Calendar connector (read only, one allowed tool), after a one-time confirmation. Titles, times and guest counts for the chosen days pass through Claude. Nothing is stored. |
| Anything else |
never |
No telemetry, no other network requests. |
Privacy
- Everything runs on your machine, with one opt-in exception (next point). The extension makes no network requests of its own and has no telemetry.
- Rules drafting (corrections view only). After a one-time confirmation, up to 150 short scrubbed excerpts of your flagged prompts are sent to Claude by running your installed
claude command headless (claude -p, with no tools, so it can only return text and cannot change any file; your prompts are not saved as a chat). Claude Code may still leave a tiny stub with an auto-generated title in ~/.claude/projects, as it does for any run. It uses your existing Claude Code login, so no API key. The optional wide search (rewind.claudeBroadSearch, off by default) sends up to about 850 prompts instead, after a second confirmation. Turn it all off with rewind.askClaude; the word-match results still show.
- It reads your Claude Code transcripts (
~/.claude/projects). The timesheet also runs read-only git log on your repos, locally.
- GitHub (opt-in). Only if you turn on
rewind.githubPullRequests, agree once and sign in through VS Code, the timesheet asks api.github.com (read only) for PR titles and the PRs you reviewed. It sends repository names and PR numbers only. The token stays with VS Code and is never written, logged or shown.
- Timesheet titles. After their own one-time confirmation, short scrubbed prompt excerpts and commit messages go to your installed Claude Code the same way, to write titles. Off with
rewind.askClaude.
- Google Calendar meetings (opt-in). Only if you turn on
rewind.timesheetMeetings and agree once, the timesheet runs your installed claude command headless with one read-only calendar tool (list_events) and your Google Calendar connector. The event titles, times and guest counts for the chosen days go to Anthropic to be processed, and Claude Code reads them from Google through the connector. This extension keeps none of it: the meetings appear only in the unsaved timesheet tab (and the clipboard if you copy the rows). The call loads your user-level Claude Code settings (that is how the connector is found), so any hooks you set there run, and it is not saved as a chat (Claude Code may still leave a title-only stub in ~/.claude/projects).
- The report opens in a tab with scripts disabled and no network access.
- The only file it writes is the history file
~/.session-rewind/history.json, and only when you save a snapshot or export a report.
The history has counts and one-way hashed session ids, no prompt text.
- The extension never saves the corrections view or the timesheet to a file: they open as unsaved tabs. VS Code's own hot exit may still keep a backup copy of an unsaved tab in its backup folder until you close it; set
files.hotExit to off if you do not want that. Do not share either view.
Why snapshots matter
Claude Code deletes transcripts after 30 days by default (cleanupPeriodDays in ~/.claude/settings.json).
Session Rewind offers a reminder when your history is older than 25 days. Turn it off with rewind.remindToArchive.
Settings
| Setting |
Default |
Meaning |
rewind.projectsDir |
empty |
Transcript folder. Empty means ~/.claude/projects. |
rewind.scope |
ask |
Which history the report and the corrections view cover: ask (when a folder is open), workspace (only the folder(s) open in this window) or all. Snapshots always cover all projects. |
rewind.sinceDays |
0 |
Only the last N days. 0 means everything available. |
rewind.contextWindow |
0 |
Window size in tokens, e.g. 1000000. 0 means detect. |
rewind.historyDir |
~/.session-rewind |
Where the history file lives. Shared with the command-line version. |
rewind.remindToArchive |
true |
Remind me to save a snapshot. |
rewind.statusBar |
true |
Show today's spend in the status bar (live, read only), with sessions and totals in the tooltip. |
rewind.askClaude |
true |
In the corrections view, ask Claude Code to draft rules (after a one-time confirmation). |
rewind.claudeBroadSearch |
false |
Wide search: also send up to ~700 short prompts the word matcher did not flag, so Claude can find corrections it missed. Needs its own confirmation. |
rewind.claudePath |
empty |
Full path to claude, if it is not found automatically. |
rewind.claudeModel |
empty |
Model for the rules draft, e.g. sonnet. Empty uses your default. |
Good to know
- Context size per turn is exact. The breakdown of what fills it is an estimate (about 4 characters per token).
- The context window size is detected, not known. If the percentages look off, set
rewind.contextWindow.
- The word-match step is crude, so it makes mistakes. Claude judges its results, but it cannot see what it was replying to. Read the examples before using any rule. Single-prompt rules are flagged.
- "This workspace" matches the folder open in VS Code to Claude Code's history for that path. Run it for one repo to get rules for that repo's
CLAUDE.md, and for all projects to get rules for your global one.
- Rules from the corrections view are suggestions. Copy the ones you want into
~/.claude/CLAUDE.md (global) or the repo's CLAUDE.md (project-specific).
- If you use Remote SSH, WSL, or a dev container, the extension reads the transcripts on the machine where it runs. Use
rewind.projectsDir if they live elsewhere.
- Needs VS Code 1.85 or newer.
| |