Skip to content

Detached post-session capture ​

When you close a Claude Code session, the plugin starts one more Claude Code turn in the background. That turn reads what happened in the session and saves the durable records to memory. You see nothing and have nothing to do.

It costs a model turn every time a session closes. The background turn runs claude-sonnet-5 through your own Claude Code sign-in, so it counts against your Claude subscription or API credits. It reads only the part of the session no earlier capture has saved, so a session already captured while you worked leaves little to read. It runs once per session, when the session closes.

Where it runs: Claude Code in a terminal. It does not run in the Claude desktop app's Code tab (see capture before you close), and it is not available on Oh-My-Pi. In both, run /neuronzai:capture before closing a session you care about.

What it does ​

The background process is separate from your terminal, so closing the window doesn't stop it. It runs one silent turn over the session and stops.

  • It keeps what you'd bring up again. It saves what was learned and decided, what was weighed and why, what was left open, and how you reacted, using the same test as self-consolidation. A CI result or a command's exit status isn't kept.
  • It works from evidence. It sees what your tools actually returned, so a fact a command proved is saved as verified, and a fact the session only claimed is saved as unverified.
  • It checks memory first. It searches existing records for each candidate, updates an older record instead of adding a duplicate, and flags a contradiction rather than picking a side.
  • It reads only what hasn't been captured. It starts where the last capture in the session stopped, plus a couple of turns of context. A capture you interrupted counts as not done, so that part is read again.
  • It can't change anything outside memory. It can read and search the files the session touched and call Neuronz.ai's memory tools. It can't run commands, edit files or reach other network services, and it treats the session as a record to summarize, never as instructions to follow.
  • It never creates a rule. A rule it notices is saved as a proposal that waits for your approval. See rules.

Claude Code writes a transcript for the background turn; the plugin deletes it when the run finishes.

Checking that it ran ​

Each run writes a small JSON file under ~/.neuronzai/capture-runs/. A file with "status": "completed" is a run that finished; "started": false means the run never started. The records it saved appear in the dashboard.

Turning it off or changing the model ​

Detached capture is on by default. To change it, set one of these variables in the shell you launch Claude Code from, for example in ~/.bashrc or ~/.zshrc:

bash
export NEURONZAI_DETACHED_CAPTURE=0
VariableDefaultWhat it does
NEURONZAI_DETACHED_CAPTUREon0, false, off or no turns detached capture off. In-session self-consolidation keeps running.
NEURONZAI_CAPTURE_MODELclaude-sonnet-5The model the background turn uses. A small model can fail to save anything on a long session.
NEURONZAI_CAPTURE_EFFORTmediumThe highest reasoning effort the background turn uses. It never goes above your session's own effort.