Skip to content

fix(handoff-sync): move the local handoff folder to ~/.local/state - #15

Merged
twistedmelonman merged 1 commit into
mainfrom
claude/fix-779-handoff-fallback-20261026
Oct 26, 2026
Merged

twistedmelonman merged 1 commit into
mainfrom
claude/fix-779-handoff-fallback-20261026

Conversation

@twistedmelonman

Copy link
Copy Markdown
Member

Problem

The Claude Code sandbox denies writes under ~/.claude. On a host with no Drive mount, prepare-handoff writes to ~/.claude/handoffs, so a sandboxed session cannot save a handoff there. This is item 3 of smartwatermelon/claude-config#779.

Change

  • handoff-sync.sh: the default local folder is now ~/.local/state/claude-handoffs, which the sandbox allows. HANDOFF_LOCAL_DIR still overrides it.
  • README.md: the handoff-sync.sh row names the new folder.
  • tests/handoff-sync.bats: a new test pins the default. It fails against main's copy.

TILSIT migration (after merge, before the skills PR)

rclone bisync keys its state on the local/remote path pair, so the new folder needs one --resync. The order matters:

  1. git -C ~/Developer/scripts pull first. If the folder moved first, the next cron run would run the old script, create an empty ~/.claude/handoffs, and bisync it against the full remote. With the new script in place, cron fails harmlessly on "no prior listing" until step 4.
  2. mv ~/.claude/handoffs ~/.local/state/claude-handoffs
  3. rclone bisync ~/.local/state/claude-handoffs 'gdrive:Claude Handoff' --resync --drive-skip-gdocs --dry-run, and read the output.
  4. The same command without --dry-run.
  5. Check the next cron run in ~/.local/state/rclone/handoff-sync.log.

The handoff skills in claude-config move to the same folder in a second PR, after this migration. If the skills moved first, TILSIT would write handoffs to a folder that cron does not sync.

Advances smartwatermelon/claude-config#779 (item 3).

The Claude Code sandbox denies writes under ~/.claude, so on a host with
no Drive mount, prepare-handoff cannot create ~/.claude/handoffs. The
default local folder is now ~/.local/state/claude-handoffs, which the
sandbox allows. HANDOFF_LOCAL_DIR still overrides it.

A new test pins the default. It fails against main's copy.

TILSIT needs a one-time migration after this merges, because rclone
bisync keys its state on the local/remote path pair:

1. git -C ~/Developer/scripts pull
2. mv ~/.claude/handoffs ~/.local/state/claude-handoffs
3. rclone bisync ~/.local/state/claude-handoffs 'gdrive:Claude Handoff' --resync --drive-skip-gdocs
4. Check the next cron run in ~/.local/state/rclone/handoff-sync.log

The handoff skills in claude-config move to the same folder in a second
PR, after this migration, so TILSIT never writes a handoff that cron
does not sync.

Advances smartwatermelon/claude-config#779 (item 3).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant