Agent chat: an approved permission ask reads on its tool row; Bypass permissions' own approvals draw nothing

Merged
TE
3d ago
+192-31

Leo, on a loose transcript line in the NEXT nightly, Approved: cd /tmp; for i in 1 2 3; do gh issue create --repo manaflow-ai/cmux --title "$( [ $i = 1 ] && echo 'Cloud start-session: (Bypass permissions): "but what's going on with these?"

Cause

acpmux logs permission_auto with fullAccess whenever a chat in Bypass permissions (Claude Code) or Full access (Codex) approves an ask on its own, including Claude Code's own guards (#25214). The pane (direct.ts recordFullAccess) drew every one of those as a permissionRecord row: "Approved: {title} ({mode})". The title is Claude Code's permission title, which is the raw command cut to a length, so the line showed half a command with the mode glued onto it. Ask-mode approvals (recordPermission) drew the same kind of loose line ("Allowed: …").

Change

  • An ask the chat's Bypass permissions or Full access approved on its own, with no card shown, draws nothing. The call's own row already shows what ran.
  • An approval the person gave (Allow, Always allow, or switching to the highest mode while the card was open) puts a dim Approved mark at the edge of the tool row it approved (ApprovedMark.tsx, tool.approved). It no longer draws a receipt line. The mark stays on the call as its result streams in.
  • Denied and unanswered asks keep their receipt line ("Denied: …", "Not answered: …"). So does an approval whose call this page has not drawn.
  • New string tools.approved, with its translations taken from the existing header.prReview.approved.

Gallery: agent-pane.approved-tool-row (ask-mode-approved, run-one-approved, bypass-nothing).
Spec: leo-workspace design/chat-transcript.md ("Permission approvals"), updated alongside.

Tests

  • test/agent-pane-permission-receipt.test.ts is rewritten to match: approved asks show no receipt line and mark call-test; bypass, full-access and policy approvals show nothing; mode-switch approvals, live and replayed, mark the call once; a resync marks it once and keeps the reply whole.
  • Typecheck, lint and pane-english pass on the fleet. The browser test runs in CI.

šŸ¤– Generated with Claude Code

Agent session: agent session