SessionStart hooks don't fire when opening GUI panes

Resolved 💬 3 comments Opened Jan 8, 2026 by jedharris Closed Feb 21, 2026

Description

SessionStart hooks execute correctly when launching Claude Code via the claude command in terminal, but fail to fire when opening new panes in the GUI (via command palette "Open Claude in new tab" or the "+" button).

Reproduction Steps

  1. Create .claude/settings.json with SessionStart hook:
{
  "hooks": {
    "SessionStart": [
      {
        "hooks": [
          {
            "type": "command",
            "command": "echo 'Hook fired!' && cat current_focus.txt 2>/dev/null",
            "statusMessage": "Loading session context..."
          }
        ]
      }
    ]
  }
}
  1. Launch via terminal: claude → Hook fires, output appears ✓
  2. Open new GUI pane via command palette "Open Claude in new tab" → Hook does NOT fire ✗
  3. Open new GUI pane via "+" button from existing pane → Hook does NOT fire ✗

Expected Behavior

SessionStart hooks should fire consistently when new sessions start, regardless of whether the session was initiated via CLI or GUI.

Actual Behavior

  • CLI sessions: Hook fires and output appears in system-reminder
  • GUI panes: Hook does not fire, no output appears, no status message shown

Additional Context

  • Both CLI and GUI sessions use the same .claude/settings.json file
  • Working directory is identical in both cases
  • /hooks command shows hooks are registered (need to verify in GUI pane)
  • Settings file is valid JSON
  • No global settings file exists (~/.claude/settings.json is absent)

Impact

This prevents users from loading session context (documentation, current focus files, etc.) automatically when using GUI panes, forcing manual workarounds or limiting them to terminal-only usage.

Workaround

Using UserPromptSubmit hooks as a substitute, though this adds overhead by firing on every prompt rather than just session start.

View original on GitHub ↗

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