Skip to content

Needs you: a waiting chat shows the question it waits on, not the agent's last message - #23875

Merged
teamleaderleo merged 7 commits into
feat-cmux-nextfrom
leo/needs-you-preview
Oct 22, 2026
Merged

teamleaderleo merged 7 commits into
feat-cmux-nextfrom
leo/needs-you-preview

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

Leo hit this live: the Needs you list said "Waiting 5m" for a chat and showed the agent's last message, not the question the chat was waiting on.

Takes back #23847: its row falls back to the chat's last reply when acpmux names no question text (a permission, or a question without a prompt). That last reply is what Leo flagged. Here a row never shows it: a permission reads "Waiting for you to allow a tool", anything else the plain waiting line. #23847's question-prompt row stays as it is. #23912 already fixed the turn's waiting line on base, so this PR takes base's version of conversation/waitingOn.ts and adds no change there.

What changes

  • Needs you list: sometimes the page has not read a chat's ask yet. That happens with a chat on another computer, a grouped request, or a read that has not come back. The chat used to show as one "Waiting" row whose text was session.preview, the agent's last reply. Now the row shows what acpmux's session summary says the chat waits on (waitingOn and waitingPrompt):
    • A question shows its prompt, with the Decision tag that questions the page has read already get.
    • A permission is labeled as a permission: the Approval tag and "Waiting for you to allow a tool". The summary does not say which tool.
    • The last message is never shown.
  • No "Waiting" with nothing pending: a local chat with no open request and no waitingOn is no longer listed. A chat on another computer whose daemon reports neither field (an older peer) still shows from its indicator, with the plain "Waiting for your answer" line.
  • Gallery: agent-pane.needs-you list now has a question from another computer and a permission the page could not read. Each has a last message that must not appear in the list.

The selection lives in needsYou/model.ts (waitsOnPerson, waitingAsk). The fallback line is NeedsYou.tsx askText,.

Choices I made without asking:

  • A question keeps the existing Decision tag and a permission the Approval tag, so a row whose ask was not read looks like one whose ask was. I did not add a new tag.
  • at still comes from the session's updatedAt. Only the text and label selection changed.

One new string, needsYou.waitingPermission, is filled in for all 21 locales (machine-drafted, marked needs_review like its neighbours).

Changelog

  • Fixed: the Needs you list shows the question a chat waits on (or that it waits on a permission) instead of the agent's last message.

Red / green

Command (fleet): cmux-ci run --class light --script scripts/ci/run-webviews-tests.sh --env "CMUX_WEB_TEST_FILES=test/agent-pane-needs-you.test.tsx\nsrc/agent-session/acpmux/conversation/waitingOn.test.tsx"

  • Red on the test commit 83765d677807fc5408e491bd4ec2ffee48039253 (key needs-you-preview-red-83765d6778): failed as intended (step 340cc366e7ede02fc14e7ece): both files failed. agent-pane-needs-you.test.tsx had 2 of 21 tests fail (the waiting-chat preview test and a chat with nothing pending is not listed as waiting), and waitingOn.test.tsx failed its question test
  • Green on the fix 1905335afa56a1aa8be36fd82da928ace45a2b26 (key needs-you-preview-green-1905335afa): passed (step f5d3be51e0333dff96196561): both files pass
  • App compile check on 1905335afa56a1aa8be36fd82da928ace45a2b26: job 16f83e818f837cf89d26f537, passed.

Second round (a chat waiting on a secret, with no pending permission and no waitingOn, must stay listed as "Waiting for your answer"):

  • Red on the test commit e6612852703c0652e55401a717bffc4eedf5f63d (key needs-you-secret-red-e661285270, step d84fb60638f5d9dfc6643fdc): only the new secret test failed, and it failed again when run alone
  • Green on the fix 7ba9c8f5075b96e671d260297a4d78f46f2a6da9 (key needs-you-secret-green-7ba9c8f507, step 808d7adc4ed30e11cb64bd96): both files pass
  • App compile check on 7ba9c8f5075b96e671d260297a4d78f46f2a6da9: job fb3b5f7b666a210b45f1d27b, passed.

Observed / Not run

Observed: the red and green fleet runs above, scripts/web-lint.sh (passed), scripts/cmux-next/prepush-gate.py (no new violations), and cmux-ci compile-check --app (passed).

Not run: the gallery render of the updated agent-pane.needs-you variants (the PR's gallery run covers it), and a live repro in a tagged build. I checked acpmux's waitingOn/waitingPrompt and the status logic by reading the code (hub/views.rs status_indicator, hub/subsession_send.rs waiting_cut), not by running them. The New Tab "needs you" cards (newtab/screenModel.ts sessionCard) also show session.preview for a waiting chat. They are not this popover, so they are left for a follow-up.

Agent session: cosmic-gray

🤖 Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.


Summary by cubic

Fixes the Needs you list showing the agent's last message for a waiting chat; it now shows the question or permission the chat actually waits on, from acpmux's waitingOn/waitingPrompt.

  • A question row shows its prompt with the Decision tag; a permission row shows the Approval tag and "Waiting for you to allow a tool". The last message is never shown.
  • A local chat with nothing pending is no longer listed, while a chat acpmux marks waiting (such as one waiting on a secret) stays listed with the plain waiting line, as does a peer chat that reports no question text.
  • Adds the needsYou.waitingPermission string for all locales and updates the gallery to cover a remote question and a permission not read here.

Written for commit 9afa09a. Summary will update on new commits.

View guided diff Turn on auto-fix

teamleaderleo and others added 2 commits October 21, 2026 15:31
…st message

A chat whose ask the page has not read showed the agent's last message
under "Waiting". These tests want the question's prompt (or a permission
line), no item for a chat with nothing pending, and the turn's line to
read a pending question as a question, never "allow this?".

Adds the needsYou.waitingPermission string (21 locales) the tests name.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15ba3-d09a-7940-9fd6-158e10477c0e&host=cosmic-gray
…last message

A chat whose ask the page has not read (a chat on another computer, a
grouped request, a read still out) was one "Waiting" item whose line was
the session's preview: the agent's last message. It now reads what
acpmux names it waits on (waitingOn/waitingPrompt): a question by its
prompt (Decision), a permission as a permission (Approval, "Waiting for
you to allow a tool"). A local chat with nothing pending is not listed;
a peer chat whose daemon names neither still shows by its indicator.

The turn's line reads a pending question carried by a permission request
as "answer the question below", never "allow this?".

The gallery's list shows the remote question and a permission not read
here, each with a last message that must not appear.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15ba3-d09a-7940-9fd6-158e10477c0e&host=cosmic-gray
@teamleaderleo teamleaderleo added the risk:normal Risk tier (docs/ci/risk-tiers.md) label Oct 21, 2026
@github-actions

github-actions Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

cmux status (one comment, edited in place; each line is updated by the job that owns it)

Review 9afa09a: HQ feed card · gallery before/after runs · checks

App of this head (app.zip, kept 1 day)

gh workflow run reload-build.yml -R manaflow-ai/cmux --ref feat-cmux-next -f tag=pr23875 -f ref=leo/needs-you-preview -f platform=macos -f backend_mode=local

Gallery before/after for 9afa09a: 16 states rendered, 9 images differ, 1521 more touched states not rendered. Images are in the run's artifact, not on this public PR.

gh run download 39712898625 -R manaflow-ai/cmux -n gallery-advisory-23875-9afa09adc1473b064fc468fb99d10552a7f47cdf (then read gallery-review.json)

States
State Theme Status Diff Picked by
agent-pane.needs-you/list Apple System Colors changed 0.0193% own NeedsYou.gallery.ts
agent-pane.needs-you/list Apple System Colors Light changed 0.0176% own NeedsYou.gallery.ts
agent-pane.needs-you/badge-and-pill Apple System Colors Light changed 0.0191% own NeedsYou.gallery.ts
agent-pane.needs-you/badge-and-pill Apple System Colors changed 0.0183% own NeedsYou.gallery.ts
agent-pane.needs-you/pill-one-ask Apple System Colors Light unchanged 0% own NeedsYou.gallery.ts
agent-pane.needs-you/pill-one-ask Apple System Colors unchanged 0% own NeedsYou.gallery.ts
agent-pane.needs-you/ask-about-this Apple System Colors changed 0.0153% own NeedsYou.gallery.ts
agent-pane.needs-you/ask-about-this Apple System Colors Light changed 0.0149% own NeedsYou.gallery.ts
agent-pane.needs-you/compact Apple System Colors Light changed 3.97% own NeedsYou.gallery.ts
agent-pane.needs-you/compact Apple System Colors changed 3.92% own NeedsYou.gallery.ts
agent-pane.needs-you/empty Apple System Colors Light unchanged 0% own NeedsYou.gallery.ts
agent-pane.needs-you/empty Apple System Colors unchanged 0% own NeedsYou.gallery.ts
agent-pane.needs-you/before Apple System Colors Light unchanged 0% own NeedsYou.gallery.ts
agent-pane.needs-you/before Apple System Colors unchanged 0% own NeedsYou.gallery.ts
agent-pane.url-chip/globe Apple System Colors Light unchanged 0% names Localizable.xcstrings
agent-pane.url-chip/globe Apple System Colors unchanged 0% names Localizable.xcstrings
agent-pane.url-chip/cached-favicon Apple System Colors Light unchanged 0% names Localizable.xcstrings
agent-pane.url-chip/cached-favicon Apple System Colors unchanged 0% names Localizable.xcstrings
agent-pane.url-chip/token-url Apple System Colors Light unchanged 0% names Localizable.xcstrings
agent-pane.url-chip/token-url Apple System Colors unchanged 0% names Localizable.xcstrings
agent-pane.url-chip/pull-request Apple System Colors Light unchanged 0% names Localizable.xcstrings
agent-pane.url-chip/pull-request Apple System Colors unchanged 0% names Localizable.xcstrings
agent-pane.url-chip/pull-request-lines-by-kind Apple System Colors Light unchanged 0% names Localizable.xcstrings
agent-pane.url-chip/pull-request-lines-by-kind Apple System Colors unchanged 0% names Localizable.xcstrings
agent-pane.url-chip/pull-request-base-reds Apple System Colors Light unchanged 0% names Localizable.xcstrings
agent-pane.url-chip/pull-request-base-reds Apple System Colors unchanged 0% names Localizable.xcstrings
agent-pane.url-chip/pull-request-all-reds-on-base Apple System Colors Light unchanged 0% names Localizable.xcstrings
agent-pane.url-chip/pull-request-all-reds-on-base Apple System Colors unchanged 0% names Localizable.xcstrings
agent-pane.url-chip/pull-request-no-tests Apple System Colors changed 1.17% names Localizable.xcstrings
agent-pane.url-chip/pull-request-no-tests Apple System Colors Light unchanged 0% names Localizable.xcstrings
agent-pane.chat-width/standard Apple System Colors Light unchanged 0% imports NeedsYou.tsx (1 hops)
agent-pane.chat-width/standard Apple System Colors unchanged 0% imports NeedsYou.tsx (1 hops)

Pick other states with a Gallery: entry.id, entry.id/variant line in the PR body.

Unclear: web / react-apps-check failed: no known signature; failed step: Check webview test shards.

CI failed on 9afa09adc1 (run 39712863860 attempt 1): 1 code, 1 unknown.

Job Verdict Why
web / react-apps-check (1) code a Python test failed
web / react-apps-check unknown no known signature; failed step: Check webview test shards

Failures:

  • seen on other PRs motion-scale.test.ts motion scale > no webview CSS, TS or TSX animates off the scale: failed (job)
Matched log lines
web / react-apps-check (1): ERROR: test_real_vp_formats_an_edited_webviews_file (__main__.FormatPostEditTests.test_real_vp_formats_an_edited_webviews_file)

Not re-run automatically: web / react-apps-check (1), web / react-apps-check are not machine failures.

Written by scripts/ci/classify_failures.py (ci-failure-attribution.yml); signatures are its SIGNATURES table. A machine verdict is the runner's fault, not this PR's; yours means the failing file is one this PR changes, also red on main that main's latest full suite fails the same way, seen on other PRs that it failed on another pull request's run lately.

red: cmux-next checks (god files, concurrency, crash safety, l10n); base red: the same failure on the base 6be3530; does not block
red: web / Web status; base red: the same failure on the base 6be3530; does not block
red: web / react-apps-check; base red: the same failure on the base 6be3530; does not block
red: web / react-apps-check (1); NEW: test/dev-server-stop.test.ts is not red on the base 6be3530; do not merge until green; see lane-rules

Tour of 9afa09adc1 (run): no media. The tour did not run: only webview code changed (5 path(s)), which the gallery advisory run checks in Linux Chromium on the pull request (its artifact holds any captures); add the media-tour-mac label, then re-add media-tour, to tour it on a Mac.

@blacksmith-sh

blacksmith-sh Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Found 21 test failures on Blacksmith runners:

Failures

Test View Logs
---/--- View Logs
/tmp/tmpkk8ele17/summary-fail.json (live):/summary-fail.json (live): View Logs
/tmp/tmpvw4zjhhw/summary-missing.json (live):/summary-missing.json (live): View Logs
[new_workspaces] debug.new_workspace timed 0 of 50 new workspace rows/
[new_workspaces] debug.new_workspace timed 0 of 50 new workspace rows
View Logs
[new_workspaces] the window draws no frames/[new_workspaces] the window draws no frames View Logs
[tabs] debug.tab_switch timed 0 of 40 switches/
[tabs] debug.tab_switch timed 0 of 40 switches
View Logs
[tabs] the window draws no frames/[tabs] the window draws no frames View Logs
cmux-next-ios-kit.yml runs macOS jobs on pull requests but a new push does not cancel t
he previous run; key the concurrency group on the pull request and set cancel-in-progre
ss for its pull request events/
cmux-next-ios-kit.yml runs macOS jobs on pull requests but a new push does not cancel t
he previous run; key the concurrency group on the pull request and set cancel-in-progre
ss for its pull request events
View Logs
convention violations found (ERROR lines above)./
convention violations found (ERROR lines above).
View Logs
nightly cmux-tui resolve/nightly cmux-tui resolve View Logs

...and 11 more test failures. View all on Blacksmith: run 39712863860, run 39712863876, run 39712863787

Fix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Bead cx-ojpam created for this PR by the cmux coordinator.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Owned by claude-sr2/transcript-density on cosmic-gray · session

teamleaderleo and others added 2 commits October 21, 2026 17:17
Review of #23875: acpmux sets status `waiting` for a secret request with
no pending permission and no waitingOn. The list must keep that chat,
with the plain waiting line and no last message; "nothing pending" is
read from the chat's status, not its dot.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15ba3-d09a-7940-9fd6-158e10477c0e&host=cosmic-gray
Review of #23875: acpmux sets status `waiting` for a secret request with
no pending permission and no waitingOn, and the list dropped that chat.
A chat acpmux says is waiting stays listed as a plain waiting item (no
last message); a chat with an input dot and no known status shows too.
Only a local chat acpmux reports as not waiting is left out.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15ba3-d09a-7940-9fd6-158e10477c0e&host=cosmic-gray
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (subagent, correctness first): SHIP at 7ba9c8f

Read-only review: no blockers. The review's non-blocking notes: no test yet covers a local chat that has no status and only the input dot; when a secret and a question are both open, the chat's waiting line now names the secret first; an unreachable peer chat that still has a pending request stays listed (this predates the PR). CI at this head: 31 passed, 0 failed.

…s-you-preview

# Conflicts:
#	webviews/src/agent-session/acpmux/App.tsx
#	webviews/src/agent-session/acpmux/conversation/waitingOn.test.tsx
#	webviews/src/agent-session/acpmux/conversation/waitingOn.ts
#	webviews/src/agent-session/acpmux/needsYou/NeedsYou.gallery.ts
#	webviews/src/agent-session/acpmux/needsYou/model.ts
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (subagent, correctness first): SHIP at 0fc8e80

Independent re-review of the base merge. Base had landed #23847 and #23912, which overlap this PR. conversation/waitingOn.ts, its test and App.tsx are base's, byte for byte. needsYou/model.ts keeps this PR's waitsOnPerson/waitingAsk and also uses base's verify kind for a question's prompt. #23847's test now expects no last-reply fallback; the description has the take-back line. The xcstrings file is base's plus the one new key. Each test in agent-pane-needs-you.test.tsx and agent-pane-needs-you-asks.test.ts was walked against the model by reading.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (subagent, correctness first): SHIP at 9afa09a

Re-reviewed after the base merges. The net diff against base 6be3530 is still only the PR's five files. Every red on this head is a base finding or a wrapper of one: web lint formatting in subagent-stopped-after-cancel.test.ts (#24031), motion-scale in newtab/screen.css (#22903), web/ migration rails, workflow guards, release-notary and the god-files structure checks. None touches this PR's files. Fleet webviews tests passed on the previous head 0fc8e80 (job e07253a7); the base merge did not change the PR's files.

@teamleaderleo
teamleaderleo merged commit 68d92f9 into feat-cmux-next Oct 22, 2026
@teamleaderleo
teamleaderleo deleted the leo/needs-you-preview branch October 22, 2026 05:00
@github-actions

github-actions Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk:normal Risk tier (docs/ci/risk-tiers.md)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant