fix(runner): fail undeclared sessions at reattach, loudly #337
No reviewers
Labels
No labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
toasterson/Anima!337
Loading…
Reference in a new issue
No description provided.
Delete branch "claude/archive-releases-slot"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Kills the recurring zombie class (three today, one per fleet restart): a runner's re-Hello
resumable_sessionslist is complete — built from its process-lifetime session map — so a bound live session missing from it cannot come back. The reconcile still gave those the full 30-minute rebind window, leaving the sessionrunningand its thread routing prompts into the void.Now an undeclared session older than a short grace (
ANIMA_RUNNER_ATTACH_ORPHAN_GRACE_SECS, default 60s — an Assign may still be racing the Hello) is failed at attach, and its thread gets a system note ("Session was lost in a runner restart — send another message to start fresh") instead of a typing indicator over a corpse. The staleness gate moves fromupdated_at(which heartbeat vouching kept fresh right up to the kill) tocreated_at. Server restarts are unaffected — the runner process survives those and declares its sessions.Server+db only; no proto change, no migrations.
🤖 Generated with Claude Code
The runner's re-Hello resumable_sessions list is COMPLETE (built from its process-lifetime session map), so a bound live session missing from it cannot come back — its warm state died with the old process. The reconcile still gave those the full 30-minute rebind window, leaving the session 'running' and its thread routing prompts into the void after every fleet restart (three live zombies on 2026-07-20, each manually failed in the DB). Now an undeclared session older than a short grace (ANIMA_RUNNER_ATTACH_ORPHAN_GRACE_SECS, default 60s — an Assign may still be racing the Hello) is failed at attach, and the thread gets a system note ('Session was lost in a runner restart — send another message to start fresh') instead of a typing indicator over a corpse. Server restarts are unaffected: the runner process survives those and declares its sessions. The staleness gate moves from updated_at (which heartbeat vouching kept fresh right up to the kill) to created_at. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>working#366