[Bug] Function hooks `classic.PreToolUse` and `skill.prompt` not dispatched to modules despite documentation
Bug Description
Claude Code 2.1.281, function hooks (CLAUDE_CODE_ENABLE_FUNCTION_HOOKS=1): claude-code.d.ts documents classic.PreToolUse (ToolCallEnvelope e, additionalContext result, "rides tool.call") and skill.prompt (fires for /name, the Skill tool, and preloads) as module events. Neither is dispatched to a module. A plugin with one * hook logging every dispatched event during a headless -p session with Read, Bash, Write, and Skill calls saw tool.call, tool.check, command.run, turn., and session., but no classic.* event and no skill.prompt. The result is the same with or without a { tool: [...] } matcher, and with the outer tool.call hook removed. In claude plugin test, $.tool.call never reaches a classic.PreToolUse hook either. Expected: dispatch as documented, or the contract marks them as not delivered to modules.
Environment Info
- Platform: darwin
- Terminal: ghostty
- Version: 2.1.281
- Feedback ID: 3682069d-2baa-4887-bd60-3170f2c60302
Errors
[]This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗