Pi native prompt capture
Install and check capture compatibility
Choose Pi with npx claude-mem install --ide pi, then restart Pi to load the extension. npx claude-mem pi status reports whether the extension files exist. Installation and status do not check the Pi version or verify automatic memory capture, and they do not upgrade Pi.
Pi 0.79.6 provides Smart search by default with mem_search, mem_timeline and mem_get_observations; automatic capture and injection are unavailable. The capture lifecycle is source-reviewed for Pi 1.0.2 and Pi 1.0.4. Other or unknown versions require a compatibility check. These samples do not establish the first supported release or compatibility for every newer version.
Check your Pi version and follow the official Pi installation and update guide if an update is needed. Automatic capture also requires a compatible Claude-Mem worker and validation in the actual Pi host. Manual recall remains separate from automatic capture. See native harness installation and attribution for the extension's installed files and memory tools.
Automatic capture uses the genuine Pi session-manager SID and the persisted user-message SessionEntry.id on the active branch. It never creates an adapter ID or derives identity from prompt text, a timestamp, a turn index, or the leaf entry.
The source contract is verified against Pi 1.0.2 at cd32f7725fdbddbaecdff5b1e68491563394e0ca and Pi 1.0.4 at 7c10bd4337495ee613f2224843ecdf349b80d1df. Their SDK factory routes transformContext through the awaited ExtensionRunner context_with_system phase after awaited user events and session persistence, before the provider request. The hook sees the real read-only session manager and full request transcript. Pi 0.79.6 at 31bfb2f16f7a1dd707876e970f0f80caa61f8435 has an awaited context phase but lacks context_with_system; automatic capture and injection are unsupported there. Manual memory tools remain available. Later/unknown SDK versions require the same lifecycle contract; missing or mismatched APIs/entries skip automatic capture and injection.
Before-agent and user message-end hooks run before persistence. They do not submit a prompt or borrow an earlier leaf ID. The request hook walks the active branch to its last actual user-message entry, validates the request user message carrying that entry's native timestamp, whose text must begin with the entry's text, and uses only entry.id as nativePromptId. Other extensions may append per-request context after the prompt or as extra text on it; neither changes which message is validated, the prompt text sent to the worker (always the entry's own text) or whether memory is injected. These comparisons validate correspondence; they do not generate identity. Repeated equal text with different persisted IDs is two turns. Same-entry retries and restarts retain the same key. Missing/mismatched IDs or image-only turns are not submitted; mixed messages send text only.
The worker must include the stacked native-ID core from PR 4461 plus the read-only native-prompt-capability endpoint added with this adapter. Pinned main and standalone PR 4377 do not supply that dependency. Unknown/older workers fail the read-only probe before any init submission. There is one automatic durable prompt-capture path.
The worker's original privacy, internal-payload and project-exclusion gates run before memory is injected into the request's existing leading system message. The adapter preserves its other system fields, tool declarations and remaining messages. Tools and one summary follow accepted prompt admission through the same session queue, with genuine tool-call IDs. Worker failures warn once when UI is available and leave Pi usable; unacknowledged turns remain unanchored. Worker address/settings resolution and manual progressive recall are unchanged.
Fork/switch use the genuine new/current SID. A new ask on any active branch receives its actual new user-entry ID. A same-SID retry of an older branch entry is acknowledged as a duplicate but is not treated as the current worker turn when a newer prompt exists: automatic context, tools and summary are suppressed rather than attached to that newer turn. Rewinding worker turn state is outside this change.
Actual supported-version Pi hosts, real worker persistence and queue ordering remain to be verified. Required scenarios include distinct equal-text asks; same-entry retry/restart; fork/switch/branch and older-branch suppression; private/excluded then public turns; images; missing IDs/unknown workers; and worker outage. The contract tests use mocked callbacks and are not native-host evidence.