Repository navigation
Clear the attention badge once a Claude question is answered - #1063
Conversation
No ping names a transcript question, and the stream resolves it only after the response ping, so the tracker can settle it neither by id nor by re-reading. As in the web UI, a parallel subagent's quickly answered permission can clear an open question's mark early. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
PR Summary by QodoClear attention after Claude questions are answered
AI Description
Diagram
High-Level Assessment
Files changed (3)
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8f1ed230bb
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| return; | ||
| } | ||
| SettleQuestions(s); | ||
| s.SettlesQuestions = true; |
There was a problem hiding this comment.
Stop settlement at a newer pending ping
When a new PermissionPending for the same session arrives before this response-triggered reconciliation completes (within the debounce window or during a retry), OnPending reuses the session without clearing SettlesQuestions. The next snapshot therefore treats every transcript question it contains as answered, including a question issued after this response, so that question never lights the attention badge. A later pending ping must end or supersede this blanket settlement claim.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 0e6bccb: OnPending now withdraws the claim. The debounce alone made this nearly unreachable for one agent, but a failing read keeps the claim armed through its retries (up to 30 s apiece), so a question asked meanwhile was settled unseen and never lit. A_question_asked_while_the_answers_read_is_retrying_still_lights reproduces it and failed before the change. The trade, recorded in docs/CHANGES.md: a question the set did not yet hold stays lit when a parallel prompt lands inside that window, which is the cheaper of the two errors.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Code Review by Qodo
1.
|
A failing read keeps the claim armed through its retries, so a question asked meanwhile would be settled unseen and never light on a session only the tracker reports. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Closes #1061 — AI-3017
What & why
For a Claude
AskUserQuestionthe hook's request id is broadcast but never written to the session stream, and the transcript uuid is written but never broadcast; the stream also trails the pings by the watcher's one-second poll.SessionAttentionTrackerreads the stream after the response ping, finds the question recorded and unresolved, and holds the rail's!with nothing left to remove it. A response naming an id the set does not hold now settles the session's transcript questions — held, or listed by the read it triggers — and a settled id stays settled.Where to look
Same rule and same cost as the web UI: a parallel subagent's permission, answered before the tracker read it, clears an open question's mark early. A lost connection or a later pending ping withdraws the claim on the next read, so a question asked meanwhile still lights — a failing read's retries keep that window open far longer than the debounce.
Verification
SessionAttentionTrackerTests: 5 of the 6 new tests fail without the tracker change; 14/14 pass with it.Capacitor.App.Tests.Unit: 2648 passed, 0 failed. Not exercised in the running app.🤖 Generated with Claude Code