Skip to content

feat(desktop): resume threads that failed because the internet dropped #3389

Open

Description

@LHagfoss

Problem

When the Mac loses its connection, running turns fail with network errors (Claude Code "Can't reach the API server", Codex connection failures, Pi "fetch failed") and stay dead after the connection returns.

Proposal

Classify network-failure turns (apps/desktop/src/state/turnError.ts). Hold them with a "Waiting for internet" card, check reachability every 5 s while any thread waits (and at once on network change / wake from sleep), and send "Please continue." once the connection stays up. Require a longer stable period on each retry (5 s, 30 s, 2 m, 5 m) so flaky Wi-Fi cannot burn retries. Give up after 6 h and say so; Send now always works. Nothing runs while no thread waits.

Acceptance criteria

  • A turn failing on a network error shows the waiting card and resumes within ~10 s of the network returning, also after an app restart.
  • Stable-period escalation and the 6 h cap are unit-tested.

Reference: cloudroom's internet-watch plugin.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions