fix(server): remote task followers read only their own task

RemoteDelegation.start resumes every open remote task at once, and each
follower read its parent's whole subagent list to find one task, then held
it across a wait of up to ten minutes. A parent with 1,441 tasks (35 MB of
payload) and 122 open ones made every restart decode ~170k records and hold
8 GB, so the server ran out of heap seconds after starting and crash-looped.

getThreadRecords now takes a subagentIds filter. Followers, and task_status
waits that re-read on every parent subagent.updated, read just their task.
Against a copy of the affected database the startup fan-out drops from 8.2 GB
retained over 21.6 s to 8 MB over 61 ms.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
70a2a7bdd2Julius Marminge committed on 10/22/2026, 5:49:51 AMparentfff4c79
4 files changedLine totals unavailable