[BUG] SubagentStop command hook not firing in VS Code IDE extension
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
SubagentStop command hooks defined in .claude/settings.json do not fire when subagents complete in VS Code IDE extension. The hook script is never executed and no output is produced.
Other hooks (Stop, PreToolUse, PostToolUse, SessionStart, PreCompact) work correctly in the same settings.json file. Only SubagentStop never fires.
What Should Happen?
SubagentStop hook should fire after each subagent completion, executing the configured command script.
Error Messages/Logs
Steps to Reproduce
- Add SubagentStop hook to .claude/settings.json:
"SubagentStop": [{"hooks": [{"type": "command", "command": "python ./.claude/scripts/log-agent-invocation.py"}]}]
- The script reads stdin JSON and appends to a log file
- Invoke a subagent via Agent tool (e.g. reviewer agent from .claude/agents/reviewer.md)
- After subagent completes — log file is never created, script never executes
- Same behavior with type "prompt" hooks on SubagentStop
Note: Other hooks in the same settings.json fire correctly.
Claude Model
Opus
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.81
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
Other
Additional Information
Related issues: #13898 (Custom Subagents Hallucinate Instead of Using MCP Tools), #13605 (Custom Plugin Subagents Cannot Access MCP Tools)
Tested across multiple sessions and projects. The SubagentStop event appears in settings.json validation (workspace readiness gate shows "8 hook types" including SubagentStop) but the actual hook never executes at runtime.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗