Skip to content

feat(resume): forward -p/--yolo/--model to the resumed agent - #1754

Open
f-liva wants to merge 1 commit into
slopus:mainfrom
f-liva:feat/resume-passthrough-args
Open

f-liva wants to merge 1 commit into
slopus:mainfrom
f-liva:feat/resume-passthrough-args

Conversation

@f-liva

@f-liva f-liva commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Problem

happy resume <session-id> only runs interactively. Automation (orchestrators, daemons) that needs to resume a session with an instruction has to fall back to happy --yolo --resume <claude-uuid> -p "...", which wraps the same underlying Claude conversation in a new Happy session every time.

Concrete case: a dispatcher that resumes a work session after each human approval ends up creating one Happy card per round-trip — we measured 5 Happy sessions for a single ticket in one afternoon, all wrapping the same Claude transcript.

Change

Arguments after the session id are now forwarded verbatim to the resumed agent, so headless resume reuses the same Happy session:

happy resume cmmij8 --yolo -p "continue from where you left off"
  • Allowlisted flags only: -p/--print, --yolo/--dangerously-skip-permissions, --model <m>. Anything else still errors out, so a typo'd session id doesn't silently become a passthrough arg.
  • Forwarding works for both flavors (claude/codex) and both resolution paths (local reconnect + legacy).
  • No behavior change when no extra args are given.

Testing

  • vitest run src/resume/handleResumeCommand.test.ts: 13 tests green (4 new: passthrough parse, unknown-flag rejection, claude launch with forwarded args).
  • Manually verified: happy resume <id> --yolo -p "..." resumes the same Happy card headless; happy resume <id> unchanged interactive.

🤖 Generated with Claude Code

happy resume <id> only ran interactively: automation that needed to
inject an instruction had to fall back to a fresh happy session wrapping
claude --resume, creating a NEW Happy card per resume (Cassandra: 5 cards
for one ticket in a single afternoon). Extra args after the session id
are now forwarded verbatim to the resumed agent — allowlisted flags only
(-p/--print, --yolo, --model) so a typo'd session id still errors out.

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
@f-liva
f-liva force-pushed the feat/resume-passthrough-args branch from 82aad8d to 832e664 Compare September 16, 2026 08:57

This branch has not been deployed

No deployments
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