Any engine fix: A turn ends because the machine disconnected

The turn ended because the machine disconnected

The engine runs on your machine rather than in the browser, so a dropped link is a lost view before it is a lost turn. Whether the turn survives comes down to how long the gap lasts.

Machine disconnected
Printed by Termdeck.

Diagnosis

What it actually is

The turn is parked, not killed

When the link goes, the running child is parked on the machine and its output is buffered instead of discarded. The turn is suspended, and that is recorded as a suspension rather than as a failure.

The window is about four minutes

A shorter gap rebinds: the suspended run finds its parked child and the stream resumes where it stopped. A longer one finishes the turn as disconnected, because past that point nothing can promise the child is still the one you meant.

A deliberate restart is not a disconnect

A service restart parks turns on purpose and re-attaches them afterwards, which is why an update reads as a pause of a few seconds rather than as a lost afternoon.

Check

Confirm it before you fix it

Run thisWhat a good answer looks like
tail -n 20 ~/.termdeck/logs/agent.logWhether the machine lost the link or went away entirely. A reconnect within seconds explains a turn that came back on its own.
ps -eo pid,etime,cmd | grep "[c]laude"A child still running whose age matches your turn is a parked turn rather than a lost one.

Every command here has been run on a real machine. Termdeck answers the same questions for every machine you have connected, without opening a terminal on any of them.

Fix

Cheapest thing first

1. Wait for the reconnect before resending

A turn that rebinds continues from where it was. Sending again during the gap starts a second turn that then has to be reconciled with the first.

2. Read the transcript rather than the stream

The engine writes to disk as it goes, so whatever finished is on the machine whether or not a browser watched it arrive.

3. Resend once the gap is genuinely over

Past the window the turn is closed for good, and sending again is the right move rather than a duplicate.

Not this

What will not help

Assuming the work was thrown away

The transcript is written on the machine while the turn runs. A disconnected view is not a discarded turn.

FAQ

A turn ends because the machine disconnected, answered

Does closing the browser tab stop a turn?

No. The turn runs on the machine and continues with nobody watching.

How long can the link be down before the turn is lost?

Around four minutes. Under that it rebinds; over it, the turn closes as disconnected.

What happens to turns during a service restart?

They are parked and re-attached deliberately, so the visible effect is a pause of a few seconds.