Captain Memo

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.

immediate tool evidenceper-session proofautomatic fallbackexplicit AI provenance

The AI session

The CLI emits its own prompt, tool-result and turn-end lifecycle events.

CodexGeminiKimi

Captain Memo hooks

Recall before work. Capture evidence after tools. Flush safely at the end.

recallobserveflush

One local corpus

The same observation pipeline, search, provenance and privacy boundary as before.

SQLiteFTS5vectors
Native capture changes how evidence arrives—not where it lives. The corpus remains local and shared across connected AIs.

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.

01

Before the work

The prompt event retrieves relevant local memory, so a fresh session begins with decisions and lessons the other AIs already learned.

02

After useful tools

File edits, patches and command outcomes enter the observation queue with their originating CLI and session attached.

03

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.

Codex
native

Capability-probed prompt, PostToolUse and Stop hooks. Codex asks the user to review installed hooks once.

Gemini CLI
native

Capability-probed BeforeAgent, AfterTool and AfterAgent hooks, including the required vendor settings when supported.

Kimi CLI
native ≥ 1.28

Native prompt, PostToolUse and Stop hooks from the vendor version that introduced the lifecycle contract.

Agy
conversation

The current native tool event omits the input and result, so the richer persisted conversation remains the better source.

Ollama
through host

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.

old CLIdisableduntrustedfailed delivery
first accepted tool event

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.

provendeduplicatedobservable

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.

captain-memo stats
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.