Follow-up to #125. Two resumability defects in the handoff driver:
1. A no-task night left digests.json (often []) pinned, so every later run
reloaded the empty pin and never called harvest_for_config again. Remove the
pin on terminal no-task completion so the next run re-harvests.
2. An interrupted/corrupt tasks.json snapshot raised an uncaught
JSONDecodeError in _run_handoff. Wrap load_tasks_file in try/except and
re-mine instead of crashing.
Adds regression tests for both.
Co-Authored-By: Claude <noreply@anthropic.com>
Adds --backend handoff: the engine runs all deterministic stages and
outsources attempt/judge/reflect to prompt/answer files an interactive
agent session fills between runs (exit 3 = pending batch, re-run to
resume). Deterministic replay + the prompt-hash answer cache make resume
stateless; sentinel detection aborts any call built from unanswered
output so placeholders never reach scores or staging. Session digests
and mined tasks are pinned per night (secret-redacted) so the sessions
answering prompts cannot shift the task set, and LLM mining is routed
through the same handoff files. Ships a /skillopt-sleep-handoff Claude
Code command that answers each prompt in a fresh-context subagent to
protect the held-out gate.
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>