@@ -12,7 +12,6 @@ import (
1212
1313 "github.com/entireio/cli/cmd/entire/cli/agent"
1414 "github.com/entireio/cli/cmd/entire/cli/agent/claudecode"
15- "github.com/entireio/cli/cmd/entire/cli/agent/cursor"
1615 "github.com/entireio/cli/cmd/entire/cli/agent/geminicli"
1716 "github.com/entireio/cli/cmd/entire/cli/logging"
1817 "github.com/entireio/cli/cmd/entire/cli/paths"
@@ -76,7 +75,6 @@ func newAgentHooksCmd(agentName agent.AgentName, handler agent.HookHandler) *cob
7675// "tool" for tool-related hooks (before-tool, after-tool),
7776// "agent" for all other agent hooks.
7877func getHookType (hookName string ) string {
79- // Note: Claude Code and Cursor share the same hook names (pre-task, post-task, post-todo)
8078 switch hookName {
8179 case claudecode .HookNamePreTask , claudecode .HookNamePostTask , claudecode .HookNamePostTodo :
8280 return "subagent"
@@ -140,16 +138,12 @@ func newAgentHookVerbCmdWithLogging(agentName agent.AgentName, hookName string)
140138 return fmt .Errorf ("failed to parse hook event: %w" , parseErr )
141139 }
142140
143- switch {
144- case event != nil :
141+ if event != nil {
145142 // Lifecycle event — use the generic dispatcher
146143 hookErr = DispatchLifecycleEvent (ag , event )
147- case agentName == agent .AgentNameClaudeCode && hookName == claudecode .HookNamePostTodo :
148- // PostTodo creates incremental checkpoints during subagent execution
144+ } else if agentName == agent .AgentNameClaudeCode && hookName == claudecode .HookNamePostTodo {
145+ // PostTodo is Claude-specific: creates incremental checkpoints during subagent execution
149146 hookErr = handleClaudeCodePostTodo ()
150- case agentName == agent .AgentNameCursor && hookName == cursor .HookNamePostTodo :
151- // PostTodo creates incremental checkpoints during subagent execution
152- hookErr = handleCursorPostTodo ()
153147 }
154148 // Other pass-through hooks (nil event, no special handling) are no-ops
155149
0 commit comments