Pan Memory
Use pan memory to inspect the durable memory substrate for a project or issue.
Commands
pan memory search <query> [--project <id>] [--workspace <id|name>] [--issue <id>] [--tag <tag>] [--sibling] [--global] [--target [path]] [--include-archived] [--limit <n>] [--facts] [--json]
pan memory status [issue] [--project <id>] [--workspace <id|name>] [--history <n>] [--json]
pan memory timeline [--workspace <id|name>] [--days <n>] [--limit <n>] [--json]
pan memory read <path> [--workspace <id|name>] [--from <n>] [--lines <n>]
pan memory reset <scope> <scopeId> --reason <text> [--project <id>] [--from <iso>] [--json]
pan memory summary [issue] [--project <id>] [--workspace <id|name>] [--date <yyyy-mm-dd>] [--json]
pan memory doctor [--project <id>] [--json]
pan memory backfill [--workspace <id>] [--project <id>] [--dry-run] [--json]
pan memory pin <doc-path> [--project <id> | --workspace <id>] [--json]
pan memory unpin <doc-path> [--project <id> | --workspace <id>] [--json]
pan memory pins [--project <id> | --workspace <id>] [--json]
pan memory config [--json]
pan memory show <id> [--project <key> | --user | --machine | --here]
pan memory list [--type <t>] [--query <q>] [--review | --all] [--project <key> | --user | --machine | --here] [--json]
pan memory add <id> --type <feedback|project|reference|user> --description <text> [--title <text>] [--body <text> | --body-file <path>] [--tags <a,b>] [--always] [--source <text>] [--supersedes <ids>] [--project <key> | --user | --machine] [--json]
pan memory edit <id> [--type <t>] [--title <text>] [--description <text>] [--body <text> | --body-file <path>] [--tags <a,b>] [--source <text>] [--supersedes <ids>] [--clear-review] [--always | --no-always] [--project <key> | --user | --machine] [--json]
pan memory retire <id> [--project <key> | --user | --machine] [--json]
pan memory lint [--threshold <n>] [--no-llm] [--project <key> | --user | --machine | --here] [--json]
pan memory sync [--setup <git-url>] [--status] [--json]
pan memory reindex [--project <key>] [--json]
Notes
search --sibling --issue <id>searches same-project sibling issues instead of the selected issue.search --globalmerges results across every registered project instead of just the selected/default one.search --workspaceaccepts either a workspace id or a workspace name; a name matching more than one workspace across projects errors instead of guessing.search --target [path](Subspacetarget-searchparity) finds every non-archived workspace whosepathtargets a directory — bare--targetdefaults to the current working directory. Mutually exclusive with--workspace/--issue/--global. Fans out per matched workspace (which may span several projects) and merges by rank score, same as--global's per-project merge. When no workspace targets the directory, prints a friendly "No workspaces target<dir>." note and exits 0.search(human output only) prints matching curated facts first, underProject memory:/Operator memory:/Machine memory:(PAN-3957, PAN-4578, at most 5 each), before the observation hits below them.--jsonis unchanged — still the observation array only.--facts --jsonprints one line{ facts, observations }: up to 5 matching facts per store, each withscope,type,id,title,description,tagsandfile(no body), read from this checkout's store (the oneaddwrites;--project <key>reads that project's primary checkout instead), the operator store and the machine store; observations in a short form withoutnarrative; and without a scope flag, observations come from the project that owns the current directory (--globalwhen none does).--factswithout--jsonexits 1.statusandsummaryaddress a workspace three ways, in precedence order:--workspace <id|name>, an issue positional, then the workspace that owns the current directory. With none of the three resolvable the command exits non-zero and names all three modes. A workspace with no issue (main/scratch) is titled by its workspace name insummaryoutput.status --history <n>prints the current status first, then up to N archived statuses newest-first with their archive timestamp, phase, and headline. N is capped at 50; the rollup writer prunes the on-disk archive to its three most recent entries, so N above 3 returns whatever is still retained.--historywith--jsonemits{current, history}where each history entry is{archivedAt, path, status}.timelineprints one row per observation — timestamp, the action status or summary, and the files touched — oldest first, for the workspace named by--workspaceor the one owning the current directory.--dayscounts today as day 1 and defaults to 7;--limitcaps the row count at the 50 most recent by default;--jsonemits the observation rows.readprints a file from the workspace's memory home;<path>is relative to that home and--from/--linesslice it by 1-based line number. It refuses, with a non-zero exit, any absolute path, any../traversal, and any symlink whose real target is outside the home — so Claude Code JSONL session files under~/.claudeare unreachable by construction.resetcreates a reset marker; it does not delete historical memory records.doctorexits non-zero when an active agent has no successful extraction in the last hour.backfillreads historical Claude Code JSONL transcripts under~/.claude/projects/and extracts observations for sessions whose first-message cwd maps to a registered workspace; unmatched sessions are skipped. Read-only on the JSONL files —--dry-runreports matches without extracting or writing anything.pin/unpin/pinsmanage docs injected under the knowledge budget at prompt time.--workspaceoverrides--project; paths are stored project-relative regardless of scope.show/listread curated memory facts (PAN-3957) — short, human-reviewable markdown files with frontmatter, committed in the repo and distinct from the observation substrate above.--project <key>always reads that project's primary checkout; with neither--projectnor--user,show/listdefault to the primary checkout too (the store the launch-time index was rendered from) — pass--hereto read the cwd checkout's own store instead (useful inside a workspace before its branch merges).listdefaults to active facts only;--reviewshows only facts carrying a review marker (whatever their status),--allshows every fact including superseded and retired ones (a non-active line ends with[superseded by <id>],[superseded],[retired]or[review: <markers>]), the two are mutually exclusive, andlistexits non-zero when any fact file fails to parse, printing aProblems:block.add/edit/retirewrite curated facts into the checkout that owns the cwd (or--project <key>'s primary checkout, or--userfor the operator store, or--machinefor the machine store); they never accept--hereand never commit — each prints thegit add/git rm+ commit hint to run yourself.add --type userwithout--useror--machineis refused (user facts belong in the operator store). The operator store (--user) travels with you across machines and refuses home-directory paths; the machine store (--machine,~/.overdeck/context/machine-memory/) is this machine only and accepts them. A fact whose text contains an absolute home-directory path is refused in the project and operator stores, and secret-like text is refused everywhere.editrequires at least one field flag and always bumpsupdated;--clear-reviewremoves a review marker, reactivating the fact in the launch index.add --always(andedit --always/--no-always, either alone counts as a change) marks a factalways: true: it leads every launch index ahead of the usual type/updated/id order, and is never a prompt-time retrieval candidate (PAN-5358).add/editalso refresh that store's entry in the fact vector cache best-effort after a successful write; a failed or timed-out refresh prints a warning to stderr without changing the exit code or the written fact.reindexrefreshes the fact vector cache for the project store (same target asadd/list, or--project <key>'s), the operator store, and the machine store, printing<scope>: <embedded> embedded, <reused> reusedper store (or--json's{ stores: [...] }); unlike the best-effort refresh after a write, it exits 1 when embedding fails. Outside a registered project with no--project, it skips the project store with a note instead of failing.add --source <text>records who or what made the rule, and when (one line, at most 200 characters);addalways writescreated: <today>.--supersedes <a,b>names facts in the same store that this one replaces: each is rewritten withstatus: supersededandsuperseded_by: <id>and kept on disk, and drops out of the launch index andsearch. Every file is checked before any is written; a missing, unparseable or already-superseded id is refused and nothing is written. The commit hint names every file written.edit --sourcereplaces the attribution;edit --supersedesappends to the fact's existingsupersedeslist (the way to link an old rule after the fact) and is refused when the edited fact is itself superseded.editkeepscreated, the supersession links,statusand any unknown frontmatter keys. To undo a supersession, edit both files by hand.show <id>printsSource: <file>, thenAttribution:,Created:,Status:(only for a superseded or retired fact) andSupersedes:lines, each only when the fact has that value, then the raw file.lintreports, for one store (chosen likelist), supersession link problems, duplicate pairs and contradicting pairs; it never edits a fact and exits 0 after any report (1 only for a bad flag or an unresolvable store). Similarity uses the configured conversation-search embedder when it is available and falls back to local word overlap, naming the reason;--threshold <n>(0-1) overrides the duplicate threshold. The contradiction pass asks the memory extraction provider about at most 20 of the most similar active pairs;--no-llmskips it. Superseded facts are left out of the duplicate and contradiction checks.sync(PAN-4578) syncs the operator store with a private git repository you own.--setup <git-url>turns it on once per machine (it moves home-path facts to the machine store first); after thatpan sync, the dashboard, and every--userwrite sync it too, and--statusreports its state without the network. When two machines edit the same fact, the remote version keeps the id and yours is kept as a review-marked<id>-conflict-<machine>fact to resolve withedit --userandretire --user. A changed fact that contains secret-like text or a home-directory path is held back: it stays on this machine, uncommitted, and every sync reports it. After asyncedoutcome,syncalso refreshes the operator store's vectors, best-effort.