Bug
The context-mode plugin registers a PostToolUse hook in hooks/hooks.json with matcher: "" (empty string), which fires on every PostToolUse event — including TaskUpdate, TaskCreate, TaskGet, TaskList, and other internal tools that posttooluse.mjs was not designed to handle.
Symptom
Users see PostToolUse:TaskUpdate hook error on every TaskUpdate call, even when the hook exits 0.
This is consistent with known Claude Code bugs:
Suggested Fix
Narrow the PostToolUse matcher to exclude internal task management tools:
"PostToolUse": [
{
"matcher": "Bash|Read|Write|Edit|Grep|Agent|Task|mcp__plugin_context-mode",
"hooks": [
{
"type": "command",
"command": "node ${CLAUDE_PLUGIN_ROOT}/hooks/posttooluse.mjs"
}
]
}
]
Environment
- context-mode: v1.0.75 (plugin install via Claude Code)
- Claude Code: latest
- macOS Darwin 25.5.0, arm64
Bug
The context-mode plugin registers a PostToolUse hook in
hooks/hooks.jsonwithmatcher: ""(empty string), which fires on every PostToolUse event — includingTaskUpdate,TaskCreate,TaskGet,TaskList, and other internal tools thatposttooluse.mjswas not designed to handle.Symptom
Users see
PostToolUse:TaskUpdate hook erroron everyTaskUpdatecall, even when the hook exits 0.This is consistent with known Claude Code bugs:
Suggested Fix
Narrow the PostToolUse matcher to exclude internal task management tools:
Environment