Official learning-output-style plugin SessionStart hook fails on Windows

Resolved 💬 2 comments Opened Dec 21, 2025 by lwnz42 Closed Dec 21, 2025

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?

The official learning-output-style@claude-plugins-official plugin fails to execute its SessionStart hook on Windows.

Instead of executing the hook script, Claude Code opens the .sh file in the user's IDE when launching. The plugin appears enabled in settings and Claude Code reports hook success, but the hook output is never passed to Claude's system context.

What Should Happen?

When Claude Code starts a new conversation, the SessionStart hook should execute session-start.sh, which outputs JSON with learning mode instructions. Claude should receive this output as additionalContext in the system prompt.

Error Messages/Logs

No explicit errors. When checking hook execution, Claude Code reports: SessionStart:Callback hook success: Success

<img width="750" height="162" alt="Image" src="https://github.com/user-attachments/assets/615e10f7-647c-4b2d-bdcf-97c8963a589a" />

Steps to Reproduce

Environment:

  • OS: Windows 10/11 (Git Bash environment)
  • Claude Code version: 2.0.75 (npm install)
  • Plugin: learning-output-style@claude-plugins-official (version ab2b6d0cad88), installed locally for user scope.

Steps:

  1. Install the plugin "learning-output-style" from claude-plugins-official marketplac
  2. Enable the plugin in settings.
  3. Restart Claude Code
  4. Start a new conversation
  5. Observed behaviour: The file ~/.claude/plugins/cache/claude-plugins-official/learning-output-style/ab2b6d0cad88/hooks-handlers/session-start.sh opens in your IDE
  6. Expected behaviour: The script should execute and Claude should receive learning mode instructions in its system context

Claude Model

None

Is this a regression?

No, this never worked

Last Working Version

_No response_

Claude Code Version

2.0.75

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

VS Code integrated terminal

Additional Information

Root Cause:

The hook configuration in hooks/hooks.json:

  {
    "description": "Learning mode hook that adds interactive learning instructions",
    "hooks": {
      "SessionStart": [
        {
          "hooks": [
            {
              "type": "command",
              "command": "${CLAUDE_PLUGIN_ROOT}/hooks-handlers/session-start.sh"
            }
          ]
        }
      ]
    }
  }

.sh files aren't executable without explicitly invoking bash, not sure if this is a windows issue or in general with CC.
But the command is treated as a file path rather than an executable.

Workaround:

Manually edit hooks/hooks.json to prefix the command with bash:

"command": "bash ${CLAUDE_PLUGIN_ROOT}/hooks-handlers/session-start.sh"

After this change and restarting Claude Code, the hook executes correctly and claude receives the hook correctly.

Suggested Fix:

Update the official plugin's hooks.json to use the bash prefix:
"command": "bash ${CLAUDE_PLUGIN_ROOT}/hooks-handlers/session-start.sh"

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗