t3code
t3code copied to clipboard
[Bug]: mcp: threads hide the permission picker after idle or when the mode matches the default
Split out from #41235 (requirements 3 and 4). The CLI default-mode flag work now lives in #43377; these two UI symptoms are separate and need their own surface work.
Symptoms
On a thread created by an outside agent (mcp: thread):
- Changing the permission picker to
Autodoes not persist to the server, so after the provider session is released (~2–30 min idle) the chip disappears and the thread still runs at its previous mode. - Even without idle, when the compatible mode equals the settings default,
composerControlsOwnership.tshides the access display entirely (accessDisplay: "hidden",showModeBlock: false), so there is no picker to change.
Relevant code
apps/web/src/components/chat/useComposerSelection.ts:98-106— writes only the composer draft for existing threads; nothread.runtime-mode.set.apps/web/src/components/ChatView.tsx:1067-1072— showscomposerDraft.runtimeMode ?? activeThread.runtimeMode ?? defaultRuntimeMode.apps/web/src/components/chat/ComposerControlsBar.tsx:135-147andcomposerControlsOwnership.ts:13-21—matchesDefaulthides the chip by design.- Related open work: #30162, #40577, #39892; #29632 covers a related picker/server mismatch.
Expected
An outside-agent thread keeps a visible, working permission picker that persists a mode change to the server and survives idle release. Whether hiding at the default is correct is a product decision and should be settled before changing it.
This is the same problem as #29632, so I'm closing it in favour of that one. If it is different, say how and it will be reopened.