Stop hook error: TabManager not available in CLI environment
Description
Stop hooks that complete successfully still show an error at session exit in the CLI (terminal) environment:
Stop hook error: Failed with non-blocking status code: Error: unavailable: TabManager not available
Steps to Reproduce
- Install a plugin with Stop hooks (e.g., everything-claude-code plugin's
cost-trackerhook) - Run Claude Code in a terminal (not VS Code/IDE)
- End the session
- Observe the error in the stop hooks output
Expected Behavior
Stop hooks should complete silently when the hook script itself succeeds. The result reporting layer should handle the absence of TabManager gracefully in CLI environments.
Actual Behavior
The hook script runs fine and writes its output correctly, but Claude Code's internal hook result reporting throws "TabManager not available" because it assumes an IDE context.
Environment
- Claude Code CLI (terminal, not IDE)
- macOS (Darwin 25.3.0)
- The error is cosmetic/non-blocking — hook data still gets written correctly
Notes
The error originates from Claude Code's hook execution infrastructure, not from the hook scripts themselves. The TabManager appears to be an IDE-specific component that doesn't exist in the CLI context. The stop hook result reporting path should check for TabManager availability before attempting to use it.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗