Repository navigation
Startup session recovery: auto-resume of sessions interrupted by app closure — shipped as a plugin #10207
tmttodd
started this conversation in
Show Your Plugins!
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Startup session recovery: auto-resume of sessions interrupted by app closure — shipped as a plugin
TL;DR — The desktop host has quit-time inspection of active work but no startup recovery path: after any closure (crash, SIGTERM, deliberate quit/reload), interrupted sessions stay interrupted until a human notices. We shipped a plugin that closes the gap, verified against a real closure-then-relaunch cycle, and are sharing it as a reference implementation: tmt-homelab/dsh-session-auto-resume (topic
dsh-plugin).What it does at boot
activeare explicitly resumed (agents.resume+goals.resume) — thegoal-round-driverthen continues the round budget automatically. (The driver intentionally "never revives work on its own"; the plugin performs the explicit resume the driver requires, under a one-time policy the operator opts into by installing the plugin.)headerSeqappend contract makes cold-log markers unsafe).How it was verified
A real closure-then-relaunch (operator-approved SIGTERM of the running host; app relaunched):
verify-d1.mjs(included) turns any future closure into a one-command verdict (PASS/FAIL/VOID with the failing check + evidence tail), and its own fixture selftest exercises every verdict path against synthetic evidence trees.One vendor-relevant bug found during the live fire
Resuming a session programmatically without
agentOptionsproduces an agent whose turns fail withprompt variable "{{model}}" has no value— the agent loop binds{{model}}/{{provider}}fromagent.options(dsh-agent-loop), and a bareagents.resume({resumeSessionId})leaves them unbound. Reproducer:agents.resume({resumeSessionId})on a persisted session, then send a message. Suggested improvements: bind a default (or the session's recordedmodel/selection) whenagentOptionsis omitted, and/or fail the resume with a precise error instead of failing every later turn with a template error. (Filed separately below.)Feedback welcome
We'd love to know whether a first-class startup-recovery hook (a
workspace/session-recoverysurface the host calls at boot, or a documented resume recipe) is on the roadmap — happy to contribute design notes. Related filing: the host-process observability gap is tracked in #10022.All reactions