The desktop app never sources a shell rc, so a key that exists only as MEM0_API_KEY
in .zshrc is invisible there and the plugin silently no-ops. Claude Code injects the
userConfig value as CLAUDE_PLUGIN_OPTION_API_KEY (v1 read it, v2 did not).
- resolve_api_key() -> (key, source): env, plugin config, legacy plugin config, keychain
- health now reports WHERE the key came from, which is how you tell the two apart
- every logged event records the editor, and a new 'sessions' command lists which
surfaces have actually built packs and written memories
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
SessionStart failed with 'pyenv: mem0-agent: command not found' in any repo whose
.python-version selects a Python the console script was not installed into. A
pip entry point is the wrong dependency for a plugin.
- bin/mem0-agent: POSIX launcher that picks the first CPython >= 3.10 it can find
and runs the package from source (there are no third-party dependencies)
- hooks now invoke ${CLAUDE_PLUGIN_ROOT}/bin/mem0-agent, matching how the v1
plugin calls its own scripts; the generator enforces this
- app_id override renamed to MEM0_AGENT_APP_ID: v1 exports MEM0_PROJECT_ID, which
was silently overriding this plugin's project scope while both are installed
Verified: all six hooks exit 0 from a pyenv-3.11 repo, and app_id resolves per
repository again.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The generated manifest writes 'mem0-agent context --session-id $CLAUDE_SESSION_ID',
but the flag was only on the top-level parser, so argparse rejected it and every
SessionStart hook exited 2 -- the plugin would install and silently do nothing.
Both orders now work, and a new test runs every command line in the manifest
through the parser so a manifest/CLI mismatch fails the build.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude Code auto-discovers a plugin's hooks at <plugin>/hooks/hooks.json. The
generator was writing to hooks/generated/, so the manifest existed but was never
loaded and no hook would have fired on install.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- pack.py: single-call context pack, budgeted, sanitized, cached, with
served-id tracking that turns a citation into POSITIVE feedback
- assist.py: error-signature lookup (never raw stdout, which returned 0 results in v1)
- maintain.py: transactional consolidation (add merged -> verify -> delete sources)
- transcript.py: JSONL parsing into non-overlapping windows via a cursor
- cli.py: the twelve commands the hooks invoke; detached assist queues a block
that the next prompt hook drains, keeping the hot path network-free
- hooks generated from one spec; plugin manifest, MCP wiring, five skills
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>