Skip to content

fix(clients): a preview app no longer knocks the desktop's own server offline - #13577

Merged
t3dotgg merged 1 commit into
mainfrom
t3code/fix-primary-offline-after-update
Sep 25, 2026
Merged

t3dotgg merged 1 commit into
mainfrom
t3code/fix-primary-offline-after-update

Conversation

@t3dotgg

@t3dotgg t3dotgg commented Sep 25, 2026 •

Copy link
Copy Markdown
Member

After I updated to the latest nightly, the desktop app said "Mainbook is offline" about its own local server. Reconnect did nothing. The local server was healthy.

The cause: T3 Code (Alpha), the Orchestrator v2 preview, was running on the same Mac from the same ~/.t3 home. So it had the same environment id and label, but it uses orchestration protocol 2. Relay discovery reported the Alpha server's descriptor for that id. watchDiscoveredCompatibility then marked nightly's local primary environment "unsupported", switched it off, and dropped its socket. The traces show setCompatibility calling disconnect on the primary 3 seconds after launch.

Relay discovery describes the server behind the relay route. Now it sets compatibility only on relay targets. Direct connections (the desktop's own server, saved URLs, SSH) already check the protocol in their socket handshake.

Proof: a new registry test puts an incompatible discovered descriptor on a connected primary and on a relay target. Without the fix, the primary gets disabled, the same as the live failure. With the fix, only the relay target is disabled and the primary stays connected. The client-runtime suite (1671 tests), typecheck, lint, and fmt pass. I found the root cause from live traces and by comparing the /.well-known/t3/environment output on both local servers.

Created with Claude Opus 5.5 in Claude Code.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Compatibility checks for discovered environments now apply only to relay targets. When an unsupported relay shares an environment ID with a connected primary target, only the relay entry is disabled; the primary remains connected and enabled. Non-relay targets are not affected by discovered relay compatibility results.

… offline

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:XS 0-9 changed lines (additions + deletions). labels Sep 25, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

Provider Metric Main baseline This PR Impact PR ceiling
Codex Total thread wire 13.5 KiB 13.5 KiB +42 B (+0.3%) 15.1 KiB ✅
Codex Thread snapshot wire 7.1 KiB 7.1 KiB +5 B (+0.1%) 7.3 KiB ✅
Codex Live turn WebSocket wire 6.4 KiB 6.5 KiB +37 B (+0.6%) 7.8 KiB ✅
Codex Live turn WebSocket decoded 56.2 KiB 56.3 KiB +44 B (+0.1%) 66.4 KiB ✅
Codex Live turn messages 9 10 +1 (+11.1%) 21 ✅
Claude Total thread wire 13.5 KiB 13.6 KiB +41 B (+0.3%) 15.1 KiB ✅
Claude Thread snapshot wire 7.1 KiB 7.1 KiB −8 B (−0.1%) 7.3 KiB ✅
Claude Live turn WebSocket wire 6.4 KiB 6.5 KiB +49 B (+0.7%) 7.8 KiB ✅
Claude Live turn WebSocket decoded 57.0 KiB 57.1 KiB +44 B (+0.1%) 66.4 KiB ✅
Claude Live turn messages 9 10 +1 (+11.1%) 21 ✅

Baseline: 7b84431 · PR result: d294419 · Source CI: success

Scenario and decoded snapshot size

10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.

  • Codex decoded thread snapshot: 114.0 KiB
  • Claude decoded thread snapshot: 114.7 KiB

Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

@macroscopeapp

macroscopeapp Bot commented Sep 25, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at d294419

Macroscope's review found this PR approvable — This is a narrowly scoped connection-compatibility bug fix that prevents relay discovery results from disabling direct servers sharing an environment ID, while preserving relay compatibility enforcement. A focused regression test covers both paths, and no defaults, schemas, deployment settings, or static-analysis rules are changed.

You can add or adjust custom eligibility rules. Learn more.

@t3dotgg
t3dotgg merged commit a107f8a into main Sep 25, 2026
23 of 24 checks passed
@t3dotgg
t3dotgg deleted the t3code/fix-primary-offline-after-update branch September 25, 2026 05:36
github-actions Bot added a commit to omarcresp/t3code-flake that referenced this pull request Sep 25, 2026
## What's Changed
* feat(web): control Android foldables in the Device panel by @juliusmarminge in pingdotgg/t3code#13534
* fix(mcp): preview snapshots fit in the agent's tool output again by @t3dotgg in pingdotgg/t3code#13558
* fix(web): paste after clicking away from the composer lands in it again by @t3dotgg in pingdotgg/t3code#13553
* feat(desktop): keep running threads synced in the background by @t3dotgg in pingdotgg/t3code#13554
* fix(mcp): preview errors tell agents what to do instead by @t3dotgg in pingdotgg/t3code#13559
* feat(web): agents working banner links to the Agents panel by @t3dotgg in pingdotgg/t3code#13572
* fix(web): size the Android fold model from the inner display by @juliusmarminge in pingdotgg/t3code#13574
* fix(clients): a preview app no longer knocks the desktop's own server offline by @t3dotgg in pingdotgg/t3code#13577
* fix(web): keep nested task states out of parent bullets by @dominic-r in pingdotgg/t3code#11477
* feat(release): ship a Linux .deb that updates itself by @t3dotgg in pingdotgg/t3code#13575
* perf(desktop): cache compiled JavaScript between launches by @t3dotgg in pingdotgg/t3code#13501
* fix(dev): one t3.json setup action that works on every OS by @t3dotgg in pingdotgg/t3code#13589
* fix(web): new worktree threads no longer say "checkout" during setup by @t3dotgg in pingdotgg/t3code#13590
* fix(desktop): `t3 app` keeps working after a second desktop app quits by @t3dotgg in pingdotgg/t3code#13585
* fix(usage): price Claude fast-mode requests at the fast rate by @t3dotgg in pingdotgg/t3code#13599
* fix: update OpenAI logo to current brand asset by @aaditagrawal in pingdotgg/t3code#13611
* fix(mobile): render assigned project icons in chat list by @SunkenInTime in pingdotgg/t3code#12810

## New Contributors
* @aaditagrawal made their first contribution in pingdotgg/t3code#13611

**Full Changelog**: pingdotgg/t3code@v0.0.43-nightly.20260925.2237...v0.0.43-nightly.20260925.2251

Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.0.43-nightly.20260925.2251
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS 0-9 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant