Agent pane: an open folder trust question never hides a question, permission or secret card

Merged
TE
4d ago
+334-65

What broke

Leo, 2026-10-21, while a folder trust question bricked his chats:

  • "IT'S SO FING BAD IT SENDS YOU TO THE CHAT IN THE SAME FING PANE THEN BREAKS AND THIS TRUST F***ING HARDLOCKS EVERYTHING WTH KIND OF NONSENSE MNOTHERFCKNG TRUST EVEN WAS THAT"
  • "IT'S LITERALLY THE ENTIRE F***ING UI IS BUSTED"
  • "WTH COULD IT POSSIBLY FING RESUME WTH KIND OF RESTRICTION IS THAT IT FING SHULDNT BE WTFFFF"
  • "WTH I STILL CANT FING TYPE OR DO FING ANYTHING IN THE CHAT IT'S SO FING BUSTED PLEASE FING FIX"
  • "IT'S NOT FING SENDING NOTHING IS FING SENDING"

The rule that came out of it (Leo, P0): a pending folder trust question must never block steering, sending, or answering a question.

This is PR 1 of 2. It fixes the "answering a question" part. While a chat folder's trust question was open, or after Not now, useFolderTrustAsk set holdsAsks, and the pane hid the permission panel, the question card (AskUserQuestion), the secret card and tool cards. A turn that was already running then waited on an ask nobody could see or answer. acpmux takes _acpmux/permission_respond whatever the folder's trust; only prompts pass its trust gate. Hiding the cards was the pane's own choice. #22054 added it so two asks never competed for one answer.

The fix

  • holdsAsks is gone. The trust question still heads the bottom stack, and the chat's other asks stay under it, answerable.
  • The secret card no longer waits for the trust read either. It asks for a turn that is already running in that folder.
  • The waiting line ("Waiting for you: …") names those asks while the question is open (conversation/waitingOn.ts).
  • Send and steer under the trust question are PR 2: prompts are held in the pane and go after Trust, rebuilt from the closed #24023.

Rebuilt from #24023, which was closed as stale. Its design is kept, and this half is split out to land on its own.

Tests

The red commit 42575ff6733 holds the tests, and the fix follows.

  • webviews/test/agent-pane-trust-never-hides-asks.test.ts (Chromium, dev pane against a stand-in acpmux): a running chat's question card is visible under the open trust question, and its Submit reaches _acpmux/permission_respond. After Not now, the card is still answerable. Both fail at the red commit (fleet run 41422232383) because the card is not in the page, and pass at the head (run 41423029024, 17 pass, with the trust corner test).
  • conversation/waitingOn.test.tsx, trust-read-keeps-permission.test.tsx, gallery bottomStack checkTrust: updated to the new rule.

Risk

Low-normal, next to the trust boundary. The daemon's trust gate is unchanged: a prompt to an untrusted folder is still refused by acpmux. The pane only stops hiding asks that acpmux already accepts answers for.

Related, already on base

  • The "SENDS YOU TO THE CHAT IN THE SAME PANE" half of ask-a7ca5abf63: the Needs-you arrow opens the waiting chat in its own tab or on the right (#23849, #24035, #28989).
  • "I NEED IT TO JUST AUTO" is closed separately: #23792 trusts worktrees cmux made.

Leo-ask: ask-a7ca5abf63
Leo-ask: ask-770be15c61
Leo-ask: ask-5aed6de14c
Leo-ask: ask-ce32398063
Leo-ask: ask-59a10148a8

šŸ¤– Generated with Claude Code

Agent session: agent session