Skip to content

fix: use stdout JSON systemMessage for SessionStart hook output#9

Merged
sestinj merged 1 commit intomainfrom
fix/hook-stdout-output
Feb 21, 2026
Merged

fix: use stdout JSON systemMessage for SessionStart hook output#9
sestinj merged 1 commit intomainfrom
fix/hook-stdout-output

Conversation

@sestinj
Copy link
Owner

@sestinj sestinj commented Feb 21, 2026

Summary

  • Claude Code doesn't display stderr from SessionStart hooks
  • Switch from eprintln! to printing a JSON object with systemMessage to stdout
  • Claude Code renders systemMessage in the UI on session start

Follow-up to #8.

Test plan

  • cargo check compiles
  • Manual test: start a new Claude Code session, verify URL appears in the UI

Thread: https://threader.sh/s/ewjVv4KJLn-A

🤖 Generated with Claude Code


Continue Tasks: ❌ 1 failed · ✅ 2 no changes — View all

Claude Code doesn't display stderr from SessionStart hooks. Switch to
printing a JSON object with systemMessage to stdout, which Claude Code
renders in the UI.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@sestinj sestinj merged commit b001908 into main Feb 21, 2026
1 of 4 checks passed
@continue-staging
Copy link
Contributor

Accessibility Review

No accessibility issues found in the changed files.

Files reviewed: src/cli/hook.rs

Note: This file is a Rust CLI handler that produces JSON output, not UI markup. No HTML/JSX/TSX content to review for accessibility.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant