claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

Session-start-hook tags visible in terminal output

Open lubosstrejcek opened this issue 1 year ago • 6 comments

Description

The <session-start-hook> and </session-start-hook> XML tags are being displayed in the terminal output when Claude Code starts, instead of being hidden as internal markers.

Expected Behavior

The tags should be stripped from the display and only the hook output should be shown:

> 🔍 Gathering STREYDA Platform Status...

📊 Hub Status Check:
  ✅ Hub Database: 644K
...

Actual Behavior

The tags are visible in the output:

> <session-start-hook>🔍 Gathering STREYDA Platform Status...

📊 Hub Status Check:
  ✅ Hub Database: 644K
...

✅ Platform status check complete</session-start-hook>

Environment

  • Claude Code Version: v2.0.8
  • Model: Sonnet 4.5
  • Platform: macOS (Darwin 25.0.0)

Steps to Reproduce

  1. Configure a .claude/session-start.sh hook script
  2. Start Claude Code in a directory with the hook configured
  3. Observe the tags appearing in the terminal output

Impact

Minor visual issue - the tags are confusing and look like rendering errors to users.

lubosstrejcek avatar Oct 05 '25 11:10 lubosstrejcek

While I agree this is a problem, it should be enabled if the user turns on verbose logging in /config.

Basically anything that reaches the model should be shown during verbose.

KJ7LNW avatar Oct 30 '25 03:10 KJ7LNW

This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.

github-actions[bot] avatar Dec 09 '25 10:12 github-actions[bot]

still occuring

lubosstrejcek avatar Dec 25 '25 10:12 lubosstrejcek

This issue has been automatically closed due to 60 days of inactivity. If you're still experiencing this issue, please open a new issue with updated information.

github-actions[bot] avatar Jan 26 '26 10:01 github-actions[bot]

This issue was closed incorrectly despite recent human comments. This behavior of the bot is reported at https://github.com/anthropics/claude-code/issues/16497. Please upvote that issue, so maybe it gets noticed.

marcindulak avatar Jan 26 '26 11:01 marcindulak

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.

github-actions[bot] avatar Feb 02 '26 14:02 github-actions[bot]