Created in T3 Code.
Extra features for T3 Code's web UI:
-
Next-prompt suggestions. When the agent finishes a turn, the extension predicts what you're likely to type next and shows it as ghost text in the composer, the way Codex's composer does.
- Tab accepts the suggestion. It's appended at the end, even if you've already typed the start of it.
- Esc dismisses it for this turn.
- Keep typing: the ghost stays while your text matches it and disappears as soon as it doesn't, or as soon as you start a list or a quote (
1.,>).
-
Status icon. The toolbar icon's color shows what your threads are doing, most urgent first:
- amber: a thread needs your approval or input (or woke up from a snooze because it needs you);
- red: a thread failed or hit a usage limit;
- green: a thread finished and you haven't opened it yet;
- blue: a thread is working;
- gray: nothing is going on (or no T3 tab is open).
Hover the icon for the counts, or click it for the list of threads that need attention; clicking one opens it. The status is read from the sidebar of any open T3 tab, even in the background, so keep a T3 tab open (pinned, if you like) with its sidebar visible.
-
Local site links. When the chat mentions local sites (
localhost:5173,http://127.0.0.1:3000/…), a ↗ button appears in the composer for the newest message that has any. With one site it reads ↗ localhost:5173 and opens it; with several it reads ↗ 3 local sites ▾ and opens a dropdown of every address in that message, in order. A pick opens exactly that address in a new tab next to T3. Nothing opens without a click.- On the Mac,
localhostwould be the Mac itself, so the site opens through the relay on the PC. Every dev server port gets its own permanent address,localhost:P→https://<pc>.ts.net:<40000 + P>(e.g. 5173 → 45173); the relay publishes it on Tailscale Serve (tailnet-only) the first time, and an address never changes to another dev server. Owner-only, with live reload;https://localhostand IPv6-only dev servers work too; ports up to 25535. Whether a site runs on this machine is decided by the T3 tab:127.0.0.1/localhostis this machine, any other address (the tailnet name, app.t3.codes) the T3 computer. - Other websites can't use those addresses: requests from another site, as frames, links, forms or subresources, are refused (by
Origin,Refererand Fetch Metadata). A redirect to another local port isn't followed; the page explains it. - They're for your own development apps. On the Mac they share the PC's tailnet name with T3, and cookies ignore ports, so those pages share that name's cookies (except that T3's own session is never passed to a dev server, and a dev server can't set, widen or clear cookies beyond its own). Don't open code you don't trust there; use a separate browser profile for that.
- On the Mac,
Suggestions are made by Claude Haiku 5.5 (or Sonnet 5.5), at the effort you choose, from the last few messages of the thread. Each settled turn makes one request, and only while the tab is visible. It's cached per chat and last message, also across browser restarts and extension updates, so reopening a chat that hasn't moved on shows the same suggestion without asking again (a change to the model, effort, length or context setting asks again). Every chat gets one: turns that ended without an agent message (interrupted, failed) included.
It works wherever T3 runs in the browser: http://127.0.0.1:3773, https://<pc>.ts.net and the hosted app at https://app.t3.codes.
Speed. A suggestion usually takes about 1.2–1.5 s of model time. The Claude CLI needs ~2 s just to start, so the native host and the relay keep a Claude session started ahead of time; each suggestion uses a fresh one (so nothing carries over between chats) and the next is started right away. The extension keeps one long-lived connection to the native host, warms a session when a T3 tab opens and while a turn is running, and asks 0.5 s after a turn settles.
Measured on 2026-10-22 with scripts/speed-test.cjs (every model × effort × context × length, 3 runs each, a warm session as the host keeps one): the median is 1.3 s for Haiku 5.5 at low effort (the default; p90 1.6 s) and about the same, 1.3–1.5 s, for Sonnet 5.5 and for low, medium, high and xhigh effort. Context (1, 2 or 4 turns: about 1.9k, 2.2k and 2.7k input tokens) and length (short or normal) make no measurable difference. Only max effort is slow: the model thinks first (Haiku ~1,000 output tokens, 4–7 s; Sonnet ~160, 2–4 s) for the same suggestions.
On 2026-10-23 the same matrix ran on three real T3 chats (216 suggestions), with two judges (Opus 5.5 and GPT-6-Astra) scoring each one blind. Haiku at low, medium and high effort barely thinks (~22 output tokens, ~1.3 s) and scored lowest; Haiku at extra high scored best (~280 output tokens, ~2.9 s), and Sonnet scored about as well at any effort from ~1.5 s, with about 10× the plan usage. Short scored better than Normal, and reading more turns didn't help. Effort is a setting (Advanced → Effort); low is the default.
T3 runs on the Windows PC. Brave on the Mac opens it at https://samuel-pc.tail41f314.ts.net. Suggestions still come from the PC's Claude CLI, through a small relay, so the Mac needs nothing but the extension.
-
On the PC (once):
powershell -ExecutionPolicy Bypass -File native-host/install-relay.ps1. This:- starts
relay.json127.0.0.1:3774and registers the logon task T3 Companion relay, so it comes back after a reboot; - publishes it to your tailnet only:
tailscale serve --bg --https=8443; - site previews on the Mac: the relay itself publishes each previewed dev server port P as
--https=<40000 + P>(once, tailnet-only), forwarding tohttp://127.0.0.1:3776/t3c/<http|https>/<P>, so Tailscale Serve's own config is the only record of it.uninstall-relay.ps1removes them. - every Serve change goes through
native-host/serve-config.js: it only publishes where Serve has nothing (or that preview already), never next to or over something else, and only removes the relay's own/handlers (other paths on the same port stay). Our own writers (relay, install, uninstall) take turns through a lock; atailscale servecommand you run at the very same moment could still interleave.
The relay answers only requests that Tailscale Serve tags with your login (
Tailscale-User-Login). It requires a JSON body and anx-t3c-clientheader, so web pages can't trigger it. It logs to%LOCALAPPDATA%/t3-companion-relay.log. To remove it, runnative-host/uninstall-relay.ps1. - starts
-
On the Mac: open https://samuel-pc.tail41f314.ts.net:8443 in Brave. The setup page has a download button for the extension zip. Unzip it, then in
brave://extensionsturn on Developer mode, click Load unpacked and pick thet3-code-companionfolder. Keep the folder, because Brave loads the extension from there. -
Open T3 at
https://samuel-pc.tail41f314.ts.netorhttps://app.t3.codes. You don't need to change any settings: the Auto backend finds no native host on the Mac and uses the relay. The zip from the setup page includes arelay.jsonwith the relay's address, so this works from app.t3.codes too (from a….ts.nettab it's also derived from the address). Settings → Backend shows the relay as reachable when it works. That check needs a T3 tab open.
To update the Mac after changing the extension, download the zip again, replace the folder, and click reload on the extension card.
- Native host. Used by the Auto backend on this machine. It runs your Claude subscription through the local
claudeCLI:This registerspowershell -ExecutionPolicy Bypass -File native-host\install.ps1
com.t3code.companionfor Brave and Chrome under HKCU. It writeshost.cmd,host-config.jsonand the host manifest next to the script; none of them are committed. Re-run it if you move this folder or reinstall Node or Claude. To check it:node native-host\test-host.js. - Extension. In Brave, open
brave://extensions, turn on Developer mode, choose Load unpacked and pick theextensionfolder. The manifest has a fixedkey, so the ID is alwaysbgoalklajhmjidehkhhiolpccakjnnbo, which is the ID the native host allows. - Restart Brave if it was running when you installed the host.
Click the toolbar icon for a small popup: an on/off switch, today's usage, the last suggestion and the chats that need you. Settings opens one short page:
- Suggest: After each turn (default; ready when you look) or When I press Tab (nothing is generated until you press Tab in the empty composer; a second Tab accepts).
- Reads: Last turn (default), 2 turns or 4 turns of the chat.
- Length: Short (2–12 words, default) or Normal (up to about 30).
- Color the toolbar icon by chat status: on or off (off keeps the normal icon).
- Links to the chat's local sites: on or off (the composer's ↗ button).
Under them: today's usage, and Test, which runs one real suggestion on a sample chat and shows it with its time. The header shows whether suggestions are ready.
Advanced (collapsed; it opens by itself when something isn't working):
- Model: Haiku 5.5 (default) or Sonnet 5.5.
- Effort: low (default), medium, high, extra high or max: how long the model thinks before it suggests. Higher is slower and uses more of your plan (see Speed above).
- Runs on: Auto (default: the Claude CLI on this computer if its host is installed, otherwise the relay on the T3 computer), or force Claude CLI, Relay or Anthropic API key (billed per token, stored only on this device). A line under it says what's being used. Keep Auto if Brave Sync shares settings between your machines; it's the only choice that works on both.
- Daily limit: 300 suggestions by default. 0 means no limit.
- Ask less often when I ignore suggestions (off by default): after 3 unused suggestions in a row, ask every other turn; after 6, every fourth. Using one resets it.
- Show the Tab hint.
- Relay URL: only if the relay can't be found automatically.
- Other T3 addresses: built in are
http://127.0.0.1:3773,http://localhost:3773,https://*.ts.netandhttps://app.t3.codes. Add others, such ashttp://100.x.y.z:3773, and the extension asks for permission to run on them. - Reset usage and Reset settings.
The approach follows Codex's composer predictions and Claude Code's prompt suggestions:
- The prompt asks for what the user would type next ("would they think I was just about to type that?").
- If the agent asked a question, answer it the way the user would.
- Otherwise, take the next logical step.
- Never suggest praise, the agent's voice, or new ideas.
- Match the user's style.
- Always give a best guess, even when the next step is uncertain.
- The context is the last exchange, plus up to three earlier user messages for style:
- the agent's reply is trimmed to its last ~1,800 characters, which is where it asks or offers the next step;
- code blocks and tables are replaced by short placeholders.
- A filter drops non-suggestions:
NONE, the agent's voice ("Let me…"), praise on its own, lists, and anything too long.
Measured on a real thread with the Claude CLI backend: about 1.3–1.9k input tokens and 3–25 output tokens per suggestion.
Share of a subscription (measured 2026-10-22, Max 5x, Haiku 5.5): 240 suggestions with a long (~1.9k-token) context took the 5-hour usage meter from 43% to 51%, and the weekly meter didn't move (18%). So one suggestion is about 0.03–0.04% of the 5-hour window (roughly 25–30 suggestions per 1%) and well under 0.01% of the week. A busy day of 100 suggestions is about 3–4% of one 5-hour window, spread over the day. The meter only shows whole percents, so treat these as approximate.
- Fixed overhead. About 600 input tokens are the CLI's own environment and account context, which can't be turned off on a subscription. The prompt tells the model to ignore it.
- What keeps it low:
- the compact context above;
- prompt caching turned off, because every prompt is unique and cache writes cost more;
- low effort (the default);
- short output;
- the back-off, if you turn it on;
- the daily limit;
- no request while the tab is hidden or you're already typing;
- one request per turn, cached (also across restarts) and shared between tabs.
- The cheapest setup:
- When I press Tab + Last turn + Short;
- the Anthropic API backend avoids the CLI overhead, at roughly $0.0001 per suggestion with Haiku.
| Piece | Role |
|---|---|
extension/content.js |
Watches the T3 timeline. When there's no "working" row, the last message is from the assistant and the timeline is scrolled to the bottom, it waits 0.5 s for the turn to settle (4 s if the turn ended without an agent message), then sends the recent messages to the worker. While a turn runs, it asks the worker to warm a Claude session. It draws the ghost over the TipTap composer and handles Tab/Esc. Accepting uses execCommand('insertText'), so ProseMirror and T3's state see a normal edit. |
extension/background.js |
Builds the suggestion prompt, caches results per thread and last message in storage.local (the newest 500), tracks usage and the daily limit, and calls the backend. |
extension/preview-content.js |
Local site links. Finds every local URL in the newest timeline message that has any and shows the composer's ↗ button (a dropdown for several); a pick sends exactly the URL it shows. The worker (openSite) opens it in a new tab next to the T3 tab, mapped to the relay's address for that port when the T3 tab isn't a local one. |
extension/status.js |
Keeps the last known status of each thread (from the sidebar labels Working, Approval, Input, Woke, Done, Failed…) across all open T3 tabs, recolors the toolbar icon to match the most urgent one (needs you, failed, finished, working, nothing) (it tints the bundled icon in an OffscreenCanvas), and lists threads for the popup. |
native-host/claude-runner.js |
Runs the Claude CLI headless with no tools, MCP servers or settings, in a temp directory, so it's a plain text completion. SessionPool keeps a claude -p --input-format stream-json session started ahead of time per model, effort and system prompt (~0.8–1.5 s per suggestion instead of ~2.5 s); each request uses a fresh one, and an unused one closes after 30 idle minutes. |
native-host/host.js |
Native messaging host for Brave on the T3 machine. The extension keeps one long-lived connection (connectNative), so it stays up with its warm session; it handles suggest, warm and ping. |
native-host/relay.js |
Tailnet relay for other machines. It serves POST /v1/suggest and POST /v1/warm from its own warm session, POST /v1/preview-target (publishes, once, the permanent preview address of a localhost port, http or https), plus the setup page and the extension zip (with a relay.json holding the relay's address). |
native-host/preview-proxy.js |
The preview proxy (one loopback listener, relay port + 2). The path Serve forwards (/t3c/<scheme>/<P>/…) names the dev server, never the request's Host. Owner-only through tailscaled, on the machine's own name; its request policy (by Origin, Referer and Fetch Metadata) refuses requests from other sites, T3's own pages included: only the page itself and navigations the owner starts (typed, a bookmark, the extension's new tab) get through. It forwards HTTP and WebSocket upgrades with Host/Origin made local, never passes T3's cookies (t3_*, t3-*), filters Set-Cookie (no T3 names, no Domain) and drops Clear-Site-Data (handshake answers too), keeps same-server redirects on the proxy and explains cross-server ones, and passes framing protection on. |
native-host/serve-config.js |
Every Tailscale Serve change (relay, install, uninstall): publish a preview or the API only where Serve has nothing or exactly that, remove only the relay's own / handlers (and earlier versions'), verify by reading Serve's status again. Usable from the command line (ensure-api, remove-owned, remove-legacy). |
T3's DOM hooks used: [data-testid="composer-editor"], [data-timeline-row-kind], [data-message-role], [data-thread-find-text], li[data-thread-item] and the [data-testid="sidebar-row-card"] aria-label ("Title, Status, Project"). If a T3 update renames them, start in SEL in content.js.
Tests. node --test "native-host/test/*.test.cjs" (a few seconds; no Tailscale or browser needed: a fake Serve and stand-in dev servers) covers the Serve rules, the lock, the command line, the proxy's request policy, cookies, redirects and WebSocket handling, and the warm Claude sessions (model and effort) against a stand-in CLI (fake-claude.cjs). node scripts/e2e-sites.mjs <brave.exe> <pairing token> <thread URL> local|mac checks the ↗ button, its dropdown and the new tabs in real headless Brave; mac goes through the real relay and Tailscale Serve. It needs node scripts/preview-playground.mjs running: three small dev servers (live reload over WebSocket, links, redirects, a form, cookies, and what the dev server receives) that are also handy for trying the links by hand. node scripts/e2e-cache.mjs checks in real headless Brave that a chat that hasn't moved on gets its suggestion again without a request after reopening it, a browser restart and an extension reload, that changing the length or the effort asks again (the effort also on a chat that stays open), and that suggestions cached by 0.12 are still used; it can be given a model and an effort to use. node scripts/speed-test.cjs [reps] times suggestions for every model, effort, context and length. Usage is at the top of each file.
scripts/e2e-brave.mjs runs a full headless check: real Brave, the unpacked extension, the native host and a paired T3. Usage is at the top of the file. To simulate the Mac, load a copy of extension/ with key removed from the manifest. Its new ID makes the native host refuse it, so Auto falls back to the relay. Then pass the https://….ts.net thread URL.