Skip to content

Resume interrupted sessions after graceful stops - #2210

Open
Aaronontheweb wants to merge 1 commit into
feat/resume-interrupted-sessionsfrom
feat/auto-resume-after-graceful-stop
Open

Aaronontheweb wants to merge 1 commit into
feat/resume-interrupted-sessionsfrom
feat/auto-resume-after-graceful-stop

Conversation

@Aaronontheweb

Copy link
Copy Markdown
Collaborator

Change

  • The session actor records a durable candidate after a graceful stop confirms model cancellation.
  • The daemon restores an output subscriber before it asks the actor to resume the original turn.
  • The actor uses the recorded input, requester, and trust authority. It follows the original turn with one ordered queue call.
  • Slack, Discord, and Mattermost check every recorded requester against the current channel ACL.
  • A ten minute absolute deadline blocks old candidates. A durable claim blocks duplicate model calls after a crash.
  • The restart manifest retains blocked candidates until the output route returns or the deadline expires.

Evidence

  • Actor suite: 4,037 passed, six platform skips. A later focused queue grace test passed.
  • Daemon suite: 1,135 passed, one platform skip.
  • Spark2 Skill Discovery eval: 8/8 passed with deepseek-v4-flash-dspark (run c34ad157-0e4f-41ac-80ac-11186e359b18).
  • Isolated production image stop took 8,304 ms. The persistent home retained one candidate with mode 0600. Restart kept the candidate quiet without an output subscriber.
  • Slopwatch found zero issues. Header verification and strict OpenSpec validation passed.
  • All 15 OpenSpec tasks are complete. Main session and container specs are synced.

Stack

Base: #2204. Merge this PR after #2204.

The active daemon on this machine was not restarted. Live rollout remains unverified.

This PR replaces #2205 so GitHub can link the same-repository branches as a stack.

@Aaronontheweb
Aaronontheweb added this pull request to stack #2212 September 19, 2026 13:58
@Aaronontheweb
Aaronontheweb marked this pull request as ready for review September 19, 2026 14:16
@Aaronontheweb Aaronontheweb added sessions LLM session actor, turn lifecycle, pipelines reliability Retries, resilience, graceful degradation channels Discord, Slack, and other channels. security Security-related changes labels Sep 19, 2026
ReplyRoute = new ChannelReplyRoute(
message.IsDirectMessage,
message.ReplyChannelId.Value,
message.RootMessageId?.Value)
Comment on lines +5414 to +5417
catch (Exception ex)
{
actor.Tell(new ModelWorkStoppedForRestart(callId, ex));
}
Comment on lines +106 to +109
catch (Exception ex)
{
_logger.LogError(ex, "Restart recovery stopped before it resolved all candidates.");
}
Comment on lines +200 to +203
catch (Exception ex)
{
return (false, false, ex.Message);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channels Discord, Slack, and other channels. reliability Retries, resilience, graceful degradation security Security-related changes sessions LLM session actor, turn lifecycle, pipelines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant