Agents forget between sessions, and the notes you leave them go stale when the code moves. MEX delivers your notes to every new Claude Code and Codex session and holds back the ones the code has made false.
[!NOTE]
This is MEX 0.9 beta, a pre-release on npm's next tag. npm i mex-agent still installs 0.8.5.
The beta is a CLI for Claude Code and Codex. It has no Hub, MCP server or skills.
On 0.8? See the 0.8.5 README and Upgrading from 0.8.
Install
Needs Node 22.5 or later (with node:sqlite) on Windows, macOS or Linux, plus Claude Code or Codex.
mex installs MEX's hooks in your Claude Code and Codex user settings, reads the repo, and shows what your agents get from now on. The first screen makes no model calls and adds nothing to git.
Codex: review and trust MEX's hooks once: /hooks in the Codex CLI, or Review hooks beside the message box in the Codex app. Until then Codex skips them, and MEX does nothing there.
Then tell your agents something they keep getting wrong:
mex note "<something your agents keep getting wrong here, and why>"
# for example:
mex note "Dates are stored in UTC because the reports job compares them across regions"
Start a new Claude Code or Codex session and ask about it.
Install globally. MEX won't install hooks from a one-off npx run, because npm clears that cache.
What you get
Tell it once.mex note saves a fact, rule or decision in your words. It reaches every new Claude Code and Codex session, through the session start and each agent's own rule files.
Never fed stale. Each note carries checks against the code. When the code makes a note false, MEX holds it back. When the evidence behind it changes, the agent gets a pointer to the current code instead of the old claim.
The right moment. A folder's pitfall arrives when the agent first reads a file there, once. A rule you state in passing ("we always use pnpm here") is repeated to the agent for that turn. Your repo's test and build commands reach the agent without you writing them down.
Yours to control.mex what shows what MEX gave or held back this session. mex off stops it in a repo. mex uninstall restores your settings exactly and keeps your notes.