fb00b517c0
Problem: npm install outputs "up to date in Xms" to stdout, which prepends non-JSON text to the hook output. Claude Code expects pure JSON and cannot parse the output, causing context injection to fail silently. Solution: Changed npm install flag from --loglevel=error to --loglevel=silent to completely suppress stdout output, ensuring clean JSON output for hook. Impact: SessionStart hook will now properly inject recent context into sessions. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
62 lines
1.3 KiB
JSON
62 lines
1.3 KiB
JSON
{
|
|
"description": "Claude-mem memory system hooks",
|
|
"hooks": {
|
|
"SessionStart": [
|
|
{
|
|
"hooks": [
|
|
{
|
|
"type": "command",
|
|
"command": "cd \"${CLAUDE_PLUGIN_ROOT}/..\" && npm install --prefer-offline --no-audit --no-fund --loglevel=silent && node ${CLAUDE_PLUGIN_ROOT}/scripts/context-hook.js",
|
|
"timeout": 300
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"UserPromptSubmit": [
|
|
{
|
|
"hooks": [
|
|
{
|
|
"type": "command",
|
|
"command": "node ${CLAUDE_PLUGIN_ROOT}/scripts/new-hook.js",
|
|
"timeout": 120
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"PostToolUse": [
|
|
{
|
|
"matcher": "*",
|
|
"hooks": [
|
|
{
|
|
"type": "command",
|
|
"command": "node ${CLAUDE_PLUGIN_ROOT}/scripts/save-hook.js",
|
|
"timeout": 120
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"Stop": [
|
|
{
|
|
"hooks": [
|
|
{
|
|
"type": "command",
|
|
"command": "node ${CLAUDE_PLUGIN_ROOT}/scripts/summary-hook.js",
|
|
"timeout": 120
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"SessionEnd": [
|
|
{
|
|
"hooks": [
|
|
{
|
|
"type": "command",
|
|
"command": "node ${CLAUDE_PLUGIN_ROOT}/scripts/cleanup-hook.js",
|
|
"timeout": 120
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
}
|