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
open_file: support local:// URIs for remote-host sessions #395
open_file accepts local:// URIs since #393, but only for sessions on the local host. A session on a remote host gets 501 remote_host_unsupported, because the session's local/ directory lives on that host and the server resolves the URI against its own filesystem.
Expected
open_file with a local:// URI opens the file for a remote-host session as well, with the same authorization rules (session ownership, credential deny list, realpath containment) as for local sessions.
Notes
The resolution in lib/session-local-files.ts would need to run against the remote host's session directory, through the existing host transport.
Verified fixed on current main (head c93b5b13): remote-host sessions can now resolve local:// URIs.
Evidence on main:
remote_host_unsupported no longer occurs anywhere in lib/, server/, app/ or components/ — the 501 documented in this issue is gone.
GET /api/sessions/[id]/local-file (app/api/sessions/[id]/local-file/route.ts) resolves the owning host via resolveWorkspaceHost and calls resolved.host.workspaceOps.resolveLocalFile(owner, uri, resolved.sessionFile) — the owning host's daemon resolves and confines the URI on its own machine, with the same 404 file_not_found behaviour.
lib/hosts/workspace-ops.ts:198 implements resolveLocalFile on the host transport, with result validation in lib/hosts/workspace-results.ts.
lib/hosts/session-local-files.integration.test.mjs covers the remote path, including refusing a daemon that does not advertise resolveLocalFile rather than answering from main's lookalike.
Activity
kahme247 commentedon Nov 23, 2026
Verified fixed on current main (head
c93b5b13): remote-host sessions can now resolvelocal://URIs.Evidence on main:
remote_host_unsupportedno longer occurs anywhere inlib/,server/,app/orcomponents/— the 501 documented in this issue is gone.GET /api/sessions/[id]/local-file(app/api/sessions/[id]/local-file/route.ts) resolves the owning host viaresolveWorkspaceHostand callsresolved.host.workspaceOps.resolveLocalFile(owner, uri, resolved.sessionFile)— the owning host's daemon resolves and confines the URI on its own machine, with the same 404file_not_foundbehaviour.lib/hosts/workspace-ops.ts:198implementsresolveLocalFileon the host transport, with result validation inlib/hosts/workspace-results.ts.lib/hosts/session-local-files.integration.test.mjscovers the remote path, including refusing a daemon that does not advertiseresolveLocalFilerather than answering from main's lookalike.Closing as fixed on main.