Skip to content

fix: detect and abort stalled tool executions; upgrade SDK to 0.1.29#484

Merged
idofrizler merged 1 commit intostagingfrom
fix/agent-session-stall-detection
Feb 28, 2026
Merged

fix: detect and abort stalled tool executions; upgrade SDK to 0.1.29#484
idofrizler merged 1 commit intostagingfrom
fix/agent-session-stall-detection

Conversation

@idofrizler
Copy link
Collaborator

Problem

When the Copilot backend drops the connection mid-turn (during tool execution), SDK 0.1.25 hangs silently forever — the session shows \ ool.execution_start\ but never \ ool.execution_complete. The UI is permanently stuck and the user has no way to recover without closing the tab.

Changes

Stall detection (\src/main/main.ts)

Added a 5-minute stall detector across all 4 session event handler paths:

  • On \ ool.execution_start\ → starts a per-session timeout
  • On \ ool.execution_complete\ → clears the timeout
  • If the timeout fires → calls \session.abort(), sends \copilot:error\ to the UI with the tool name, then sends \copilot:idle\ to unblock the session

This catches both truly hung commands and the backend-disconnect case.

SDK upgrade (\package.json)

Upgraded @github/copilot-sdk\ from \

- Add 5-minute stall detection for hung tool executions across all 4
  session event handler paths. Auto-calls session.abort() and shows
  an error in the UI when a tool takes too long (e.g. backend drops
  connection mid-turn, which SDK 0.1.25 silently hangs on forever).
- Upgrade @github/copilot-sdk from 0.1.25 to 0.1.29 which may include
  improved connection error handling.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@idofrizler idofrizler merged commit ae94754 into staging Feb 28, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant