The transcript now shows a visual spacer where context was cleared or compacted.
The interactive session UI now instantiates a dedicated store (class qie) that records where a view-clear happened, tracking clearedAfter/conversationKey against the transcript and firing telemetry when it's invoked. It's threaded into the main session component as a new clearedView prop and disposed alongside the other session-lifecycle objects.
The message-list renderer threads this clearedAfter value through props and computes a render index (j5e = JJo.count(xv, NE, FJo) - 1) at which it inserts a spacer element keyed cleared-${id} with a blank height equal to the viewport rows, similar to the existing 'unseen messages' divider. This gives a visual break in the transcript at the point context was cleared (e.g. via /clear or compaction), rather than showing cleared and post-clear messages contiguously.
The entry above is what we published on the day. These lines were added later, as Anthropic's own pages caught up, and they sit beside the original rather than replacing it.
With [streaming input](/docs/en/agent-sdk/streaming-vs-single-mode), a message that is still queued when a turn ends at the max-turns limit stays queued. Claude Code doesn't add it to that turn's last model call. It starts a new turn for t…agent-sdk/agent-loop see the edit
* **Later in a running session**: after `/clear` or a compaction, `SessionStart` fires again with the servers already available, and its `mcp_tool` hooks run.hooks see the edit
Anthropic's documentation has since written up /clear, on Hooks reference.