AI Agent Hub
Back to plugins
⚙️

dsh-goal-restart

Workflow Updated 2026.08.30

Run the following command in DeepSeek Harness:

dsh plugin install joshryandavis/dsh-goal-restart

Paste the following prompt into your AI chat to install this plugin:

Run dsh plugin install joshryandavis/dsh-goal-restart in DeepSeek Harness to install the plugin; the source code is available at https://github.com/joshryandavis/dsh-goal-restart

About this plugin

A dsh goal's durable state (objective, phase, roundsStarted) lives in the session log and survives restarts by design. Its activation state, however, is deliberately process-local: it is never persisted, and every agent or session start disarms it. So when the dsh service restarts—whether from a crash, a launchd respawn, or a planned bounce—an in-flight goal simply stalls until someone issues an explicit /goal resume. For long-running work such as an agent developing its own plugins, that manual step breaks momentum and is easy to forget.

dsh-goal-restart intercepts the session-start edge where payload.source is resume (the session was just rehydrated from persistence). If the durable goal is still active and round budget remains, it calls ctx.goals.resume, letting the stock goal-round-driver reserve and queue the next round exactly as after a human resume. The policy is deliberately conservative: fresh startups, forked sessions, sub-agent sessions, paused or blocked or complete goals, already-armed goals, and exhausted round budgets are all skipped. The plugin performs one durable resume mutation (revision + 1)—the same write a human /goal resume performs—and leaves execution entirely to the driver.

Ideal for agent-workflow users running long tasks on dsh who want goals to pick up automatically after a service restart without human babysitting. The plugin is lightweight, network-free, verified by 13 in-memory unit tests and a smoke script, and released under the MIT license.

Use Cases

  • dsh service restarts due to crash or planned maintenance and the in-flight goal automatically picks up the next round
  • a launchd respawn during a long-running agent task resumes the goal from the exact breakpoint instead of stalling
  • replaces the repetitive manual /goal resume step required after every service restart

Best For

  • Developers running long-running agent tasks on dsh who want goals to auto-continue after restarts
  • Operators running dsh in production where service restarts are routine
  • Advanced dsh users aiming to reduce manual babysitting of long-running workflows