Skip to content

Comments

feat(app): add Resume Session to continue previous conversations#703

Open
seibe wants to merge 1 commit intoslopus:mainfrom
seibe:feat/resume-session
Open

feat(app): add Resume Session to continue previous conversations#703
seibe wants to merge 1 commit intoslopus:mainfrom
seibe:feat/resume-session

Conversation

@seibe
Copy link

@seibe seibe commented Feb 21, 2026

Summary

Adds the ability to resume a previous Claude conversation by spawning a new Happy session with --resume <claudeSessionId>. This lets users continue where they left off without losing context.

Related issues

Addresses: #685 — support resuming Claude Code sessions when spawning from mobile.
Also relevant: #478, #621, #611, #353, #437 — various requests for session resume/continue functionality from mobile.

Comparison with similar PRs

How it works

  • Reuses the existing spawn-happy-session / spawn-in-directory RPC — the daemon interprets the presence of a sessionId field as a resume request and appends --resume <id> to the CLI spawn command
  • The daemon validates the session ID against a strict UUID regex before using it, guarding against injection in the tmux shell command path
  • The UI only shows the resume option when the session is inactive, disconnected, and has the required metadata (claudeSessionId + machineId)
  • The resume button is disabled with a "Machine is offline" subtitle when the target machine is not reachable

Changes by package

happy-app

  • session/[id]/info.tsx: Add "Resume Session" action in Quick Actions group with online/offline machine status
  • SessionsList.tsx: Add swipe-to-resume gesture (green "Resume" button alongside existing red "Delete")
  • sync/ops.ts: New machineResumeSession() function that sends spawn-happy-session RPC with sessionId
  • Translation files (10 locales): Add resumeSession, resumeSessionSubtitle, resumeSessionMachineOffline, failedToResumeSession keys

happy-cli

  • daemon/run.ts: Handle sessionId in spawn payload — validate UUID format, append --resume <id> to tmux command or spawn args

Test plan

  • Open session info for a completed session on an online machine → "Resume Session" button is green and pressable
  • Tap Resume → new session is created and navigated to, Claude resumes the conversation
  • Open session info for a session on an offline machine → button is grayed out with "Machine is offline"
  • Swipe left on a resumable session in the list → green "Resume" button appears alongside "Delete"
  • Session that is currently active → no resume button shown

Wire up the daemon's ignored sessionId parameter to pass --resume <claudeSessionId>
to the spawned CLI process (both regular and tmux paths). Add machineResumeSession()
RPC in the app, Resume button in session info Quick Actions, and Resume swipe action
on inactive sessions in the session list.

Security: validate sessionId as UUID format before shell interpolation (tmux path).
Safety: disable directory auto-creation for resume (approvedNewDirectoryCreation: false).
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