{ "hooks": { "SessionStart": [ { "matcher": "startup|resume|compact", "hooks": [ { "type": "command", "command": "MEM0_EDITOR=claude-code ${CLAUDE_PLUGIN_ROOT}/bin/mem0-agent context --session-id \"$CLAUDE_SESSION_ID\"", "timeout": 10, "statusMessage": "Loading mem0 context..." } ] } ], "UserPromptSubmit": [ { "hooks": [ { "type": "command", "command": "MEM0_EDITOR=claude-code MEM0_LOCAL_ONLY=1 ${CLAUDE_PLUGIN_ROOT}/bin/mem0-agent observe --source prompt", "timeout": 3 } ] } ], "PostToolUse": [ { "matcher": "Bash", "hooks": [ { "type": "command", "command": "(MEM0_EDITOR=claude-code ${CLAUDE_PLUGIN_ROOT}/bin/mem0-agent assist-error >/dev/null 2>&1 &)", "timeout": 5 } ] } ], "Stop": [ { "hooks": [ { "type": "command", "command": "(MEM0_EDITOR=claude-code ${CLAUDE_PLUGIN_ROOT}/bin/mem0-agent flush >/dev/null 2>&1 &)", "timeout": 5 } ] } ], "PreCompact": [ { "hooks": [ { "type": "command", "command": "(MEM0_EDITOR=claude-code ${CLAUDE_PLUGIN_ROOT}/bin/mem0-agent flush --reason precompact >/dev/null 2>&1 &)", "timeout": 5 } ] } ], "SessionEnd": [ { "hooks": [ { "type": "command", "command": "(MEM0_EDITOR=claude-code ${CLAUDE_PLUGIN_ROOT}/bin/mem0-agent flush --reason end >/dev/null 2>&1 &)", "timeout": 5 } ] } ] } }