Repository navigation
Open
Description
Summary
A remote host attached in one workspace can't be added in another, and removing it from the first workspace doesn't release it. Three problems combine:
- Removing a remote project in the GUI leaves its bridge running. The
remote-redials/<host>.redialmarker survives and the bridge stays bound, re-binding on reconnect. - Every workspace reverse-forwards to the same remote socket. The bridge runs
ssh -N -o ExitOnForwardFailure=yes -R /home/<user>/.graphcode/graphcoded.sock:<workspace>/graphcoded.sock <host>. The remote path ignores the workspace, so the first workspace to bind a host owns it. A second workspace's add fails silently: its daemon log records no attempt or error. - A dead bridge leaves a stale remote socket.
~/.graphcode/graphcoded.sockstays on the host without a listener. WithoutStreamLocalBindUnlink yesin the host's sshd, the next-Rbind fails until the file is removed by hand.
Repro (graphcode 0.1.84, macOS, Codespaces hosts)
- In workspace Default, add
ssh://user@kouign-amann_…:22/workspace/src/odang. - Create a second workspace (
odang-crash-loops,~/.graphcode-odang-crash-loops) and try to add the same host. It fails. Another host not held by Default (brioche) adds fine. - Remove the host from Default in the GUI, then add it to the second workspace again. It still fails.
Evidence after the GUI removal
~/.graphcode/open-projects.jsonandrecent-projects.jsonno longer listed kouign-amann.~/.graphcode/remote-redials/kouign-amann_20261022_191009.redialstill existed.- Bridge
sh -c gc_host='…kouign-amann…'was still alive (parent: Default'sgraphcoded), with childssh -N … -R /home/zaranylucas/.graphcode/graphcoded.sock:/Users/zaranylucas/.graphcode/graphcoded.sock …. ~/.graphcode/dials.log:2026-11-18T22:02:29Z bridge graphcoded forward bind zaranylucas@kouign-amann_20261022_191009:22 ppid=1284(re-bound after the host was in use elsewhere).- Second workspace's
graphcoded.log: no entry for the host at all. - On the host, after killing the bridge:
srw------- … ~/.graphcode/graphcoded.sockwith no listener (ss -xlcount 0).
Workaround
Move the .redial marker out of remote-redials/, kill the bridge sh and ssh processes, delete the stale remote ~/.graphcode/graphcoded.sock, then add the host in the other workspace.
Suggested fixes
- Removing a remote project should delete its redial marker and stop its bridge.
- Report a forward-bind failure in the UI. For example: "host is attached to workspace X".
- Either make the remote socket path workspace-specific, so the remote CLI resolves the right daemon, or explicitly enforce one workspace per host with a clear error and a "move here" action.
- Remove a stale remote socket before binding when nothing is listening on it.
Metadata
Metadata
Assignees
Labels
No labels
Activity