Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@

### Changed

- The READMEs call sessionpad beta software rather than alpha.
- The READMEs call sessionpad beta software rather than alpha, in a plain note at the top instead of a warning.
- The Timeline tab's summary offer says how to turn summary lines on (set `summaryModel` to `haiku`) and has a **Got it** button, instead of a **Turn on summaries** button that changed the setting: the plugin directory accepts no settings call from a mod that keeps its engine for later, as every button and timer in this one does. A change in `/config` reloads the mod with the new value.
- The modules in `sessionpad/src` no longer take Claude Code's `$`. The hooks module builds one object from it, `ioOf($)`, with every call the mod makes written out there, and hands them that: the plugin directory reads a mod's calls from its hooks module alone and refuses `$` passed to another file. What the mod does is unchanged.
- `just dollar_check` applies the plugin directory's rule for `$` and `on` (`scripts/dollar_check.ts`) and lists every place that breaks it, and `just check` runs the script's tests (`just script_test`).

### Added

- An icon and a README of its own in the plugin folder, for a listing in Anthropic's plugin directory. The icon's source is `assets/icon.svg`.
- The listing's links in `plugin.json`: a privacy policy (`PRIVACY.md`: the author collects nothing, and what leaves your machine goes only through Claude Code's own model requests, as the notes Claude reads when you ask about the pad and the opt-in summary lines), the terms (the MIT license) and support (GitHub issues).

## 0.3.0 (2026-10-29)

Expand Down
42 changes: 42 additions & 0 deletions PRIVACY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Session Pad privacy policy

This policy applies from version 0.4.0 of Session Pad, a mod for Claude Code made by J and published at [github.com/j127/sessionpad](https://github.com/j127/sessionpad). It covers the mod itself.

## What the author collects

Nothing. The mod has no server, no account, no analytics and no telemetry, and it makes no network calls of its own. Nothing you write in it, and nothing about how you use it, is ever sent to the author.

## What it looks at

To build each session's timeline, the mod looks at each prompt you send and at each Edit, Write, NotebookEdit and Bash call, and keeps only what the next section lists; the text of a Bash command is never kept, only how many ran. It runs `git`, read-only, for the branch and the worktrees, and `du` for their sizes, and their output stays on your machine. It reads the environment variables `HOME`, `USERPROFILE` and `CLAUDE_CONFIG_DIR`, and never reads a key, token or credential.

## What stays on your machine

Everything the mod keeps is stored on your computer. Every `~/.claude` path in this policy is under `CLAUDE_CONFIG_DIR` instead when that is set.

- In the mod's key-value store, a file named `sessionpad_…json` in `~/.claude/plugins/store/` (one per copy of the mod): each session's headline and notes; an index of sessions, with each one's working folder, repository root and when it was last seen; each worktree's measured size, keyed by its path; the running total of summary calls; whether the summary offer was answered; and when the last prune ran.
- One timeline file a session in `~/.claude/sessionpad/timeline/`, each entry holding when the turn ended and how long it ran, the prompt's first 200 characters, a one-line summary, up to 25 paths written, the number of commands run, the branch, the worktree's path and the turn's token counts. A timeline file the mod can't read is copied aside, as `<id>.json.corrupt-<time>`, before it is rewritten.
- Exports in `~/.claude/sessionpad/exports/`, or at the path you give `/pad-export`.

## What leaves your machine

Nothing leaves except through Claude Code's own model requests, in two cases:

- **When you ask Claude about the pad.** The mod's `notes_read` tool hands Claude the session's headline and its newest notes (up to 50 of them, or 20,000 characters), with when each was written and by whom. They then go out as part of your conversation, like anything else Claude reads. The tool's description tells Claude to use it only when you ask what the session is about or what the notes say.
- **Summary lines, only if you turn them on.** They are off until you set `summaryModel` to `haiku`. With them on, after each turn that did some work the mod asks Claude Haiku for a one-line summary. Each request carries the first 200 characters of your prompt (for a turn Claude Code started itself, a few words saying what started it, and the start of that message), the start of Claude's final answer (1,500 characters at most), the names of up to 10 files written (not their paths or contents) with a count of any others, and the number of commands run.

Both go wherever the rest of your session's requests go: to Anthropic, or to the cloud provider or gateway your Claude Code is set up to use, on the plan or API key the session already uses, under the same terms and privacy policy as those requests. For Anthropic's own plans and API, see [Anthropic's privacy policy](https://www.anthropic.com/legal/privacy).

## Deleting what it keeps

A session nobody has opened for `retentionDays` (90 by default) is pruned: it loses its pad, its timeline file (and any copy of it put aside as unreadable) and its index row. Worktree sizes measured that long ago, and timeline files that old that no session owns, go too. Where there is no `rm`, as on Windows, those timeline files are emptied rather than deleted. Exports are never pruned. Set `retentionDays` to 0 to keep everything.

Uninstalling the mod leaves your notes and timelines where they are. To remove them:

1. Uninstall the mod, or close every session that uses it: a session left open writes its index row and timeline again.
2. Delete `~/.claude/sessionpad/`. That removes the timelines and the exports saved in the default place; exports you wrote elsewhere stay.
3. In `~/.claude/plugins/store/`, delete each file whose name starts with `sessionpad_`. Leave the other files there: they belong to other plugins.

## Changes and questions

This policy changes with the mod, and its history is in the repository. Ask a question or report a problem on [GitHub issues](https://github.com/j127/sessionpad/issues). Issues are public, so leave your notes, prompts and paths out of them.
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

A Claude Code mod that gives every session a small notepad: a one-line headline that says what the session is for, plus notes written by you or by Claude. Open any session after a few days away and see at a glance what it was doing and what is left to do.

> [!WARNING]
> **sessionpad is beta software. Use it at your own risk.** A later version may change how it stores your notes. Keep anything you can't lose somewhere else as well; `/pad-export` writes a session's notes and timeline to a Markdown file.
sessionpad is beta software. A later version may change how it stores your notes. Keep anything you can't lose somewhere else as well; `/pad-export` writes a session's notes and timeline to a Markdown file.

> [!NOTE]
> **Summary lines spend some of your Claude usage, so they are off until you turn them on.** With them on, the mod asks Claude Haiku for a one-line summary after each turn. A call sends about 500 tokens and gets about 20 back. At the API prices of October 2026 that is about $0.00006 a turn on Haiku 5.5 ($0.10 and $0.50 per million tokens in and out), or about 6 cents per 1,000 turns; if your Claude Code's `haiku` is Haiku 4.5 ($1 and $5), ten times that. On a Pro or Max plan it counts against your usage limits instead of costing money, and a single turn of your own conversation usually uses thousands of times as much. The Timeline tab's last line shows the running total.
Expand Down Expand Up @@ -103,7 +102,7 @@ For the Desktop app, add the folder to `CLAUDE_CODE_PLUGIN_DIRS` in the `env` bl

## What is stored, and where

Everything stays on your machine, with one exception: the summary line. The mod makes no network calls of its own.
Everything stays on your machine, with two exceptions, both sent through Claude Code's own model requests: the notes Claude reads with the `notes_read` tool when you ask about the pad, which go out as part of your conversation, and the summary line, if you turn it on. The mod makes no network calls of its own. [PRIVACY.md](PRIVACY.md), the privacy policy the plugin directory's listing links to, says the same in one page.

- The headline and notes for each session live in the mod's key-value store, a JSON file under `~/.claude/plugins/store/`, under the key `notes:<session id>`.
- A small index, `index`, records each session's working directory, repository root and when it was last seen. Pruning reads it, and an all-sessions view could later.
Expand Down Expand Up @@ -215,4 +214,4 @@ Decisions made while building, and places where this build of Claude Code (2.1.3

## License

MIT. See [LICENSE](LICENSE); the same file ships inside `sessionpad/`, the folder people install.
MIT. See [LICENSE](LICENSE); the same file ships inside `sessionpad/`, the folder people install. The license is also the terms the plugin directory's listing links to. Ask questions and report problems on [GitHub issues](https://github.com/j127/sessionpad/issues).
4 changes: 2 additions & 2 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ script_test:

# Check formatting of the mod, the scripts, the marketplace file and the docs
format_check:
bunx prettier --check sessionpad scripts .claude-plugin README.md CHANGELOG.md package.json
bunx prettier --check sessionpad scripts .claude-plugin README.md CHANGELOG.md PRIVACY.md package.json

# Rewrite files into Prettier's format
format:
bunx prettier --write sessionpad scripts .claude-plugin README.md CHANGELOG.md package.json
bunx prettier --write sessionpad scripts .claude-plugin README.md CHANGELOG.md PRIVACY.md package.json

# Read the mod, then the marketplace file that lists it, the way Claude Code
# will, treating warnings as errors
Expand Down
60 changes: 60 additions & 0 deletions scripts/listing.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
// The links the plugin directory's listing shows, read from plugin.json:
// each is an https URL into this repository, and the two that point at a
// file on main name a file git tracks here, spelled the same, so each link
// works once it is merged.

import { describe, expect, test } from "bun:test";

const ROOT = `${import.meta.dir}/..`;
const REPOSITORY = "https://github.com/j127/sessionpad";
const LINKS = [
"homepage",
"repository",
"supportUrl",
"privacyPolicyUrl",
"termsOfServiceUrl",
] as const;

const manifest = (await Bun.file(
`${ROOT}/sessionpad/.claude-plugin/plugin.json`
).json()) as Record<string, unknown>;

/** Whether git tracks `path`, with exactly that spelling. */
function isTracked(path: string): boolean {
const ran = Bun.spawnSync(
["git", "ls-files", "--error-unmatch", "--", path],
{
cwd: ROOT,
stdout: "ignore",
stderr: "ignore",
}
);
return ran.exitCode === 0;
}

describe("the listing's links in plugin.json", () => {
for (const field of LINKS) {
test(`${field} is an https URL into the repository`, () => {
const url = String(manifest[field]);
expect(url === REPOSITORY || url.startsWith(`${REPOSITORY}/`)).toBe(true);
});
}

test("support goes to the repository's issues", () => {
expect(manifest.supportUrl).toBe(`${REPOSITORY}/issues`);
});

test("the privacy policy and the terms are files git tracks on main", () => {
expect(manifest.privacyPolicyUrl).toBe(
`${REPOSITORY}/blob/main/PRIVACY.md`
);
expect(manifest.termsOfServiceUrl).toBe(`${REPOSITORY}/blob/main/LICENSE`);
expect(isTracked("PRIVACY.md")).toBe(true);
expect(isTracked("LICENSE")).toBe(true);
});

test("a file git doesn't track, or spelled otherwise, doesn't count", () => {
expect(isTracked("privacy.md")).toBe(false);
expect(isTracked("NO-SUCH-FILE.md")).toBe(false);
});
});
3 changes: 3 additions & 0 deletions sessionpad/.claude-plugin/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
"homepage": "https://github.com/j127/sessionpad",
"license": "MIT",
"repository": "https://github.com/j127/sessionpad",
"supportUrl": "https://github.com/j127/sessionpad/issues",
"privacyPolicyUrl": "https://github.com/j127/sessionpad/blob/main/PRIVACY.md",
"termsOfServiceUrl": "https://github.com/j127/sessionpad/blob/main/LICENSE",
"types": "./types/index.d.ts",
"userConfig": {
"showBand": {
Expand Down
11 changes: 7 additions & 4 deletions sessionpad/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

A notepad for each Claude Code session. Give a session a one-line headline that says what it is for, keep notes beside the chat (yours, or ones Claude takes when you ask), and see a timeline of what each turn did and where the session's work lives on disk. Open a session after a few days away and see at a glance what it was doing and what is left to do.

> [!WARNING]
> **Session Pad is beta software. Use it at your own risk.** A later version may change how it stores your notes. Keep anything you can't lose somewhere else as well; `/pad-export` writes a session's notes and timeline to a Markdown file.
Session Pad is beta software. A later version may change how it stores your notes. Keep anything you can't lose somewhere else as well; `/pad-export` writes a session's notes and timeline to a Markdown file.

Session Pad is a Claude Code mod: it runs in Claude Code 2.1.299 or later, in the Desktop app's Code tab or a terminal, and not in claude.ai chat, Cowork or the Desktop app's WSL sessions.

Expand All @@ -20,7 +19,7 @@ Session Pad is a Claude Code mod: it runs in Claude Code 2.1.299 or later, in th

## What it runs, sends and stores

- **Nothing leaves your machine unless you turn on summary lines.** The mod makes no network calls of its own.
- **Nothing leaves your machine except through Claude Code's own model requests**, in two cases: when you ask Claude about the pad, its `notes_read` tool hands Claude the headline and the newest notes (up to 50, or 20,000 characters), which then go out as part of your conversation; and summary lines, if you turn them on. The mod makes no network calls of its own.
- **Summary lines are off until you turn them on**, with the `summaryModel` setting (see [Settings](#settings)). With them on, after each turn the mod asks Claude Haiku, on your own plan or API key, for a one-line summary. It sends the prompt's first 200 characters, the start of Claude's final answer (1,500 characters at most), the names of the files written (not their paths or contents) and the number of commands run. A call is about 500 tokens in and 20 out, roughly 6 cents per 1,000 turns on Haiku 5.5 at the API prices of October 2026 (ten times that if your Claude Code's `haiku` is Haiku 4.5); the Timeline tab shows the running total.
- **What it watches in the session:** it hooks each prompt you send, each turn's start and end, and each Edit, Write, NotebookEdit and Bash call, to write the timeline: the prompt's first 200 characters, the paths of the files written (up to 25 a turn) and how many commands ran. These hooks only observe: they pass every prompt and call on unchanged, and never block one.
- **Programs it runs:** `git`, read-only, in the session's folder, for the branch and the worktrees; `du -sk` from your home folder (the root folder where there is none), in the background, to measure worktree sizes (the `measureDisk` setting turns this off); and `rm`, only on the mod's own timeline files, when old sessions are pruned (where there is no `rm`, as on Windows, those files are emptied instead).
Expand Down Expand Up @@ -63,6 +62,10 @@ From the author's own marketplace instead: in a terminal session, `/plugin insta

The full README, with the design notes, how to run the tests and what each setting does in detail, is at [github.com/j127/sessionpad](https://github.com/j127/sessionpad).

## Privacy and support

The [privacy policy](https://github.com/j127/sessionpad/blob/main/PRIVACY.md) says what the mod keeps and sends, as above: the author collects nothing. Ask questions and report problems on [GitHub issues](https://github.com/j127/sessionpad/issues).

## License

MIT. See [LICENSE](LICENSE).
MIT. See [LICENSE](LICENSE). The license is also the mod's terms of use.
Loading