# 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/6eaab59c972fedd10744f65cd7dfa530dc5f1f91)

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

Visibility: public

Requested revision: 6eaab59c972fedd10744f65cd7dfa530dc5f1f91

Requested commit: 6eaab59c972fedd10744f65cd7dfa530dc5f1f91

Commit: 6eaab59c972fedd10744f65cd7dfa530dc5f1f91

Tree: eef2e84222b69146bce48e0ea83b63d3767cb9f5

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

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

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