Skip to content

Comments

fix(taskctl): use assignee_pid for liveness in resurrectionScan and heartbeatActiveAgents#255

Merged
randomm merged 2 commits intodevfrom
fix/issue-254-pid-liveness
Feb 20, 2026
Merged

fix(taskctl): use assignee_pid for liveness in resurrectionScan and heartbeatActiveAgents#255
randomm merged 2 commits intodevfrom
fix/issue-254-pid-liveness

Conversation

@randomm
Copy link
Owner

@randomm randomm commented Feb 20, 2026

Fixes #252, #253, #254

Problem

After binary restart, SessionStatus (module-level in-memory Map) retains stale busy entries. Both resurrectionScan and heartbeatActiveAgents trusted it exclusively, causing tasks stuck at stage: developing forever.

Fix

  • resurrectionScan: alive = pidAlive || sessionAlive. stage=developing + dead -> advance to reviewing, clear assignee, preserve worktree/branch. Other stages -> reset to idle.
  • heartbeatActiveAgents: alive = sessionAlive && pidAlive. Default pidAlive=true when no assignee_pid.

@randomm randomm merged commit ec304a5 into dev Feb 20, 2026
1 check passed
@randomm randomm deleted the fix/issue-254-pid-liveness branch February 20, 2026 09:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(taskctl): resurrectionScan resets developing tasks to idle instead of advancing to reviewing

1 participant