fix(server): a thread waits on its link card after the agent's turn ends

A waiting link card counted as the thread asking for input only while its
run was live. The agent asks without waiting, so its run usually completes
first, and the thread then read as done, could auto-settle, and dropped out
of the user's inbox while the card still waited for them.

A waiting link card now counts until it is answered or closed; a secret
card still counts only while its agent waits in the run. The shell query
reads it through a new partial index, so finished history is never scanned,
and auto-settlement skips a thread with a waiting link card.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
6eaab59c97Julius Marminge committed on 10/22/2026, 5:49:51 AM· committed by Julius Marmingeparentfd3a228
5 files changedLine totals unavailable