[FEATURE] Render hook system messages with user-facing labels

Open 💬 0 comments Opened Jul 13, 2026 by Pappmann

Feature Request: Render Hook System Messages with User-Facing Labels

Problem Statement

Claude Code renders hook systemMessage output with a technical, English UI-generated prefix such as:

SessionStart:startup says: 20 nicht kuratierte Sessions ...

The hook author can localize the message content, but not the Claude Code prefix. For users working
in German or another non-English environment, the hardcoded says: prefix and internal hook name
make the warning look like a technical trace instead of a user-facing notice.

This is not limited to SessionStart. Any hook that returns systemMessage can surface user-facing
information, warnings, or reminders. Those messages should be readable as UI notices, not as raw hook
implementation details.

Implementation Finding

Local inspection of Claude Code 2.1.207 suggests the displayed prefix is assembled in two steps:

  • hookName is derived from the hook event and matcher/source, effectively

hook_event_name + ":" + source, for example SessionStart:startup.

  • The TUI renderer for hook_system_message then displays <hookName> says: <content>.

That means localizing only says: is not enough. The generated hook display name also needs a
user-facing label, or at least a less technical fallback.

Proposed Solution

Render hook systemMessage attachments with a user-facing display label instead of raw
<hookName> says:.

For German locale, examples could be:

| Hook / context | Current example | Suggested German display |
|---|---|---|
| SessionStart:startup | SessionStart:startup says: <message> | Hinweis beim Sitzungsstart: <message> |
| SessionStart:resume | SessionStart:resume says: <message> | Hinweis beim Fortsetzen: <message> |
| SessionStart:clear | SessionStart:clear says: <message> | Hinweis nach Zurücksetzen der Sitzung: <message> |
| SessionStart:compact | SessionStart:compact says: <message> | Hinweis nach Kompaktierung: <message> |
| PreToolUse / PostToolUse | <hookName> says: <message> | Werkzeug-Hinweis: <message> |
| Stop / SessionEnd | <hookName> says: <message> | Sitzungs-Hinweis: <message> |
| Other hooks | <hookName> says: <message> | Hook-Hinweis: <message> |

The hook JSON schema does not need to change. This can be handled as a TUI rendering improvement:
map known hook events and sources to display labels, keep the raw hook name available for logs/debug
output, and use a generic localized fallback for unknown hooks.

Minimal Fallback Improvement

If full localization is not available yet, a smaller improvement would still help:

  • Strip matcher/source details such as :startup from user-facing systemMessage prefixes.
  • Replace says: with a neutral localized verb.

For example:

SessionStart sagt: ...

This is more readable than:

SessionStart:startup says: ...

It is still not ideal because SessionStart remains an internal hook event name rather than
localized UI copy.

Alternative Solutions

  • Add a new hook output field such as displayTitle, but this puts localization responsibility on

every hook author.

  • Keep the current prefix and ask hook authors to start their message with a localized title. This is

only a partial workaround because the Claude Code-generated prefix remains visible.

  • Document that systemMessage is meant for developer-facing hook diagnostics only. This would not

match the current practical use: hooks already use it for user-facing warnings and reminders.

Priority

Medium - Would be very helpful.

Feature Category

Interactive mode (TUI).

Use Case Example

  1. A SessionStart hook returns a localized German reminder via systemMessage.
  2. Claude Code currently shows SessionStart:startup says: ....
  3. The user expects the message to read as a standalone UI notice, for example

Hinweis beim Sitzungsstart: ....

The same concern applies to other hook-based notices, such as tool-policy warnings or session-end
reminders. The rendered prefix should describe the notice in user language, while internal hook names
remain available in debug logs.

Environment

  • Claude Code: 2.1.207
  • OS: Ubuntu/Debian Linux
  • Hook output field: systemMessage
  • Observed hook event: SessionStart

View original on GitHub ↗