fix: reorder setup (check claude first), mirror local path, clear k8s labels for SSH, pull-session command - #141
Merged
Conversation
…I params, IsRemote guards Five remaining audit gaps: 1. Snapshot/fork for SSH: SnapshotMeta gains Transport/Host fields; SaveSnapshot uses BuildTransportForPod + fetchRemoteWorkdirWithTransport instead of k8s-only paths; StartFromSnapshot restores Transport/Host. 2. Local resume: handleRemoteFetch now also materializes the fetched JSONL into ~/.claude/projects/<encoded local path>/<session-id>.jsonl so the session can be resumed locally with claude --resume after the remote is stopped. 3. Continuous fetch: handleRemoteExecDone re-fetches the session JSONL after detach so the preview shows the latest conversation content (everything Claude did while attached). Also surfaces attach errors instead of always printing "Detached". 4. CLI params: executeCmdRemoteStart now parses transport= and host= so SSH sessions can be started from :remote:start transport=ssh host=my-builder without editing config.yaml. 5. IsRemote guards: Resume, Edit, CopyPath, Move, Fork, New now refuse with a helpful message on remote session rows instead of running with synthetic ProjectPath/ID values that produce broken commands.
Kairo-Kim
approved these changes
Jul 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up fixes to #140:
Setup reorder: check if Claude is already installed BEFORE configuring user. If claude exists, skip the install step entirely (saves 2+ minutes on hosts like Coder that already have it). The user-config step is also skipped for SSH when claude is already installed (env file likely exists from a previous session).
Mirror local path: WorkDir now defaults to RemoteHome + home-relative path of LocalDir (e.g. /home/coder/src/keyolk/ccx instead of /home/coder). RemoteProjectPath auto-set to WorkDir so --resume finds the session JSONL.
Clear k8s labels for SSH: installRemoteSession clears RemoteContext/RemoteNamespace for SSH sessions so the sub-line doesn't show dlops-apne2-ahcl/coder.
:remote:pull-session command: fetches remote session JSONL and writes it to ~/.claude/projects//.jsonl so claude --resume works locally after pulling.
handleRemoteExecDone re-fetch: after detach, automatically re-fetches the JSONL so the preview shows the latest conversation.
go build/vet clean; go test ./... green. Follow-up to #139/#140.