Skip to content

[The Framework] Resume a finished run by sending it a message (auto-resume) #720

Description

@suleimansh

Part of #719. From dogfooding #715: after a run ends (Stop, or it finishes), the chat composer disappears (it only renders on a live run). We want to keep chatting - your next message continues the same conversation.

Decision (user, over a Resume button): auto-resume on send. No extra button - the finished-run composer stays, and sending a message spins a fresh run whose opening prompt resumes the captured session.

Mechanism (the plumbing already mostly exists):

  • We capture the agent session id per run (RunMeta.sessionId / the session-update event; visible in the log as session <id>).
  • Today DriverPromptOptions.resume only resumes for chat turns WITHIN a live run, because the driver seeds lastSessionId from its own first turn. To revive a finished run, the OPENING prompt of a NEW run must resume a GIVEN id.
  • Add a --resume-session <id> path: seed ClaudeCodeSession.lastSessionId at start so the opening prompt(firstPrompt, {resume:true}) resumes. Thread through runPrompt/runFramework -> daemon startRun -> sendStart.

UI:

  • Render the composer on RunReplay (finished runs), not just RunLive.
  • On send, start a new run with the message as the prompt + the finished run's captured session id. Subtle hint like "Run ended - your next message continues it."
  • Reuse the navigate-on-start / followLive pattern (feat(framework-dashboard): jump to the run's live output on Start #705) so the new run's live output is shown.

Note the drain-only fallback flagged on #715 is exactly this: a series of runs stitched by the shared session id.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions