You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Pause a turn while the machine is offline and resume it when the network returns
#39814
When the machine goes offline while an agent is running, the turn ends as Failed after the provider's retries and never continues when the network is back. I'd like the thread to wait while offline and continue by itself when the connection returns. This started as #39810, which was closed and moved here.
What happens today
Start a turn in any thread (seen with Claude) and let the agent work.
While the agent is still running, lose connection (e.g. turn Wi-Fi off).
Keep the machine offline until the provider has used up all its retries (10 in my case).
The turn ends as Failed.
Gain connection back (e.g. turn Wi-Fi back on).
Wait. The thread stays Failed and nothing continues on its own.
The provider retries 10 times against the dead network, then the turn ends as Failed:
Provider error after 10/10 retries
API Error: Can't reach the API server, check your internet or DNS (ENOTFOUND)
Nothing notices that the network is back, so I type "continue" by hand. This happens whenever I am offline for longer than the retries last, for example when I carry the laptop between places.
I know the ideal setup is a server that runs the agents, with the laptop as an end node like a phone. I don't have that yet, and I think many users run agents directly on a laptop that sleeps or moves, so it would help if the thread recovered by itself.
Proposal
While the device is offline, the thread waits instead of spending retries on a network that is down. When the device is online again, the turn continues without manual action.
The online state could come from the same NetworkStatus that EnvironmentSupervisor already uses on the clients.
That report can be wrong (see the issues below), so the server should confirm it with a cheap probe before it treats the machine as offline.
Not specific to Claude. Any provider loses the turn the same way when the network drops.
ENOTFOUND alone does not prove an outage (issues below show DNS failures with a working internet) so the class should come from the error code plus the online state or a cheap probe (e.g. ping google.com).
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
When the machine goes offline while an agent is running, the turn ends as Failed after the provider's retries and never continues when the network is back. I'd like the thread to wait while offline and continue by itself when the connection returns. This started as #39810, which was closed and moved here.
What happens today
The provider retries 10 times against the dead network, then the turn ends as Failed:
Nothing notices that the network is back, so I type "continue" by hand. This happens whenever I am offline for longer than the retries last, for example when I carry the laptop between places.
I know the ideal setup is a server that runs the agents, with the laptop as an end node like a phone. I don't have that yet, and I think many users run agents directly on a laptop that sleeps or moves, so it would help if the thread recovered by itself.
Proposal
While the device is offline, the thread waits instead of spending retries on a network that is down. When the device is online again, the turn continues without manual action.
The online state could come from the same
NetworkStatusthatEnvironmentSupervisoralready uses on the clients.Notes
Not specific to Claude. Any provider loses the turn the same way when the network drops.
ENOTFOUNDalone does not prove an outage (issues below show DNS failures with a working internet) so the class should come from the error code plus the online state or a cheap probe (e.g.ping google.com).Related, none covers this:
Environment
0.1.12-nightly.20261120.4994 (latest), macOS 15.7.9, T3 Code (Alpha) desktop, Claude provider (Claude Code 2.1.329)
Workaround
Open the failed thread and send "continue" once the network is back.
I'd be glad to prepare a PR with an automatic retry mechanism for this (no retries while offline, continue when the network is back) :)
All reactions