feat(scripts): resume-remote.sh never overwrites a remote session - #243
Draft
ecalifornica wants to merge 1 commit into
Draft
Conversation
|
🔍 Preview deployed: https://ec02d04a.toolpath.pages.dev |
ecalifornica
marked this pull request as ready for review
August 26, 2026 14:56
ecalifornica
force-pushed
the
ecalifornica/resume-remote-simple
branch
from
August 26, 2026 14:57
d321267 to
d297300
Compare
ecalifornica
force-pushed
the
ecalifornica/resume-remote-simple
branch
from
August 26, 2026 15:42
d297300 to
a0e709a
Compare
This commit cuts the decisions the script makes per run. Before it, three remote states (fresh, existing, live) and --force give 5 outcomes, one of them an overwrite of the remote session. After it, two remote facts (is the tmux session live, does the session file exist) give 3 outcomes, and none of them overwrites the remote. - The remote session ID is derived from the toolpath document, and the tmux session name is derived from that ID. One ID names the session file, the tmux session, and the claude resume. - One read-only ssh call reports whether the tmux session is live and whether the session file exists. Live: attach. File present: launch, attach. File absent: ship, launch, attach. - --force is removed. To reset a remote session, delete its file on the remote and re-run. - The rsync of the working tree runs only on a run that ships. Before this commit it runs on every run. - The remote checks (two read-only ssh calls) run before any remote write. Before this commit, --setup seeding and the rsync run between them. - A missing remote project directory fails the run unless --setup or a sync on a run that ships creates it. - The ship writes to a temporary name, checks the byte count, and renames into place, so a present session file is a complete file.
ecalifornica
force-pushed
the
ecalifornica/resume-remote-simple
branch
from
August 26, 2026 15:57
a0e709a to
9b7ddb4
Compare
ecalifornica
marked this pull request as draft
August 27, 2026 16:32
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.
This PR cuts the decisions
scripts/resume-remote.shmakes per run. Before it, three remote states (fresh, existing, live) and--forcegive 5 outcomes, one of them an overwrite of the remote session. After it, two remote facts (is the tmux session live, does the session file exist) give 3 outcomes, and none of them overwrites the remote.--forceis removed. To reset a remote session, delete its file on the remote and re-run.--setupseeding and the rsync run between them.--setupor a sync on a run that ships creates it.Script only: no version bump, no CHANGELOG entry. Stacked on #241.
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.