[BUG] Editing an SSH connection's port doesn't propagate to existing sessions using it
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
Editing an existing "SSH connection" profile (e.g. changing the port) does not update sessions/tabs that were already created using that connection. The old session keeps retrying with the stale, previously-configured value indefinitely, with no visible way to force it to re-read the updated connection profile. The only workaround is abandoning the session and starting a brand-new one, which loses the ability to continue working in that session's context.
What Should Happen?
Updating a connection profile should apply to all sessions currently using it, or at minimum there should be an option within an existing session to refresh/reload the connection config it's using, without having to start a new session.
Error Messages/Logs
Connection refused
Check that your SSH host or local proxy is reachable, then try again.
connect ECONNREFUSED 151.80.23.196:22
(Note: the connection profile had already been edited to use port 51922 instead of 22 — the session was still using the old port.)
Steps to Reproduce
- Create a new SSH connection (Edit SSH connection dialog) pointing to a remote host on port 22.
- Open a session/tab using that connection and confirm it connects successfully.
- Edit the same SSH connection and change the port (e.g. to 51922, matching a real change on the remote sshd config), then save.
- Return to the session opened in step 2 (do not open a new one) and click "Try again" to reconnect.
- Observe: the session still attempts to connect on the old port (22) and fails with ECONNREFUSED, even though the connection profile shown in "Edit SSH connection" now correctly displays the updated port (51922).
- Opening a brand-new session using the same (updated) connection profile connects successfully on the new port — confirming the profile itself is correct, but the already-open session isn't picking up the change.
Claude Model
Sonnet (default)
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
1.32352.1
Platform
Other
Operating System
macOS
Terminal/Shell
Other
Additional Information
This is Claude desktop