Files
kartik-mem0 71dc0cae07 fix(plugins): read the mem0 CLI key and ignore unexpanded host placeholders
The Python plugin core and the opencode, pi and deepseek plugins now fall back to the key `mem0 init` saves in ~/.mem0/config.json, so a configured CLI is enough to authenticate. The Python core also stops using or caching a literal ${api_key} left behind when a host (Cursor) does not expand its plugin variables, which is what kept asking for auth after the key was set.

Fixes #7346
2026-09-25 10:24:04 +05:30

1.4 KiB

name, description, disable-model-invocation
name description disable-model-invocation
status Show whether Mem0 memory is working in this repository, covering configuration, capture state, pending flushes, and whether the Mem0 API key is valid. Use when the user asks whether memory is on, why a memory is missing, or anything looks broken. false

Memory status

Run both commands and report the combined result in plain language:

python3 "${CLAUDE_PLUGIN_ROOT}/core/memory_cli.py" --harness "claude-code" --plugin-data-dir "${CLAUDE_PLUGIN_DATA}" status --json
python3 "${CLAUDE_PLUGIN_ROOT}/core/memory_cli.py" --harness "claude-code" --plugin-data-dir "${CLAUDE_PLUGIN_DATA}" doctor

Summarize, using only fields the JSON actually reports: whether capture is active or paused, the user ID and repository scope (repo_id), whether an API key is configured, the event/flush/retrieval counts (flushes is the number of completed flushes, not a pending count), and the doctor check results. If doctor reports an authentication failure (401 / invalid key), say clearly that the Mem0 API key is invalid or expired and that memories are NOT being created. Never report an auth failure as "no memories found". When the key is missing or invalid, suggest updating the plugin's API key setting, exporting MEM0_API_KEY, or running mem0 init (the plugin reads the key the Mem0 CLI saves in ~/.mem0/config.json).