Skip to content
This repository was archived by the owner on May 20, 2026. It is now read-only.

Add reload button for cloud agent timeout#1900

Draft
Copilot wants to merge 2 commits into
mainfrom
copilot/add-reload-button-to-chat
Draft

Add reload button for cloud agent timeout#1900
Copilot wants to merge 2 commits into
mainfrom
copilot/add-reload-button-to-chat

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Nov 10, 2025

When waiting for a cloud agent response times out after 5 minutes, users have no way to retry the connection without re-submitting their entire request.

Changes

copilotCloudSessionsProvider.ts

  • Store retry context (PR, polling state) in a Map when waitForNewSession() times out
  • Add "Reload" button to chat stream that executes github.copilot.cloud.sessions.retryPolling command
  • Add handleRetryPolling() to restart polling loop using stored context
  • Detect special retry message pattern __retry_polling_<prNumber>__ in chatParticipantImpl()

chatSessions.ts

  • Register github.copilot.cloud.sessions.retryPolling command that submits retry message to chat via workbench.action.chat.submit

Flow

Timeout occurs
  → Store context in retryContextMap[`pr-${prNumber}`]
  → Display "Reload" button

User clicks button
  → Command submits `__retry_polling_<prNumber>__` to chat
  → chatParticipantImpl() detects pattern
  → handleRetryPolling() retrieves context and restarts polling
  → Cleanup context on success

The retry happens within the same chat context, preserving the conversation and streaming the reconnection progress directly.

Original prompt

When we end up at 'Timed out waiting for the cloud agent to respond', push a 'reload' button to the chat that starts up the polling loop again

The user has attached the following file paths as relevant context:

  • .github/copilot-instructions.md

Created from VS Code via the GitHub Pull Request extension.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

- Added a retry context map to store PR information when timeout occurs
- When waitForNewSession times out, display a 'Reload' button
- Button executes a command that submits a special retry message to chat
- Chat participant detects retry message and restarts polling loop
- Cleans up retry context after successful reconnection

Co-authored-by: joshspicer <23246594+joshspicer@users.noreply.github.com>
Copilot AI changed the title [WIP] Add reload button to handle timeout in chat Add reload button for cloud agent timeout Nov 10, 2025
Copilot AI requested a review from joshspicer November 10, 2025 17:25
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants