You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Aborting a turn leaves a dead approval card with buttons that silently do nothing #35
Press Stop while a permission card is on screen. The card stays fully rendered with live-looking Allow / Deny / Allow all buttons. Clicking Allow fires no HTTP request at all — no error, no disabled state, no explanation. The buttons are inert and silently so.
Found while browser-testing the Codex approval work, but the cause is in the shared card component, so claude-code and opencode are affected too. Codex only made it visible by raising far more approvals than anything did before.
Cause
Both client-side, in ui/app/components/chat.tsx:
:1017 — the aborted SSE handler never clears perms, so the entry keeps verdict === undefined forever.
:1208 — answerPerm() returns early on if (!sid) return once the session is over, which is why no request is sent.
The server side is clean: GET /permissions/events is empty immediately after the abort and a new session is unaffected. This is purely the user-facing half.
What to do
On aborted / done, mark unanswered cards expired and render them as such, distinguishably from denied. A button that silently does nothing is worse than no button.
Check it doesn't break the rejoin path (chat.tsx:728-746), which replays only still-pending approvals.
Two related things worth fixing in the same pass
"Allow all" can report a verdict that never happened.chat.tsx:1244-1248 infers a card's verdict from its absence from GET /permissions after the PATCH, so it marks the card "Allowed" regardless of what happened. The server side was fixed — a dead client now resolves false and logs it rather than fabricating an accept, and POST /permission returns 409 — but the UI still says "Allowed Bash" for a command that never ran. Needs PATCH to return a per-card result.
<turn_aborted> leaks into the chat as a user message. After any Stop, reloading the transcript renders a bubble, styled as the user's own message, containing the raw marker:
<turn_aborted> The user interrupted the previous turn on purpose. Any running unified exec processes may still be running in the background… </turn_aborted>
stripEnvelopes() (src/start-codex.ts:863-890) already strips a list of these; <turn_aborted> is just not on it. One line, plus a look at what else codex has started emitting.
Activity