SPM — StellarPath Memory Operating System Docs

Capture local transcripts

Published Last reviewed Applies to SPM-Polaris

After this page, you can save local Claude Code and Codex transcripts as SPM memory at https://api.spmos.ai.

Prerequisite: Install the package and set SPM_API_KEY before sending transcripts.

Install and run

The command ships with the package. Run a dry-run first, then send the windows:

pip install spm-maverick
export SPM_API_KEY=spm_live_...
spm-ingest --dry-run            # show what would be sent
spm-ingest                      # send it

By default, spm-ingest reads ~/.claude/projects and ~/.codex/sessions. Use --root claude-code=DIR or --root codex=DIR to point it elsewhere.

Use this command for work completed before you installed anything, or when you do not want a proxy in the request path.

Limit the capture

spm-ingest sends only conversational turns: user messages and assistant text. It skips tool calls, tool results, thinking blocks, hooks, and session metadata because they are protocol rather than memory.

Each turn keeps its role and timestamp. When the next turn would exceed the 12,000-character ingest limit, the command closes the window at the turn boundary. One long session therefore becomes several sources instead of one oversized source.

Re-run safely

The command stores a byte offset for each file. A later run sends only appended content, and the data plane recognizes an already sent window as a duplicate instead of storing it twice.

If a file shrinks or is replaced, the command starts again from the beginning. If a file is still being written, the command holds back its last turn until the file has been quiet for one minute. Use --flush to send that tail immediately.

Choose options

Flag Default Does
--source all claude-code, codex, or all
--root KIND=DIR — Override a transcript root (repeatable)
--since-days N 0 Skip files not modified in N days
--max-windows N 0 Stop after N windows
--dry-run off Print windows, send nothing
--flush off Also send the tail of a file still being written
--settle-seconds N 60 How long a file must be quiet before its tail is sent
--state PATH ~/.local/state/spm/ingest-cursors.json Cursor file
--base-url URL https://api.spmos.ai Data plane origin
--token $SPM_API_KEY API key

For a long first backfill, use --since-days and --max-windows to bound the number of windows processed in one run. Each window is processed separately.

Schedule it

The command runs once and exits. Run it from cron, a launch agent, or a systemd timer. This example runs every fifteen minutes with a five-minute settle window:

*/15 * * * * SPM_API_KEY=... spm-ingest --since-days 7 --settle-seconds 300

The command exits non-zero if any file fails. Its cursor for a failed file stays where it was, so the next run retries that file.

Avoid unsupported inputs

The command does not watch files. It runs once and exits.

It does not parse other agents. Claude Code and Codex are the two supported formats. Each format has its own parser, and the parsers are kept small on purpose.

It does not send anything the agent did not already write to disk.

Verify

spm-ingest --dry-run

Expected: The command prints the windows it would send and sends nothing.

Next