All work

Product engineering · Agent memory

Spookling Memory — Long-Term Memory for AI Coding Agents

Long-term memory for Claude Code and Codex: a log that is never edited, facts with real dates, and a code-written timeline, so agents stop forgetting rules and repeating stale facts.

Role
Product Engineer, CLI & Team Memory
Period
2026 — Present
Platforms
Claude Code · Codex · CLI · Cloud
Spookling Memory icon: the Spookling ghost on a night sky with a database badge
Contribution

Built the install wizard and much of the CLI, the Claude Code and Codex hooks, MCP registration, and team memory: session upload, org feeds, sharing, and secret masking. Now building the cloud engine.

103/106

changing facts answered correctly; keyword search: 37

0 vs 18

stale answers against keyword search

1/3

the tokens of search, tied on LongMemEval

6

public npm releases, 0.1.1 to 0.2.2

Product problem

Coding agents forget everything between sessions. They lose standing rules when a long chat is compacted, bring back facts that stopped being true, and guess at dates and counts. Spookling Memory gives Claude Code and Codex a durable memory: a word-for-word log, dated facts that close themselves when something changes, and a timeline written by code instead of the model.

What I built

  • Install and CLI. npx spookling init is a wizard that installs the memory server, registers hooks and MCP servers for Claude Code, Codex, and the Claude desktop app, and offers to install Claude Code when it is missing. status and update detect older installs and repair them.
  • Team memory. Login, session upload when a session stops, an incremental org feed, per-session and per-project sharing, and team tools the agent can call. Uploads survive offline periods, rate limits, and sequence conflicts.
  • Safety. Secrets are masked before anything leaves the machine, sessions are private by default, and a shared session shows colleagues the cleaned conversation only.
  • Releases. Release branches, changelogs, and end-to-end sandbox tests covering install, login, share, unshare, and uninstall, across six public npm releases.

How memory works

Session ends  ─► log ─► tagger quotes exact words ─► code dates, checks
Next question ◄─ rules + profile + dated facts + timeline + snippets

No model computes a date, writes a fact, or turns an answer into a refusal; code does. That is what keeps stale answers at zero.

Results

The team benchmarked Spookling Memory against keyword search over the same log, with the same answering model and one strict judge on both arms:

Test Spookling Memory Keyword search
Facts that change (3 years of chats) 103 of 106 37 of 106
Stale answers 0 18
LoCoMo trick questions refused 60 of 61 40 of 61
LongMemEval (public, 470 answerable) 81.5% 82.6%

LongMemEval is a statistical tie, reached with 13,900 tokens per answer against 39,900 for search.

Current work

I am building the cloud engine: an SQS worker with leases and epoch-fenced commits, versioned S3 snapshots, a FastAPI retrieval service that merges team spaces, and usage metering. It is in development and not part of the released results above.

Engineering challenges

  1. Install memory into Claude Code and Codex with one command, without breaking a developer’s existing hooks, MCP servers, or allow rules.
  2. Upload sessions reliably from short-lived hooks: offline queues, rate limits, sequence conflicts, and logs still being written when a session stops.
  3. Let teams share agent sessions without leaking credentials or exposing private work by default.

Key decisions

  1. Made every install step reversible: `init`, `status`, `update`, and `uninstall` each own exactly the hook and MCP entries they wrote.
  2. Queued uploads on network failure, waited out rate limits, retried once on sequence conflicts, and waited for a session log to go quiet before uploading.
  3. Kept sessions private by default with per-project auto-share rules, and masked JWTs, private keys, URL credentials, and Slack and Stripe keys before any upload.
  4. Exposed memory and team tools over MCP so the same capabilities work in Claude Code, Codex, and the Claude desktop app.