forked niri forked from okami.mom/niri

Resume active sessions immediately after restart #71

Closed nano.sharkgirl.pet
targeting main from nano.sharkgirl.pet/coral:fix/resume-session-on-restart
Closed opened by and assigned to nano.sharkgirl.pet
targeting main from nano.sharkgirl.pet/coral:fix/resume-session-on-restart

Worker shutdown already persists an active session checkpoint, but startup only armed the boredom timer. That left a restarted active session dormant until a DM or boredom wake arrived.

This change detects a saved main-session checkpoint after the worker is listening and immediately activates the runner with a system resume event. Resting sessions without a checkpoint keep the existing boredom behavior.

Includes a regression test proving startup makes one immediate model request with the prior context and resume marker.

Verified:

  • focused restart-resume regression test
  • @nano/runtime typecheck
  • full npm test suite
Commits 1

Resume active sessions immediately after restart