Repository navigation
Conversation
…ession.notices
When a client does not advertise `session.notices`, a notice falls back to
an `agent_message_chunk` such as `**Notice:** …`. Clients render consecutive
chunks as one markdown stream, so the fallback lands mid-sentence right after
Claude's last chunk:
…all done.**Notice:** Stop says: token: 3 calls
The fallback text is now its own blockquote paragraph, with blank lines on
both sides so it starts on a new line and Claude's next chunk does not
continue the quote.
Claude Code also prefixes every line of a hook's `systemMessage` with
"<HookEvent> says: ", so a two-line Stop hook message read
"Stop says: a\nStop says: b". The informational fallback keeps the prefix on
the first line only when every line repeats it.
Clients that advertise `session.notices` are unaffected.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
When a client does not advertise
session.notices, a notice falls back to anagent_message_chunklike**Notice:** …. Clients render consecutive chunks as one markdown stream, so the fallback is glued to Claude's last sentence. In Zed 1.24 a Stop hook'ssystemMessageshows up as:The fallback is now its own blockquote paragraph, with blank lines on both sides:
Behavior
noticeOrTranscriptUpdatewraps the transcript text withtranscriptBlock: a leading blank line so it starts on a new line,>on every line, and a trailing blank line so Claude's next chunk does not continue the quote. This covers every transcript fallback (hook notices, "Task stopped by user", "Fast mode turned off", "Auto mode unavailable").systemMessagewith<HookEvent> says:. The informational fallback keeps that prefix on the first line only, and only when every line repeats the same prefix (collapseHookSpeaker).session.noticesget the samenoticeupdate as before.Turn.noticeTextsstill recordsmessage.contentunchanged, so the hook-blocked result de-duplication keeps working.Tests
transcriptBlockandcollapseHookSpeaker, plus an end-to-end test for a two-linenotice-level hook message.npm run check,npm run buildandnpm run test:runpass (3111 tests).