neuron exec — Pre-Execution Memory Lookup
neuron exec -- <command> runs a command with a pre-execution memory
lookup. Matches print to stderr, filtered through the
relevance gate: a result whose
top hit has no keyword match at all is rejected, regardless of semantic
similarity. If the gate rejects every candidate, neuron exec still prints
a line naming the command and how many candidates it rejected, so an empty
result is distinguishable from an empty store. The command itself runs with
inherited stdio, and its exit code passes straight through.
neuron exec -- npm testneuron exec -- git commit -m "message with spaces"Arguments are spawned as an argv array, so quoting is preserved — a
multi-word -m value reaches the underlying command intact. To use shell
operators (&&, pipes), pass the whole thing as one quoted string instead:
neuron exec -- "npm run build && npm test"Which categories get searched
Section titled “Which categories get searched”Which categories exec searches, and how many results it returns, comes
from pullRules.onExec in neuron.yaml — matched against the command text
by regex. See the config reference
for the exact field shape.
Limitations
Section titled “Limitations”neuron exec is purely informational — it never blocks the command it
wraps, even when it finds a highly relevant match. On Claude Code and Codex
CLI, neuron init wires a pre-command hook that runs this same lookup
automatically on every shell tool call, surfacing a hit as context instead
of requiring the agent to remember to type neuron exec itself — see the
harness adapter pages for which harnesses get
that hook.
Source: README.md “Command execution gets the same treatment”.