Skip to content

Laptop sync + handoff: agent hooks, agent session sync, agent session handoff#24

Merged
hbrooks merged 1 commit into
mainfrom
session-rename
Jul 5, 2026
Merged

Laptop sync + handoff: agent hooks, agent session sync, agent session handoff#24
hbrooks merged 1 commit into
mainfrom
session-rename

Conversation

@hbrooks

@hbrooks hbrooks commented Jul 5, 2026

Copy link
Copy Markdown
Member

Lands the CLI half of laptop ingestion + handoff (originally #22, whose merge landed on the orphaned session-rename stack base instead of main). Branch rebuilt as main + cherry-pick of #22's squash commit; the duplicate rename diff is gone and the first_run_yaml changes from #19/#20 are preserved.

Server half: ellipsis-dev/ellipsis#5575 (merged). Supersedes #23 (duplicate agent run; its server half ellipsis-dev/ellipsis#5578 is also being closed).

See #22 for the full feature description: agent hooks install|uninstall|status|enroll|unenroll, agent session sync (hook-driven transcript sync with client-side redaction + spool-and-retry), agent session handoff (WIP stash → hidden ref → cloud session via handoff params on POST /v1/sessions).

Verified: tsc --noEmit clean, vitest 108/108 passing.

…ssion handoff` (stacked on #21) (#22)

* Laptop transcript sync: agent hooks install/enroll + agent session sync

- agent hooks install|uninstall|status: idempotently manage the Stop +
  SessionEnd command hooks (async, never block a turn) in
  ~/.claude/settings.json, preserving user-authored hooks
- agent hooks enroll|unenroll: per-repo opt-in consent gate, stored in the
  CLI config (cwd -> origin remote -> owner/name)
- agent session sync: hook-driven (stdin JSON) or manual (flags); checks
  enrollment (silent no-op otherwise), redacts client-side, gzips + base64,
  POSTs /v1/sessions/sync; network failures spool to ~/.config/ellipsis/spool
  (latest snapshot per CC session wins) and flush on the next healthy sync;
  every hook-mode failure path is a quiet exit 0 so a sync problem can never
  disturb a Claude Code session

* agent session handoff: push WIP snapshot + start a cloud handoff session

git stash create snapshots the dirty tree without disturbing it (clean tree
hands off HEAD), pushed to refs/ellipsis/handoff/<sha12>; then POST
/v1/sessions with handoff params + the instructions as the prompt. Requires
--parent (the synced laptop session to chain from).

---------

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
@hbrooks hbrooks changed the title Session rename Laptop sync + handoff: agent hooks, agent session sync, agent session handoff Jul 5, 2026
@hbrooks hbrooks merged commit fd96442 into main Jul 5, 2026
1 check passed
@hbrooks hbrooks deleted the session-rename branch July 5, 2026 16:01
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