Codespace loses connection in VS Code randomly while actively working #204531
Replies: 2 comments
|
💬 Your Product Feedback Has Been Submitted 🎉 Thank you for taking the time to share your insights with us! Your feedback is invaluable as we build a better GitHub experience for all our users. Here's what you can expect moving forward ⏩
Where to look to see what's shipping 👀
What you can do in the meantime 💻
As a member of the GitHub community, your participation is essential. While we can't promise that every suggestion will be implemented, we want to emphasize that your feedback is instrumental in guiding our decisions and priorities. Thank you once again for your contribution to making GitHub even better! We're grateful for your ongoing support and collaboration in shaping the future of our platform. ⭐ |
|
The extensions and AI assistant angle is probably a dead end, since you already ruled that out and the failure mode you describe, a stable connection after 14:00 and instability specifically in the morning, every day, is a network signature rather than an application one. VS Code desktop keeps the Codespaces connection alive as a persistent websocket over port 443 to A recurring daily window like this usually points to one of three things on the network side rather than the editor. A corporate proxy or firewall that is more aggressive about closing idle or long-lived connections during peak office hours, which is common and often invisible unless someone specifically checks proxy logs. Higher network load in the same window, from backups, VPN traffic, or simply more people online before lunch, enough to cause intermittent packet loss that a websocket does not tolerate well even if regular web pages load fine. Or TLS inspection from an antivirus or EDR agent that behaves differently under load, re-negotiating connections and occasionally dropping them. Two things worth doing to tell these apart. First, VS Code has a built-in diagnostic for exactly this: run the command Codespaces: Collect Logs and Diagnose Connection Information from the command palette during a disconnect, it captures the websocket state and latency at the moment of failure rather than after the fact. Second, a simple continuous ping or If you are on a company network or VPN, it is also worth asking whoever manages it whether there is a scheduled job, a proxy policy, or a stricter idle-connection timeout that applies specifically in the morning, since that would explain the exact boundary you are seeing without needing to touch VS Code at all. If my answer was helpful to you, please consider marking it as the correct answer, thanks. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
🏷️ Discussion Type
Problem with connection with Codespaces
Hello
I have a problem, where vs code program loses connection frequently and it is getting frustrating A LOT... I have tried everything, reinstalling, disabling not needed add-ons in vs code, disconnecting unnecessary AI assistants/models. Using GitHub copilot Pro+ plan for AI. So after all the things, it is still loses connection.. What have you guys done with this problem?
using Desktop vs code, not browser.
Thing is is that at certain time, everyday, after lunch at about 14:00 (GMT+3) things getting working properly without interruptions, the codespace works fine for a while, but in the mornings especially, it is bouncing back and forth with the connections, I reload the window, it get back and running, does half the task and disconnects in the middle of a task...
Does anyone encounter same connection bouncing problem?
All reactions