claude-code - 💡(How to fix) Fix Feature request: Display SessionStart hook stdout to user in terminal [1 comments, 2 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#47117Fetched 2026-04-13 05:41:00
View on GitHub
Comments
1
Participants
2
Timeline
5
Reactions
0
Author
Timeline (top)
labeled ×4commented ×1

Fix Action

Fix / Workaround

Current Workaround

Code Example

─────────────────────────────────────────────────
Startup Summary
─────────────────────────────────────────────────
  Worktree:    magic5, branch: feature/PLA-1159-...
  Config:      healthy
  Claude Code: v2.1.104
  System:      load 3.2
  Vercel CLI:  v50.44.0
─────────────────────────────────────────────────
RAW_BUFFERClick to expand / collapse

Problem

SessionStart hook stdout goes into system-reminder context (visible to Claude) but is not visible to the user in the terminal. Neither stdout nor stderr from SessionStart hooks produces terminal-visible output.

This means hooks that produce health summaries, version checks, or status reports can only be seen when the user sends their first message and Claude relays the output. There's no way for a hook to display information to the user at startup without requiring user interaction first.

Use Case

I run multiple SessionStart hooks that check worktree sync state, config health, CLI versions, and system load. I built a unified startup summary hook that produces a compact health block:

─────────────────────────────────────────────────
Startup Summary
─────────────────────────────────────────────────
  Worktree:    magic5, branch: feature/PLA-1159-...
  Config:      healthy
  Claude Code: v2.1.104
  System:      load 3.2
  Vercel CLI:  v50.44.0
─────────────────────────────────────────────────

Currently this only appears when Claude responds to the first message. I'd like to see it in the terminal immediately after hooks finish, before I type anything.

Proposed Solution

Add a mechanism for SessionStart hooks to produce terminal-visible output. Options:

  1. New output channel: A hook property like "output": "terminal" that routes stdout to the terminal instead of (or in addition to) system-reminder context
  2. Startup greeting: A config option to display text after hooks complete (e.g., "startupMessage": "bash ~/.claude/hooks/startup-summary.sh")
  3. Both channels: SessionStart hook stdout goes to both the terminal AND system-reminder context, so the user sees it and Claude has it in context

Option 3 (both channels) would be the most useful — the user sees the summary immediately, and Claude can reference it if asked.

Current Workaround

The hook includes an instruction prefix ("Display this block to the user at the start of your first response") that tells Claude to relay the summary. This works but requires sending a first message, and burns tokens on the relay.

Environment

  • Claude Code v2.1.104
  • macOS (iTerm2)
  • 12 git worktrees with SessionStart hooks for health monitoring

extent analysis

TL;DR

Implement a mechanism to route SessionStart hook stdout to the terminal, such as adding an "output" property or a startup message config option.

Guidance

  • Consider adding a new output channel for SessionStart hooks, allowing stdout to be routed to the terminal instead of or in addition to the system-reminder context.
  • Explore the possibility of a startup greeting config option to display text after hooks complete, such as running a script to generate the startup summary.
  • Investigate the feasibility of sending SessionStart hook stdout to both the terminal and system-reminder context, ensuring the user sees the summary immediately and Claude has it in context for reference.
  • Review the current workaround and its limitations, including the need for user interaction and token usage.

Example

No code snippet is provided as the issue does not imply a specific code solution, but rather a design or configuration change.

Notes

The solution will depend on the capabilities and limitations of the Claude Code platform and its configuration options. The proposed solutions may require changes to the platform or its API.

Recommendation

Apply a workaround, such as using the proposed "output" property or startup message config option, as upgrading to a fixed version is not mentioned in the issue. This will allow for a temporary solution until a more permanent fix is implemented.

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 Feature request: Display SessionStart hook stdout to user in terminal [1 comments, 2 participants]