# fix\(desktop\): give the SSH readiness probe room for high-RTT links · PR \#7815 · pingdotgg/t3code

[View on GitCafe](https://git.cafe/pingdotgg/t3code/pull/7815)

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

Visibility: public

State: open

Source repository: Unavailable fork

Source branch: fix/ssh-readiness-probe-timeout

Target branch: main

Head commit: 82a6cf33e74087b61bb5f922bb15eec8985727a6

[Discussion and reviews](https://git.cafe/pingdotgg/t3code/pull/7815)

[Commits](https://git.cafe/pingdotgg/t3code/pull/7815/commits?format=markdown)

[Files changed](https://git.cafe/pingdotgg/t3code/pull/7815/diffs?format=markdown)

## Description

---

Healthy SSH environments fail readiness when HTTP responses take longer than one second. Use an eight-second network probe for initial connection and tunnel reuse. The initial overall deadline stays twenty seconds; reuse is capped at eight seconds. Remote loopback probes remain one second within their existing two-second reuse budget.

Fixes [#7733](https://github.com/pingdotgg/t3code/issues/7733). Original fix by [Exotic209093](https://github.com/Exotic209093), retained in [#7815](https://github.com/pingdotgg/t3code/pull/7815). Main is merged into the contributor branch; its stale-forward behavior still preserves the remote server.

Verification on head [82a6cf33e7](https://github.com/pingdotgg/t3code/commit/82a6cf33e74087b61bb5f922bb15eec8985727a6):

- Replaced the obsolete stale-tunnel test with two initial/reuse regressions that hold a healthy response across three seconds of virtual time. Both fail against main and pass with this change. The existing stale-forward and explicit-disconnect checks remain.
- `pnpm exec vp test run packages/ssh/src/tunnel.test.ts`: 36 passed (35 before takeover). Scoped SSH typecheck, lint, formatting, and `git diff --check` pass.
- A headless Linux proof ran the production environment manager against real local HTTP sockets. Initial HTTP 200 after 1.5 seconds and reuse HTTP 200 after six seconds succeeded with one forward and no remote stop. A refused listener triggered replacement after 8.022 seconds without a remote stop; explicit disconnect issued one remote stop.

```text
PASS initial: elapsed=1544ms requests=1 canceled=0 forwards=1 kills=0 remoteStops=0
PASS reuse: elapsed=6012ms requests=1 canceled=0 forwards=1 kills=0 remoteStops=0
PASS stale ECONNREFUSED: elapsed=8022ms forwards=2 kills=1 remoteStops=0
PASS explicit disconnect: kills=2 remoteStops=1
```

SSH commands, forward handles, and remote launches were simulated in that proof. No physical high-RTT link or authenticated remote deployment was exercised. macOS, Windows, iOS, Android, and Electron desktop were not verified. This changes readiness timing, with no visual UI change; screenshots do not apply.

One independent review round (Claude Opus 5.5 and GPT-6-Sol) found no code blockers. A stale forward can now take up to eight seconds to recover, compared with two previously. Leave unmerged pending human review of the timing defaults.

Tests: GPT-6-Astra; implementation: GPT-6.1-Sol; adversarial review: Claude Opus 5.5 and GPT-6-Sol. Run through T3 Code using the Codex and Claude harnesses.

