# fix\(server\): a thread waits on its link card after the agent's turn ends · pingdotgg/t3code

[View on GitCafe](https://git.cafe/pingdotgg/t3code/commit/f13e073c3272fc9608bc2ba07e63e6edfafebf1f)

Repository: [pingdotgg/t3code](https://git.cafe/pingdotgg/t3code)

Visibility: public

Requested revision: f13e073c3272fc9608bc2ba07e63e6edfafebf1f

Requested commit: f13e073c3272fc9608bc2ba07e63e6edfafebf1f

Commit: f13e073c3272fc9608bc2ba07e63e6edfafebf1f

Tree: b54579be25374e1d471a839b1df97446d536baf2

Author: Julius Marminge

Committer: Julius Marminge

## Message

```
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>

```

## Parents

- [92cef096b33b32b213eee4a9691dd508a1cb55b9](https://git.cafe/pingdotgg/t3code/commit/92cef096b33b32b213eee4a9691dd508a1cb55b9?format=markdown)

[Source at this commit](https://git.cafe/pingdotgg/t3code/tree/f13e073c3272fc9608bc2ba07e63e6edfafebf1f?format=markdown)
