Skip to content
Source
Sign inSign up
pingdotgg/t3code

Provider list carries a full skills and commands copy for every folder, mostly identical to the provider's own #21181

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

What happened

The provider list keeps a full copy of each provider's skills and slashCommands for every folder a composer has opened, and sends all of them to every client. Most copies are byte-identical to the provider's own lists. In a one-hour capture, identical copies were 32–39% of every provider-list message, before and after compression, because copies with user skills are too large for deflate to match against each other.

Diagnosis

  • Each folder scan stores a full copy under workspaceSnapshots[{cwd}] (upsertProviderWorkspaceSnapshot, apps/server/src/provider/ProviderRegistry.ts:122-144), up to 16 per provider (:111). Copies stay until that cap evicts them or the server restarts.
  • A client reads only the copy for its own folder, and falls back to the provider's top-level lists when there is none (packages/client-runtime/src/providerSkills.ts:117-128). An identical copy adds nothing but "this folder was scanned at checkedAt".
  • Deflate removes the duplication only when a copy fits its 32 KB window. A basic Claude copy (~12 KB, built-in commands) mostly compresses away, but copies with user skills or many commands (46–59 KB here) do not, and the iOS app does not use deflate at all (#21183). For one Claude plus one Codex with 112 plugin skills, adding up to four folder copies per provider takes the list from 91 to 390 KB (24 to 92 KB deflated), by estimate from entries in this capture.

Possible fix: keep cwd and checkedAt with a sameAsProvider marker (or a content hash) instead of the copy. Simply omitting identical copies would break the TTL: the client treats a missing copy as "not scanned" (providerSkills.ts:96-115) and would rescan on every check. Copies that differ still need sending, or sending as a difference.

Steps to reproduce

  1. Run a server with Codex or Claude enabled and connect a client.
  2. Open the composer in three or four projects that have no project-specific skills.
  3. In the next providerStatuses push, compare each workspaceSnapshots[] entry's skills and slashCommands with the provider's top-level lists.

Expected: a folder that matches the provider's lists does not carry another full copy. Actual: every folder carries a full copy, sent to every client in every push, refresh reply and connection snapshot.

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. Windows desktop, iOS and Android clients. Six enabled provider instances (Codex, OpenCode, four Claude accounts).

Evidence

The last push of a one-hour capture (720 KB of JSON):

instance   folder copy  same as provider's own lists
codex         46,570 B  no (85 skills vs 112)
claude-2      54,547 B  yes
claude-4      57,862 B  yes
claude-4      57,862 B  yes
claude-4      57,868 B  yes
claude-4      59,000 B  no (+1 skill, +1 command)

identical copies replaced by {cwd, checkedAt, sameAsProvider}:
  JSON      719,900 -> 492,235 B  (-32%)
  deflated  180,572 -> 125,825 B  (-30%)

Ten minutes earlier the Codex copy matched too: 39% of the message. Codex's own list dropped from 112 to 85 skills and back during the hour. Each composer opened in a new folder grew every later list by about 58 KB.

Over 24.5 hours, folder copies (identical or not) were 65% of all T3 Code traffic to the desktop, 58% to iOS and 69% to Android. Per-message data for the hour, including folder-copy counts (sizes, counts and field names only; anonymised): https://gist.github.com/1kaahu/3172311dc9de63ed992252e2d7f9cb3f

  • #21178 covers how often the whole list is sent; this covers what each copy contains. Each fix helps on its own, and this one also shrinks connection snapshots and refresh replies.
  • #16750 (merged) added the 5-minute snapshot TTL. #8778 and #15462 (merged) added per-folder discovery.
  • #19816 (open) adds a rescan when a Claude session starts, which rewrites a copy and republishes the list.

Fix applied or workaround

None. Restarting the server clears the copies until composers open in other folders again.

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.

    Thanks for the detailed capture. Confirmed on main: upsertProviderWorkspaceSnapshot in ProviderRegistry.ts stores a full skills and slashCommands copy per folder, capped at 16 per provider, and those copies ship with every provider list. Nothing misbehaves, though; this is a payload size optimization, so we're treating it as an enhancement rather than a bug. It is related to #21178, which covers how often the list is sent. Please post it as an idea: 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.