Native lifecycle capture
The observation lands before the session ends.
Captain Memo now speaks the lifecycle language of supported Codex, Gemini CLI and Kimi releases. Prompts retrieve context, useful tool results become observations, and turn-end events flush the queue—while automatic fallback protects every older session.
The AI session
The CLI emits its own prompt, tool-result and turn-end lifecycle events.
Captain Memo hooks
Recall before work. Capture evidence after tools. Flush safely at the end.
One local corpus
The same observation pipeline, search, provenance and privacy boundary as before.
Three lifecycle beats
Recall. Observe. Finish cleanly.
Each hook has one narrow job. The AI CLI stays in control of its session; Captain Memo only supplies memory and records reusable evidence.
Before the work
The prompt event retrieves relevant local memory, so a fresh session begins with decisions and lessons the other AIs already learned.
After useful tools
File edits, patches and command outcomes enter the observation queue with their originating CLI and session attached.
At turn end
The stop event asks the worker to flush pending evidence. It does not block the AI or move the corpus into a vendor cloud.
The compatibility map
Use the richest reliable signal.
Not every product exposes the same event payload. Captain Memo chooses the capture layer that preserves useful evidence instead of forcing every runtime into one shape.
Capability-probed prompt, PostToolUse and Stop hooks. Codex asks the user to review installed hooks once.
Capability-probed BeforeAgent, AfterTool and AfterAgent hooks, including the required vendor settings when supported.
Native prompt, PostToolUse and Stop hooks from the vendor version that introduced the lifecycle contract.
The current native tool event omits the input and result, so the richer persisted conversation remains the better source.
Ollama supplies the model and tool calling. Captain Memo observes the host agent—such as Kimi or opencode—that owns the loop.
The safety rule
Configuration is not proof.
A hook file can exist while a CLI is too old, a feature is disabled, approval is pending or delivery has failed. Captain Memo therefore decides at session granularity.
Fallback remains active
The transcript, rollout or conversation reader keeps watching. Installing hooks never turns it off by itself.
That session is native
Only after the worker accepts a native tool event does the matching fallback reader skip that exact session, preventing duplicates without creating gaps.
Proof in stats
Count delivery, not configuration.
The native counter records sessions that actually delivered an accepted tool event. A configured hook that never fires does not inflate it.
capture: { native: { codex: 1, gemini: 0, kimi: 0 } } # native.codex = 1 means a Codex tool event reached the worker
What stays true
A faster path into the same memory.
Native hooks are an input path, not a second memory product.
The corpus stays local
Observations still land in Captain Memo's local SQLite corpus and use the configured local or remote embedder exactly as before.
Foreign hooks stay intact
Connect merges Captain Memo's managed entries into supported CLI configuration without replacing unrelated user hooks.
Provenance stays visible
Every native observation carries its originating AI and session into the shared search and statistics surface.
Old versions keep working
Capability and version gates degrade to existing readers automatically. Native capture is an upgrade, never a migration cliff.