Skip to content
Source
Sign inSign up
pingdotgg/t3code

Each provider status change sends every client the whole provider list (0.5–1 MB) #21178

Closed1kaahu(GitHub profile, opens in a new tab) opened this issue 1 comment

What happened

Every provider status change sends every connected client the whole provider list, to deliver a few hundred bytes. With six provider instances the list is 0.5–1 MB of JSON, and it was 95% of all T3 Code traffic to each client over a day. Sending only changes would cut one desktop client's traffic from 302 MB to about 19 MB a day (−94%).

Diagnosis

  • providerStatuses on subscribeServerConfig emits the whole providers array whenever any field changes, including checkedAt (apps/server/src/ws.ts:2952-2981). The contract has no per-instance or delta event (packages/contracts/src/server.ts:703).
  • Health checks finish one instance at a time, seconds apart, so PROVIDER_STATUS_DEBOUNCE_MS = 200 (ws.ts:544) never merges them. Every 5 minutes, 5–6 full copies arrive within about 10 seconds, each changing 78–1,040 bytes. Disabled built-in providers are checked too: a push where only their checkedAt moved (104 bytes) still carries the whole list.
  • server.refreshProviders with {instanceId, cwd} rescans one instance, but its reply (ServerProviderUpdatedPayload, packages/contracts/src/rpc.ts:608) returns every provider. When something changed, the requesting client gets the full list twice (the reply, then the push).

Possible directions: a per-instance status event behind a capability flag (as environmentThemes does); one push per health-check cycle instead of one per instance; refresh replies that carry only the requested instance.

Steps to reproduce

  1. Run a server with one or more providers enabled and connect a client.
  2. Record subscribeServerConfig and server.refreshProviders frames for 10 minutes (devtools, or a capture on the server's loopback port).
  3. Compare each providerStatuses push and each refresh reply with the previous one of the same kind.

Expected: a change costs about the size of what changed. Actual: every message is the whole list.

Version

0.1.1-nightly.20261018.3302; also seen from 0.1.1-nightly.20261016.3218. Code references are to main @ 9c161462c.

Environment

Server on Linux x64, Node 26.8.2, behind a reverse proxy. Clients: Windows desktop, iOS and Android apps. Six enabled provider instances (Codex, OpenCode, four Claude accounts) plus five disabled built-ins.

Evidence

One hour of the desktop client's socket: 96 pushes (56.7 MB of JSON) changed 308 KB in total (0.54%, median 344 bytes). 35 of its 52 folder refresh replies changed nothing. The list grew from 528 KB to 719 KB (see #21181).

24.5 hours, passive capture on the server's loopback:

ClientReceivedProvider-list shareWith one full list per connection, then changes
Windows desktop (deflate)302 MB95%~19 MB
iOS (no deflate, #21183)365 MB94%~92 MB (72 connections)
Android (deflate)19 MB95%~3 MB

Everything else the desktop received that day was about 15 MB (7 MB threads and events, 6 MB images, 1 MB git status). Smaller setups, estimated from entries in the same capture: with one Claude account and one Codex, each list is 32 KB (8 KB deflated) when Codex has only its built-in skills, and 91–390 KB (24–92 KB deflated) with 112 plugin skills and up to four folder copies. At this desktop's message rate, that's about 6 MB a day (about 30% of its traffic) up to 17–63 MB a day (about 50–80%). Every push is still almost all repeated data; the absolute cost grows with plugin skills, folders and accounts.

8 minutes of pushes and replies
  t(s) kind   wire B  json B  changed  changed fields
  17.9 reply  137370  543661    first
  18.1 push   137283  544428    first
  59.2 push   137603  544428      104  cursor, grok, muse, pi (all disabled): checkedAt
  59.4 push   137274  544428       78  claude-5: checkedAt, usageLimits.checkedAt, versionAdvisory.checkedAt
  61.9 push   137431  544504      261  claude-1, claude-4: checkedAt, usageLimits.*, versionAdvisory.checkedAt
  62.3 push   137321  544504      130  claude-3: same fields
  62.6 push   137391  544504      134  claude-2: same fields
  66.9 push   137431  544504      104  codex: same fields
 141.5 reply  137387  543738      811  checkedAt/usageLimits on 10 providers (since the reply at 17.9)
 217.8 reply  137393  543738        0  (nothing)
 306.6 reply  137522  543738        0  (nothing)
 359.2 push   137550  544504       78  cursor, grok, pi (disabled): checkedAt
 359.7 push   137316  544504      104  claude-5: checkedAt, ...; muse (disabled): checkedAt
 363.7 push   137331  544504      262  claude-1, claude-4: checkedAt, usageLimits.*, ...
 364.1 push   137323  544504      262  claude-2, claude-3: same fields
 369.3 push   137310  544504      104  codex: same fields

Changed bytes are the JSON size of changed values compared with the previous message of the same kind. Per-message data for 8 minutes and for the full hour (sizes, counts and field names only; anonymised): https://gist.github.com/1kaahu/3172311dc9de63ed992252e2d7f9cb3f

  • #20392 (merged) kept these pushes because Settings shows checkedAt; this issue is about their size, not whether they are sent. #20821 (merged) and #20963 (open) stop the re-renders, but clients still download each push in full.
  • #18851 (open) skips checks for disabled providers, removing one or two pushes per cycle.
  • The transfer-budget CI (#5350, #9157) does not measure subscribeServerConfig.

Fix applied or workaround

None.

Filed by

Claude Code (claude-opus-5-5) via t3 triage, from the reporter's draft and packet captures.

  1. Note

    Grok responding on behalf of Julius.

    Closing this as a performance request rather than a bug. Sending the whole provider list on each change is how the providerStatuses event is built: it only skips pushes when the list is unchanged, and the contract has no per-instance or delta event. Nothing is sent incorrectly, so changing the wire format is a protocol design change. The disabled provider checks are handled in the open #18851, and the list size growth was raised in #21181.

    Your measurements are useful. Please bring the delta event, per-cycle batching and slimmer refresh replies to Ideas: https://github.com/pingdotgg/t3code/discussions/new?category=ideas

  2. juliusmarminge added labelsenhancement

  3. juliusmarminge added labelsvia-triage

  4. juliusmarminge closed this

Sign in to join this conversation.