fix(session): alert for an agent waiting on artifact comments - #491
Open
irisitymichaelgrundberg wants to merge 1 commit into
Open
irisitymichaelgrundberg wants to merge 1 commit into
irisitymichaelgrundberg wants to merge 1 commit into
Conversation
An agent that publishes an artifact arms a monitor for its comments and ends its turn. Claude Code shows that on the footer as `1 Artifact comment monitor`, and Ark0N#473 put that chip on the list of background work, so the session counted as watching and its idle prompt opened already acknowledged. Unlike every other chip on the list, that monitor waits on the user: the agent hears nothing until somebody comments. Claude's `watchingLine` now refuses any footer that carries the chip, through a lookahead over the whole row, so a shell running beside the monitor cannot report the session as watching either. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
irisitymichaelgrundberg
marked this pull request as ready for review
September 25, 2026 06:30
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.
Follow-up to #473.
What goes wrong
An agent that publishes an artifact arms a monitor for its comments and ends its turn. Claude Code shows that on the footer as
· 1 Artifact comment monitor ·. #473 put that chip on Claude'swatchingLinelist, so the session counts as watching and its idle prompt opens already acknowledged. Every other chip on that list is work the agent runs for itself. This one waits on the user: the agent hears nothing until somebody comments, so the alert #473 quiets is the one the user needs.The fix
Claude's
watchingLinedrops the chip from its label list and gains a lookahead,^(?!.*Artifact comment), that refuses any footer row carrying it.^makes that work, and the registry comment says so, so a later tidy-up does not drop it.compileVersionRegex(). It has no nested quantifier and it is 164 characters, under the 200-character cap.docs/cli-registry.mdanddocs/wiki/Notifications-And-Approvals.mdeach gain a short paragraph about the exception.Verification
npm testpasses (433 files, 8302 tests), and typecheck, lint and format are clean.The new tests in
test/session-watching.test.tscover the chip on its own, the plural, both chip orders beside a shell, and a footer cut off mid-chip. The singular footer is a verbatim capture from a live session waiting on artifact comments. The plural is assumed.I also ran the stock pattern against the live pane of that session: before the change it reported
1 Artifact comment monitor, and after it reports nothing.A two-model review (Codex CLI and Claude, same diff, same brief) raised six findings, and I applied the five that called for a change.
🤖 Generated with Claude Code