Repository navigation
feat: show a delivered session message's body, with its header and guidance folded - #3052
Merged
Merged
Conversation
…idance folded A message one session sends another (an agent call, a reply, a task's input or round report) reached the console as the whole model input: the `[Message msg-…] Reply from … to your message …:` header, the body, and the guidance meant for the model, such as the replyToSession call, a report's framing and messageTask call, and the language note. Webchat and the session page showed all of it as the message. The daemon now keeps the readable part as the transcript row's `text` and the rendered message as `UserTurnBody.prompt`, which every model-facing read already prefers, so the model's input is unchanged. A new `UserTurnBody.sessionMessage` fact carries the header (id, kind, source agent and session, the message answered, whether a reply is owed) and the guidance verbatim as `notes`. A task report shows the task's final output, or its one-line status, and folds the framing. A wake paired with a visible platform post keeps that post's row as it was. The console captions such a bubble with its sender and folds the facts and notes under "more". Session titles, recall excerpts, and the context a webchat peer receives now carry the body instead of another session's header and reply instructions. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Reviewed revision fbb1531. No blocking findings.
The display split preserves the rendered model prompt through initial delivery, inbox persistence, replay, and context refresh. Paired visible posts retain their existing behavior, and the console handles both agent and user-side message bubbles.
Validation: diff check passed. I could not run tests locally because this checkout has no installed dependencies or pnpm; CI is still pending.
sent by review-bot (Codex · gpt-6-astra) · open in session
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.
Why
When one session sends another a message (an agent call, a reply, a task's input, or a task's round report), the console showed the model's whole input as the message. A task report in webchat read like this:
The header and the guidance are for the model, not for the person reading.
What changed
Daemon (
collab/session-message.ts,collab/coordinator.ts,daemon.ts,assistant/{tasks,patrol}.ts)text: the readable part. For a call, reply or task input that is its body; for a task report, the task's final output or its one-line status.turnBody.prompt: the rendered message, unchanged. The model reads it first everywhere: first delivery (session-manager), replay and context refresh (transcriptPromptText), and steering. Inbox replay carriesturnBodytoo.turnBody.sessionMessage: the header facts plus the guidance verbatim asnotes.renderInputbecomessessionInput.shownpart beside their text: the output, or the status line, plus the framing and themessageTaskcall. On a later session of the place, the hint swap applies to the folded note as well. Rows written before this change fall back to showing the whole text.transcriptTs) is left exactly as it was. It lands on that post's row, whose text and replay stay the post's own.Protocol
SessionMessageTurnFactsonUserTurnBody.sessionMessage: id, kind, source agent, label and session,inReplyTo,replyRequested,startsTask, andnotes.Web
parseUserTurnBodyvalidates the new fact, failing closed like the others.UserTurnDetailsfold shows the sender, session, message id, the message it answers, whether it awaits a reply, and "Guidance the agent received". The prompt itself is still never shown.Side effects, all toward the body: session titles no longer start with
[Message msg-…]. Recall excerpts, memory dream input, and the context post a webchat peer receives now carry the body instead of another session's header and reply instructions.Docs:
send-message-guide.md§9.5 records the split.Verification
turnBody.prompt ?? text, through amodelTexthelper. They still pin the exact rendered prompt.session-message-display.test.ts: the split, notes, and a report with and without output.daemon-message-agent: the call's display and facts, and the paired-post exemption.subsession-continuation: task input facts, and a report's shown status with its folded notes.SessionDetailViewpage test where the caption and body show, the prompt never does, and the fold reveals the facts and guidance.🤖 Generated with Claude Code · Claude Opus 5.5