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
Indestructible IDE Connections (No disconnects when you re-open laptop) #18101
One of the largest pain points with remote development is re-opening your laptop and having the IDE session disconnected with all of your state being droped.
We can reinvent some features from eternal terminal both on the coder agent and the local CLI to give users this experience natively.
Things to understand
How can we ensure activity reporting is properly being sent to Coder? (e.g. if the client is truly offline, lets be sure not to pass activity to Coder)
Do we need to require Coder Desktop for this? (OK if so)
Reacted by Bence Nagy, Michael Brewer, shekohex, kcon-stackav, alang-aam and Dana Marble
Eternal Terminal (ET) server running in workspace on port 2022
OpenSSH server running in workspace on port 2244
Coder Desktop running on laptop
ET client running on laptop connected to the workspace's ET server, forwarding workspace:2244 (provided by Coder Desktop) to localhost:2244. Command: et -x -N -t 2244:2244 workspace.coder:2022
SSH config entry on the laptop for the indestructible connection:
Host et-workspace-coder
HostName localhost
User coder
IdentityFile ~/.ssh/id_ed25519
Port 2244
# https://github.com/microsoft/vscode-remote-release/issues/1790#issuecomment-1803762302
# based on https://github.com/microsoft/vscode-remote-release/issues/3096#issuecomment-1803750513
ServerAliveInterval 60
ServerAliveCountMax 4320
An ssh connection to et-workspace-coder will persist over network changes, laptop sleeps, etc. The TCP connection is proxied by ET so it never drops, and the ServerAliveInterval, ServerAliveCountMax, and ClientAliveInterval values ensure SSH doesn't disconnect when there's no activity. Importantly, this works for Remote SSH in VSCode/Cursor - the IDE session never drops.
changed the title [-]Indestructible SSH Connections (No disconnects when you re-open laptop)[/-][+]Indestructible IDE Connections (No disconnects when you re-open laptop)[/+]on May 30, 2025
This sounds great! It is somehow annoying to wait until the connection has been recreated espacially if you have to close and open the lid quiet often.
@MrPeacockNLB The setup I described is only a PoC that demonstrates indestructible IDE connections are possible. We're working on improving the Coder networking stack so these persistent connections happen automatically. Once that's implemented, your current setup should work without any changes.
We recently implemented #18673 which is a partial fix and should resolve many issues with reconnecting/re-opening laptop. Additionally, we're continuing to measure demand for a more resilient eternal-terminal-like solution
Activity
hugodutka commentedon May 29, 2025
Here's the setup I've been using:
workspace:2244(provided by Coder Desktop) tolocalhost:2244. Command:et -x -N -t 2244:2244 workspace.coder:2022An ssh connection to
et-workspace-coderwill persist over network changes, laptop sleeps, etc. The TCP connection is proxied by ET so it never drops, and theServerAliveInterval,ServerAliveCountMax, andClientAliveIntervalvalues ensure SSH doesn't disconnect when there's no activity. Importantly, this works for Remote SSH in VSCode/Cursor - the IDE session never drops.[-]Indestructible SSH Connections (No disconnects when you re-open laptop)[/-][+]Indestructible IDE Connections (No disconnects when you re-open laptop)[/+]MrPeacockNLB commentedon Jun 3, 2025
This sounds great! It is somehow annoying to wait until the connection has been recreated espacially if you have to close and open the lid quiet often.
MrPeacockNLB commentedon Jun 3, 2025
@hugodutka we have to use
coder --header-commandto inject an access token for Azure AppProxy. Will this work too?hugodutka commentedon Jun 3, 2025
@MrPeacockNLB The setup I described is only a PoC that demonstrates indestructible IDE connections are possible. We're working on improving the Coder networking stack so these persistent connections happen automatically. Once that's implemented, your current setup should work without any changes.
ibetitsmike commentedon Jun 18, 2025
Relates to coder/vscode-coder#413
bpmct commentedon Jul 2, 2025
We recently implemented #18673 which is a partial fix and should resolve many issues with reconnecting/re-opening laptop. Additionally, we're continuing to measure demand for a more resilient eternal-terminal-like solution
chore: add backed reader, writer and pipe implementation (#19147)