claude-code - 💡(How to fix) Fix [Bug] SessionStart startup hook error: ToolUseContext is required for prompt hooks [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#54532Fetched 2026-04-30 06:43:04
View on GitHub
Comments
0
Participants
1
Timeline
4
Reactions
0
Author
Participants
Timeline (top)
labeled ×4

Error Message

⎿  SessionStart:startup hook error ⎿  Failed to run: ToolUseContext is required for prompt hooks. This is a ⎿  SessionStart:startup hook error ⎿  Failed with non-blocking status code: No stderr output ⎿  SessionStart:startup hook error ⎿  Failed with non-blocking status code: No stderr output ⎿  SessionStart:startup hook error ⎿  Failed to run: ToolUseContext is required for prompt hooks. This is a

RAW_BUFFERClick to expand / collapse

Bug Description Last login: Wed Apr 29 00:40:06 on console gesicht@gesicht GuruNote % claude ▐▛███▜▌ Claude Code v2.1.120 ▝▜█████▛▘ Opus 4.7 (1M context) · Claude Max ▘▘ ▝▝ ~/GuruNote ⎿  SessionStart:startup hook error ⎿  Failed to run: ToolUseContext is required for prompt hooks. This is a bug. ⎿  SessionStart:startup hook error ⎿  Failed with non-blocking status code: No stderr output ⎿  SessionStart:startup hook error ⎿  Failed with non-blocking status code: No stderr output

─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── ❯ ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── Press Ctrl-C again to exit ^C% gesicht@gesicht GuruNote % gesicht@gesicht GuruNote % claude ▐▛███▜▌ Claude Code v2.1.123 ▝▜█████▛▘ Opus 4.7 (1M context) · Claude Max ▘▘ ▝▝ ~/GuruNote ⎿  SessionStart:startup hook error ⎿  Failed to run: ToolUseContext is required for prompt hooks. This is a bug. ⎿  SessionStart:startup says: [GuruNote] recent context, 2026-04-29 1:26pm GMT+9 ────────────────────────────────────────────────────────────

 Legend: session-request | 🔴 bugfix | 🟣 feature | 🔄 refactor | ✅ change | 🔵 discovery | ⚖️ decision

 Column Key
   Read: Tokens to read this observation (cost to learn it now)
   Work: Tokens spent on work that produced this record ( research, building, deciding)

 Context Index: This semantic index (titles, types, files, tokens) is usually sufficient to understand past work.

 When you need implementation details, rationale, or debugging context:
   - Fetch by ID: get_o…

Note: Content was truncated.

extent analysis

TL;DR

The most likely fix is to ensure that ToolUseContext is properly configured and available for prompt hooks in the Claude Code setup.

Guidance

  • Verify that ToolUseContext is correctly set up and enabled in the Claude Code configuration.
  • Check the documentation for Claude Code v2.1.120 and Opus 4.7 to ensure that ToolUseContext is supported and properly configured.
  • Review the startup hook configuration to ensure that it is correctly referencing the ToolUseContext.
  • Consider checking for any updates or patches for Claude Code or Opus that may address the "ToolUseContext is required for prompt hooks" bug.

Notes

The provided issue content is truncated, which may limit the ability to provide a comprehensive solution. Additionally, the exact configuration and setup of Claude Code and Opus are not provided, which may affect the applicability of the suggested guidance.

Recommendation

Apply workaround: Ensure that ToolUseContext is properly configured and available for prompt hooks, as this is the most direct approach to addressing the reported error.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix [Bug] SessionStart startup hook error: ToolUseContext is required for prompt hooks [1 participants]