Problem
When connecting with devpod ssh without --workdir, the session starts in /workspaces/<workspace-id> instead of the resolved devcontainer workspaceFolder.
Expected behavior
devpod ssh should default to mergedConfig.WorkspaceFolder when available, and only fall back to /workspaces/<workspace-id> when it cannot be resolved.
Current behavior
In cmd/ssh.go, the default workdir is hardcoded to filepath.Join("/workspaces", workspaceClient.Workspace()) unless --workdir is explicitly passed.
Proposed fix
Resolve default workdir in this order:
--workdir flag
result.MergedConfig.WorkspaceFolder from workspace result
- fallback
/workspaces/<workspace-id>
This aligns direct devpod ssh behavior with devcontainer semantics.
*edited to fix formatting
Problem
When connecting with
devpod sshwithout--workdir, the session starts in/workspaces/<workspace-id>instead of the resolved devcontainerworkspaceFolder.Expected behavior
devpod sshshould default tomergedConfig.WorkspaceFolderwhen available, and only fall back to/workspaces/<workspace-id>when it cannot be resolved.Current behavior
In
cmd/ssh.go, the default workdir is hardcoded tofilepath.Join("/workspaces", workspaceClient.Workspace())unless--workdiris explicitly passed.Proposed fix
Resolve default workdir in this order:
--workdirflagresult.MergedConfig.WorkspaceFolderfrom workspace result/workspaces/<workspace-id>This aligns direct
devpod sshbehavior with devcontainer semantics.*edited to fix formatting