You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 24, 2026. It is now read-only.
PolyPilot registers zero SDK hooks despite 6 being available (PreToolUse, PostToolUse, UserPromptSubmitted, SessionStart, SessionEnd, ErrorOccurred). Instead, tool monitoring is done by counting ToolExecutionStartEvent/ToolExecutionCompleteEvent events, and error handling is scattered across multiple catch blocks.
Problem
PolyPilot registers zero SDK hooks despite 6 being available (PreToolUse, PostToolUse, UserPromptSubmitted, SessionStart, SessionEnd, ErrorOccurred). Instead, tool monitoring is done by counting
ToolExecutionStartEvent/ToolExecutionCompleteEventevents, and error handling is scattered across multiple catch blocks.SDK Hooks Available
OnPreToolUseOnPostToolUseOnUserPromptSubmittedOnSessionStartOnSessionEndOnErrorOccurredJS-Only Hooks (not in .NET SDK yet):
AgentStop— fires when agent stops; can returndecision: "block"to force continuationSubagentStop— same for subagents; could prevent workers from stopping too earlyWhat to Change
Phase 1 (low risk):
OnPreToolUseandOnPostToolUsefor accurate tool call counting — replaceActiveToolCallCountevent-based trackingOnErrorOccurredfor centralized error handling with retry supportPhase 2 (medium risk):
OnPreToolUsewithSessionConfig.AvailableTools/ExcludedToolsto enforce tool restrictions per worker roleOnUserPromptSubmittedto inject dynamic context (e.g., squad decisions.md) at prompt time instead of in BuildWorkerPromptPhase 3 (when .NET SDK adds them):
AgentStop/SubagentStopto supplement watchdog — could reduce some timeout tiersNote
Hooks supplement but do NOT replace the custom watchdog (see processing-state-safety skill SDK migration matrix for why).