Skip to content

fix(planner): resume the Claude conversation on reopen/restart instead of starting fresh (#2396) - #2428

Merged
kevinthelago merged 3 commits into
developfrom
2396-planner-resume
Jul 6, 2026
Merged

fix(planner): resume the Claude conversation on reopen/restart instead of starting fresh (#2396)#2428
kevinthelago merged 3 commits into
developfrom
2396-planner-resume

Conversation

@kevinthelago

Copy link
Copy Markdown
Owner

Reopening a project (or any non-destructive planner relaunch — sandbox toggle, header Restart) showed the planner's initial chat instead of resuming the prior Claude conversation: handleRestart hardcoded a plain claude launch with no --continue, no fresh-only intro suppression, no continueSession.

  • handleRestart now defaults to the mount path's resume trio (claude --continue 2>/dev/null || claude + startupPromptFreshOnly + continueSession); the destructive ops (clear-plan, switch-blueprint) pass an explicit fresh: true and keep the plain-fresh launch.
  • The shared plannerLaunchConfig Claude branch sets continueSession: true, covering the mount launch defensively (backend still ANDs it with actual history).
  • pty_create logs one resume-decision line (has_history + resumed-vs-fresh) so an "always fresh" regression is visible in the app log.
  • Regression tests lock the resume trio on the default restart and the plain-fresh launch on the destructive path.

Verified: typecheck clean · lint 0 errors · cargo clippy --workspace --all-targets -- -D warnings clean.

Closes #2396.

🤖 Generated with Claude Code

kevinthelago and others added 3 commits July 6, 2026 12:58
…ts (#2396)

Reopening a project (or a sandbox-toggle relaunch) went through
handleRestart, which hardcoded a plain `claude` launch — so the planner
always started a fresh chat instead of resuming. Make handleRestart
resume-capable by default, mirroring the mount path's launch exactly
(`claude --continue 2>/dev/null || claude` + startupPromptFreshOnly +
continueSession); only the destructive ops (clear-plan / switch-blueprint)
pass an explicit `fresh: true` to launch a genuinely new session with the
intro.

- usePlanningSession: handleRestart takes `{ fresh?: boolean }`;
  doClearPlan/doSwitchBlueprint pass fresh: true; default carries the
  resume trio.
- plannerLaunch: the Claude branch now requests continueSession: true
  (defensive — the backend ANDs it with real history), which also covers
  the mount launch in usePlannerTerminal via launch.continueSession.
- pty_create: one resume-decision log line (has_history + resumed) so an
  "always fresh" regression is visible in the logs.
- tests: lock the resume trio on handleRestart's default launch, the
  plain-fresh destructive path (direct + via doClearPlan), and the
  Claude-branch continueSession in plannerLaunchConfig.

Closes #2396

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@kevinthelago
kevinthelago merged commit 5a9df8b into develop Jul 6, 2026
7 checks passed
@kevinthelago
kevinthelago deleted the 2396-planner-resume branch July 6, 2026 19:09
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