[BUG] A pending interactive prompt is lost on disconnect or reconnect (local session)

Status Open
Maintainer reply None cached
Activity 1 comment · opened Oct 2, 2026

Summary. When the client disconnects while a permission or question prompt is pending, the prompt is lost. Either the tool call aborts, or the question never reaches the model.

Evidence (local, non-cloud sessions on Linux/WSL2):

  • Plan approval: on 2026-09-09 and 2026-09-11, in two separate sessions, an ExitPlanMode approval failed with AbortError: Tool permission stream closed.
  • Questions: on 2026-09-12 (the machine was powered off) and on 2026-09-21, a pending question prompt was lost across the disconnect.
  • Why this is filed separately: #77549 (closed) reported the same error for web/cloud sessions and said it did not reproduce locally. These four cases were all local.

Ask.

  • Persist pending interactive prompts (AskUserQuestion, plan approval, tool permission) with the session.
  • On reconnect or resume, show the prompt again and deliver the answer to the waiting tool call.
  • If that is not possible, return an explicit "prompt lost on disconnect" result to the model, so it asks again instead of carrying on without an answer.

Related: #77549, #96561, #59024.

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗