feat(hooks): Implement 10 core event hooks for session lifecycle and tool execution#2203
feat(hooks): Implement 10 core event hooks for session lifecycle and tool execution#2203DennisYu07 merged 29 commits intomainfrom
Conversation
📋 Review SummaryThis PR implements a comprehensive hook system with 10 core event hooks for the Qwen Code platform, enabling extensibility across session lifecycle, tool execution, conversation management, notifications, and subagent operations. The implementation follows a well-designed pipeline architecture with proper separation of concerns, though there are some areas for improvement in error handling and consistency. 🔍 General Feedback
🎯 Specific Feedback🟡 High
🟢 Medium
🔵 Low
✅ Highlights
|
Resolved |
|
ToolErrorType.OUTPUT_TRUNCATED silently replaced with undefined coreToolScheduler.ts:834: Changed ToolErrorType.OUTPUT_TRUNCATED to undefined — this loses error type information. Why was this changed? |
Resolved |
TLDR
This PR implements 10 core event hooks for the Qwen Code hook system, enabling extensibility across session lifecycle, tool execution, conversation management, notifications, and subagent operations. Each hook supports command-based execution with parallel/sequential execution modes, matcher filtering, and structured input/output contracts.
Key highlights:
SessionStart,SessionEndfor session boundary eventsPreToolUse,PostToolUse,PostToolUseFailurefor comprehensive tool call instrumentationPreCompactfor compaction hooksNotificationfor system notification interceptionSubagentStart,SubagentEndfor agent spawning lifecyclePermissionRequestfor automated permission decision-makingDive Deeper
The hook system follows a pipeline architecture with four main components:
Reviewer Test Plan
Run Integration Tests:
Testing Matrix
Linked issues / bugs