Keep the Planner while its workflows run, and let Stop pause them
Chopin destroyed every Planner session when its turn ended. A workflow the atomic Planner starts runs in the background under that session, so it was orphaned seconds after launch and never progressed. Keep an atomic Planner session, its owner binding, and the loaded document while the session still owns live or paused workflow runs, tracked through Atomic's workflow activity stream; the next turn reuses it so the Planner can still steer its runs. The session is let go when the runs finish, the owner binding ends, or the document closes. Stop Planner now also pauses the session's live runs, resumably, and a new Resume Planner control (`chat:resume`) resumes them. Chat state carries the running and paused counts, and the composer shows them. Run control goes through the session's own workflow commands until the SDK exposes run-control primitives. The document's working directory without a checkout moves from the shared temporary directory to a per-channel directory under Chopin's per-user state directory, so workflow files survive restarts. Assistant-model: Claude Opus 5.5 Assistant-workflow: inline Assistant-verification: bun test passed: 1751 pass, 2 PostgreSQL skips, 0 fail, including new retention, pause, resume, release, and run-classification tests Assistant-verification: bun run types passed: all workspaces Assistant-verification: bun run ci passed: dprint, oxlint, tokens, type scale, Impeccable (no new findings) Assistant-verification: source check passed: DBOS records showed a Planner-launched run with no progress after its turn ended, matching the per-turn session disposal User-preference: A pause in the Planner pauses its workflows and resume resumes everything; steering goes to the main chat, which decides whether to steer a workflow over intercom User-preference: Keep long-lived Planner working directories out of the shared tmp Co-authored-by: Alex Lavaee <lavaman131@github.com>
Parentaeb8dd0
19 files changed+626-88
StackedSplit