--- title: "past.dev for Claude Code" description: "Claude Code sessions become memory, and every prompt reaches the model with what past.dev recalls for it." canonical: https://past.dev/docs/plugins/claude-code last-updated: 2026-10-12 --- # past.dev for Claude Code > Claude Code sessions become memory, and every prompt reaches the model with what past.dev recalls for it. Product: past.dev Plugins. Source: https://past.dev/docs/plugins/claude-code ### Requirements - Claude Code in the terminal, in the Code tab of the Claude desktop app, or in an IDE extension. - Node 16 or later. The hooks call `node` directly, so Windows works too. - A project API key and an identity. ### Install the Claude Code plugin Run these two lines inside Claude Code. The first line adds the plugin's repository as a marketplace. The second line installs the plugin from it. ```claudecode /plugin marketplace add pastdotdev/claude-code-plugin /plugin install past@past ``` In the Claude desktop app or on claude.ai, you can add the plugin to your account instead. Open Customize › Plugins, select Add › Add marketplace and enter `pastdotdev/claude-code-plugin`. Then open past.dev and select Add. Claude Code loads the plugin from the next session. Run `/reload-plugins` to load it into a session that is already open. ### Connect the Claude Code plugin ```claudecode /past:connect ``` The project API key starts with `past_sk_`. Create it on the API keys screen of the console at https://app.past.dev. Do not use the project id or the organization's `past_mk_` management key: a plugin cannot ingest or recall with them. The identity is the email or id that every memory from your sessions is attributed to. Recall answers as this identity, so recall stays off until you set one. Without an audience, every reader in the project can see what you send. Add `--audience ` to the connect command to narrow it to one audience from the console. `--audience project` widens it again. In the terminal, `/plugin configure past@past` asks for the same values in a form. The form masks the key and keeps it in the system credential store. The values apply from your next prompt. ### When Claude Code sessions are sent - When a session ends. - Before Claude Code compacts the context, so the detail is in past.dev before the summary replaces it. - After 12 hours with no new turn. This sends a desktop app conversation that stays open for days. - Within a minute after the Claude Code process stops, if you close the window or quit the app. - At the next session start, for an earlier session that never reached past.dev, for example after a crash. Recall happens when a session starts and on every prompt. After a compaction, the recall looks for what this session was doing, which is the detail the model just lost. ### Claude Code commands | Command | What it does | | --- | --- | | `/past:connect` | Stores the key, the identity and the audience in `~/.past/config.json`. | | `/past:status` | Shows the connection, what was sent, and the last send that failed. | | `/past:cut [session]` | Prints exactly what would be sent from this session, or from the session you name. | | `/past:ingest [session]` | Sends one session now. | | `/past:backfill` | Lists the unsent sessions on this machine with their credit cost. `/past:backfill --confirm` sends them. | The plugin also has a skill: ask Claude what was decided, or if something was tried before, and it searches past.dev. ### Remove the Claude Code plugin Run `/plugin uninstall past@past`, then delete `~/.past` if no other past.dev plugin uses it. Revoke the key on the API keys screen to stop it at once from the server side. Data that was already sent stays in past.dev until you delete it. Source code and issues: [pastdotdev/claude-code-plugin](https://github.com/pastdotdev/claude-code-plugin).