Unclear What the hook text and own-note fields are used for once switched on is not known.
What
Claude Code keeps a record of every message in a conversation. Until now a message was built with only its content and a flag saying whether it was a behind-the-scenes ("meta") message. This release adds new labels to those records:
rowSourcerecords where a message came from. A stop hook's blocking message gets its source fromstopBlockRowSource(hook). Other meta messages are tagged "local", and task notifications are tagged "harness". The builder for user messages also gains arowSourcefield.hookTextmarks text that came from a hook, which is a script you configure to run at set points. A stop hook runs when Claude is about to finish its turn, and when it blocks Claude from finishing, its error message is now created withhookTextset. On user messages,hookTextcomes with a companion field,hookTextLead.ownNotecan be attached to user messages, plusownNoteTextfor one particular content value.
On user messages, hookText and ownNote are attached only when a check passes. Two identical copies of that check exist, one for each field. The check first reads the environment variable CLAUDE_CODE_SHINY_FOUNTAIN, which is a setting you can give a program when you start it. If that variable is not set, the check falls back to the remote flag bot_protected_tengu_shiny_fountain, a switch Anthropic's servers control. Nothing has been read about this flag, and the value it falls back to was not resolved.
Why
In practice, the conversation record can now tell apart messages that came from hooks, from Claude Code itself and from task notifications. You see nothing new on screen. The extra fields on user messages stay dormant unless the environment variable or the server flag turns them on.
What the hook text and own-note fields are used for once switched on is not known.