Skip to content

Muted notice lines for what the CLI says in its own voice - #221

Merged
eilonwy06 merged 2 commits into
eilonwy06:devfrom
LalaLolLucky:notices
Oct 23, 2026
Merged

eilonwy06 merged 2 commits into
eilonwy06:devfrom
LalaLolLucky:notices

Conversation

@LalaLolLucky

@LalaLolLucky LalaLolLucky commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

What changed and why

VS Code leaves small muted lines in a conversation for things the CLI says on its own. Eclipse drew none of them, and drew some wrongly. This adds them, on reopen and live where the CLI gives us the data.

New lines

  • Background agent hand-back: Agent "X" finished, … failed, … was stopped, … is waiting on its own background work. Reopened sessions use the transcript's own summary text (so they also show the CLI's failure cause, "by Claude" and the like); live, the CLI is launched with --replay-user-messages (as VS Code does, when the CLI knows the flag) and a notification delivered mid-turn comes back as a replayed user line with the CLI's exact wording, background commands included. One delivered after the turn has ended is not replayed; that keeps a line made from the end event, which says only completed, failed or stopped (a stop reads "by user" when the Stop agent button sent it) and only for agents that ran in the background.
  • Messages from a subagent or another session: a collapsed line (Message from subagent "<task>": <first line>) that opens to the message, with the CLI's warning frame removed. These were showing as user bubbles.
  • CLI notices (system/informational, level other than info): hook "says" lines, blocked-turn notices, and "Sonnet 5.5's safeguards stopped the response above · continuing once with that noted". Live via a new onCliNotice callback (onNotice is already the plugin's own).
  • Refusal fallback: the CLI's explanation, as a warning-bordered note.
  • Wrapped user text: teammate-message, bash-stdout (+ stderr, exit code), tick, mcp-resource-update, mcp-polling-update as collapsed lines with VS Code's labels.

Fix

  • The CLI's note to the model after a refusal ("Your response above was stopped by a safety classifier…") is a user line flagged isMeta + turnCompanion. It no longer shows as a message the user sent.

Differences from VS Code, on purpose

  • Reopened sessions also show the informational and refusal lines; VS Code only shows them live.
  • Subagents are named by the task they were launched with, not @name.

Not done

  • The turn-limit ending and the real failure cause of a hand-back delivered after the turn has ended (the CLI sends no user line for it), retracting messages after a refusal fallback, and the "Switched to X / Why?" band. Each needs data the live stream doesn't carry, or would duplicate the card.

How was this tested?

  • cargo test: 517 pass. New tests cover the reopened notices (hand-back dedupe across user line and queued attachment, peer messages with and without a known agent, informational/refusal/hook lines, the isMeta retry note), the live notice payload, and the "waiting on its own" tracking.
  • Page scripts pass node --check; the notice rows, the history branch and the wrapped notices were drawn in headless Chromium.
  • The touched Java compiles.
  • Not run in a live Eclipse instance, and the native library is not rebuilt. The live informational/hook rows are checked against made-up events only. The replayed hand-back was checked against output captured from a real CLI 2.1.306 run (an agent finishing mid-turn gave one Agent "…" finished line; one finishing after the turn gave none), but the replayed peer message was not: it needs a subagent that reports through the hand-back tool.

Checklist

  • I have not changed version numbers in MANIFEST.MF, feature.xml, or site.xml — the maintainer sets these on release.
  • I have not added a CHANGELOG.md entry — the maintainer adds this on release.
  • I have not hand-edited the generated p2 artifacts under com.anthropic.claudecode.eclipse.site/.
  • If this touches claude-eclipse-core: I ran cargo test, and for any platform I can build and run on, rebuilt the native library and exercised it in a running Eclipse instance.
  • If this would need a native library for a platform I can't build and test myself, I've left that out and said so above rather than including an untested binary. (No binary is included.)

Draw the notes VS Code leaves in a conversation, on reopen and live:
a background agent's hand-back ("Agent "X" finished" / "failed" /
"was stopped" / "is waiting on its own background work"), a message from
a subagent or another session as a collapsed line (it was showing as a
user bubble), the CLI's informational lines (hooks, the
safeguards-stopped notice), the refusal fallback's explanation as a
warning, and the terminal/teammate/tick/MCP wrappers.

The CLI's own retry note to the model after a refusal is flagged isMeta
and no longer shows as something the user said.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Launch the persistent CLI with --replay-user-messages (when it knows the flag),
as VS Code does. A task notification delivered mid-turn, and a message from a
subagent or another session, now come back as replayed user lines. They give the
exact "Agent "X" finished" / "Background command … completed" wording live,
which takes the place of the line made from the end event when that is up first,
and the peer message as the same collapsed line a reopened session shows.

A notification delivered after the turn has ended is not replayed; it keeps the
line made from the end event.

A peer message handed over mid-turn is queued like the user's own words, as a
queued_command attachment; its origin says it is a peer's, so it is a collapsed
line and not a user bubble.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@eilonwy06
eilonwy06 merged commit de4c76c into eilonwy06:dev Oct 23, 2026
5 of 6 checks passed
@github-actions github-actions Bot mentioned this pull request Oct 23, 2026
@LalaLolLucky
LalaLolLucky deleted the notices branch October 24, 2026 13:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants