Skip to content

fix(computer): redact before every clip, so long or prefixed secrets don't leak - #40139

Closed
jayleaton wants to merge 4150 commits into
pingdotgg:mainfrom
jayleaton:fix/computer-use-redact-then-clip
Closed

jayleaton wants to merge 4150 commits into
pingdotgg:mainfrom
jayleaton:fix/computer-use-redact-then-clip

Conversation

@jayleaton

Copy link
Copy Markdown

Follow-up to #288, which was merged before Randy's round-5 review of 82f4844ab. Every remaining leak followed one pattern: a line was clipped, capped or sliced before the typed text was hidden. A cut could then keep part of a long or prefixed secret that the matcher no longer recognised.

Fix

Redaction now always happens before a line is cut, and a single helper on each side enforces that:

  • Helper (controller.ts): clip() takes the run's secret and hides it before it cuts, so the type checker makes every caller pass it. This covers control descriptions, tab titles, visibleText, the surface, the reused tab, popups and choose_file. Every question set leaves through ask(), which scrubs the state and the questions, including chooseSurface's.
  • Server (ComputerService.ts): redactThenClip / redactThenCap replace the clip-then-hide order in:
    • finishTask reason and surface
    • hostEvent how and step text
    • the host's start refusal error
    • approval bindings
  • Approval bindings: authorizeStep builds the reader and audit bindings from the full app/title/url before capping them. readerBinding redacts every optional action field except kind and text.
  • Clipped echoes: echoes() now drops a clipped echo when the end of the cut matches the start of the typed text (Bearer <secret>…).
  • Quoted labels: the short-text exemption applies only when {text} appears outside short, label-only quotes (40 characters or fewer, no mixed quote types). Word boundaries apply only when the typed text starts or ends with a letter or digit, so a., 4 and !1 are refused.

Tests

These three fail on main and pass with the fix:

  1. Server: a long, prefixed, mixed-case secret, with upper-cased and clipped Bearer echoes, never reaches the decider (state and questions), the reader or approver snapshots, status (what the MCP tools read), the audit file or the host refusal error.
  2. Server: the quoted-label cases, where {text} appears only inside quotes, a long quoted span, mixed quotes, and a. / 4 / !1.
  3. Helper: a padded secret in tab titles, labels, values and page text never reaches the decider, the steps or the outcome.

The race test (a hostDecide refused while a type approval is in flight, then redacted once it is granted) passes on main too. It's a regression guard, not proof of a bug.

Verification

  • vp test run:
    • computer-helper: 162 passed, 3 skipped
    • server computer, MCP and budget: 722 passed
  • vp run check:changed origin/main: all passing.
  • Agent context budget: unchanged.
  • The paid evals weren't run.

Done by Claude Opus 5.5 in Claude Code (Ada agent Doug).

🤖 Generated with Claude Code

jayleaton and others added 30 commits November 13, 2026 18:18
…dden

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ons heading

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Nightly release titles and the FORK_PRODUCT_NAME fallback, the headless
unit description, and the Discord announcement name Ada. Artifact file
names and the repo variable itself are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
User-facing CLI copy says Ada instead of T3 Code, and hints that tell the
user what to run say `ada …`. Both come from the brand constants.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The CLI is now `ada`. Every installer also keeps `t3` working:

- install.sh / install.ps1 and `ada install` link both ada and t3 to the
  same runtime with the same ownership rules, and install whichever is
  free when another program owns one. They fail only when both are taken.
- `ada update` repoints the sibling link too, so neither runs an old build.
- The npm launcher and server package declare an ada bin beside t3.
- The desktop app writes an ada launcher beside t3 and links it beside its
  t3 link, never over a foreign ada. The launcher marker is unchanged so
  older builds still recognise their own launchers.
- Printed "run this" hints prefer `ada` when ada on PATH runs this install.

Service units keep invoking the same runtime path as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…needs it

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…vate

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… ada triage

The guard no longer exempts triagePrompt.ts, which has no upstream install command left. It still fails on a planted `npx t3`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`ada update` told users to run `ada` and `ada service restart` even when the
install has only `t3` or another program kept `ada`, and desktop Settings said
the command was installed without naming the one that works.

The update now resolves its launchers with the same ownership check the repoint
uses and names `ada`, then `t3`, then the quoted runtime path. DesktopCliCommand
reports the name that runs the install (`command`) and any foreign `ada` that
blocked the alias (`aliasBlockedBy`); Settings and onboarding show that name.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
assets/agents/pip.svg is the only hand-edited source. icons:export draws it into each channel's Icon
Composer backdrop (prod navy, nightly sky, dev blueprint) and writes the desktop, web, fork and marketing
sets, a padded macOS icon and the social card. icons:export:android renders the mobile launcher, splash
and widget marks. Legacy T3 sources nothing references are removed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The README picks the dark or light lockup with prefers-color-scheme. The social card nests the dark lockup.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…releases

GitHub redirects /releases/latest to the release list when no release is
marked latest, which answers 200 without a tag_name, so every stable check
showed a raw schema error. Read the Atom feed for every channel, fall back to
the paged API index as cliRelease and npmRelease do, and report an unreadable
list in plain words.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Mobile About -> Legal becomes License and opens LICENSE on GitHub. Web About
gains a License row beside the privacy policy, which still covers the
telemetry sent to upstream.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Pairing, auth and triage hints name the ada command; the T3 Connect sentence
leaves Notifications; the T3 Chat theme is Orchid (its id stays t3-chat);
Labs and Storage say Ada home folder; new settings default the branch prefix
to ada; Android saves images to Pictures/Ada.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Allowlist the intentional ones, each with its reason.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The fork reported to upstream's ingest by default. Telemetry now defaults
off, including after the desktop reads the login shell, and setting
T3CODE_TELEMETRY_ENABLED=true still opts in. The web About row and Welcome
notice replace the t3.codes privacy-policy link with one line saying so,
and the user docs describe it as opt-in.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
feat: rename the fork to Ada in every user-visible surface
feat(cli): ada command with t3 kept as an alias, and Ada release names
feat: Pip is Ada's logo across every surface
The dev variant used the navy production icon while its in-app mark is the
blueprint. The Android exporter now renders a full-bleed blueprint iOS icon
and an adaptive blueprint background for the white monochrome Pip, without
alpha so iOS accepts the icon.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Environment actions shared one message slot above the Ada section, so a
failed check read as part of Routes. Each result now shows in the section of
the action that produced it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fix(mobile): dev icon matches its mark, update results sit beside their button
…are Ada-<ver>

FORK_PRODUCT_NAME=Ada broke the Windows nightly: packaging pinned the exe to
"T3 Agents.exe" while the payload check expected "<product name>.exe".
resolveDesktopPackageIdentity now reads the product name and brand once and
gives packaging and the payload check the same exe name. Desktop downloads
are named Ada-<version>-<arch>; CLI archives keep t3-<version>-…, which
install.sh, install.ps1 and t3 update fetch by name.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Point every reference at the renamed repository: release lookups, update
feeds, installers, packaging metadata, workflows, docs and tests. The MCP
write allowlist keeps jayleaton/t3code, because existing clones still name
it in their remote. Upstream's pingdotgg/t3code references are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
chore: the fork repository is jayleaton/ada
…0261113

fix(desktop): Windows builds named Ada keep T3 Agents.exe; downloads are Ada-<ver>
…r reads just "Ada"

- Ada's Windows .ico is now generated straight from Pip as a full-bleed rounded tile,
  with Pip at 72% width, in sizes 16/20/24/32/40/48/64/256. The macOS and web icons
  are unchanged.
- The Agents board brand drops the fork-added "/ agents" suffix.
- The Windows installer smoke test now covers updating from an install whose shortcuts
  are named "T3 Agents". electron-builder renames them, so the update leaves one set
  named after the product and an uninstall entry with the same name.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jayleaton and others added 24 commits November 20, 2026 17:39
computer_act's key enum allowed only ten keys. It now takes any chord of
cmd, ctrl, alt/option and shift with one named key or character, in one
canonical spelling the server hands the helper. Chords that quit, log
out, lock, Force Quit or switch apps are refused; navigation keys run at
once and other shortcuts ask first.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Antigravity's CLI (agy) keeps MCP tools within a size budget it shares with
skills and silently drops the largest. T3 lists 99 tools (~77 KB), so
computer_act, delegate_task and other large tools never registered, and on a
Mac with more skills computer_look and computer_use were dropped too.

Antigravity sessions now send `t3-tool-exposure: budgeted`, over HTTP or
through the stdio bridge. T3 then lists the core orchestration tools, the
session's computer and device tools, and the rest smallest-first up to 28 KB,
below the 33.8 KB Antigravity kept on a Mac with many skills. Deferred
sessions (Copilot) also list their computer and device tools directly. The
ACP fallback guidance now covers a single missing tool.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
feat(computer): key chords for computer_act with a deny list
computer_look read only the window's page, so an Open sheet, a Chrome
bubble such as Save password, and docked DevTools were invisible or
unclickable. The look now walks the window's sheets and popovers, the
app's dialog, panel and popup windows (refs w<index>:path) and DevTools
web areas, tagging each control with its window and appending each
one's text under a ## <window> line. A label shared with the page
resolves to the popup or sheet on top.

computer_act gains choose_file {path}: it checks the file exists, opens
Go to Folder in the open panel through the panel service's process, sets
the path through accessibility and presses the panel's own OK button,
all in the background. It asks for a tap: it hands a file to the app.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts:
#	apps/server/src/provider/agentContextBudget.json
feat(computer): read sheets, popups and DevTools; choose_file
# Conflicts:
#	apps/server/src/provider/agentContextBudget.json
fix(server): Antigravity sessions get every computer-use tool
… it is typed, questions keep their moves

Randy's fourth pass on #288:

- A goal is the agent's words, with `{text}` references and quoted labels as
  separate parts. Nothing is matched against a label or against short text,
  so a task typing "OK" can click the "OK" button; only long text the agent
  wrote out anyway is replaced in its own words.
- Short typed text leaves the screen alone until a `type` step is granted
  (tracked by the server); after that a region that holds it is left out.
- A snapshot's questions place each question and its built-in moves before
  any control, by serialized size, so 200 long controls cannot push out
  `type_text`. The bounded view is computed once per decision.
- Keys too long to show are aliased like keys that name the typed text, and
  answers decode through the same map.
- Computer tool parameter descriptions are set on the encoded side, so
  `goal`, `hostId` and `taskId` reach the advertised schema.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ardening

# Conflicts:
#	apps/server/src/computer/ComputerService.ts
#	apps/server/src/mcp/toolkits/computer/tools.ts
#	apps/server/src/provider/agentContextBudget.json
Merge upstream/main 391f93f into Ada, keeping T3 Connect, product
analytics, upstream legal pages, upstream branding and release defaults,
and app-triggered compaction out. Adds docs/operations/upstream-sync.md
listing those removals and how to keep them out of future syncs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Keep upstream's batch link screens and open them from Ada's Machines
header on web and desktop and under the network on mobile. They use the
same link-batch service as `ada environment link --from`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add the stubs and replay frames upstream's new service methods need,
take upstream's "checks finished" wake in Ada's PR watch tests, isolate
the settle test from other tests' watches, and re-measure the agent
context budget.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Upstream's new sender notes, preview tunnel, Pi, Cursor and EPERM
messages and an Antigravity doc line named T3 Code; the brand guard
caught them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rning

Upstream's windowed child read made the work-settled reaction slower, so
a stopped child's parent row could still read running after Stop. Stop
now settles that row under the parent lock once the child lock is
released; the reaction stays as a no-op fallback.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tion

The chip it drives is never rendered in Ada (nothing passes
compactBeforeSendTokens), so the case could only time out.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ardening

# Conflicts:
#	apps/server/src/provider/agentContextBudget.json
…r an internal peer call (#291)

* fix(server): linked children follow a settlement by its identity, over an internal peer call

A busy child that refused a linked settle was then settled by the app relay
with a plain settle, and an un-settle of one settlement of a card could reopen
a child a later settlement had settled.

Each settlement is now carried whole, as settledBy and settledAt, through one
server-to-server call, ParentSettlementFollow: an MCP tool a link calls by name
but no agent lists or finds, and a relay method an app carries to the same
service. The receiver records both, reopens only a child with that exact pair,
leaves a busy child for the sender to retry, and makes a repeat delivery a
no-op. The cascade keeps a busy answer pending instead of falling back to the
app, and leaves a machine that cannot follow a settlement as it is. childrenOf
and follows leave the agent tool list, so its size is back to main's.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(server): a settlement cascade un-settles only rows of that settlement

A late first delivery of an old un-settle kept the remote child a newer
settlement had settled, but its cascade reopened that child's sub-runs: the
walk matched them on settledBy alone. It now matches settledBy and settledAt,
the same identity the receiver checks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…etry starts fresh (#292)

* fix(desktop): a cancelled update download closes its transfer and a retry starts fresh

electron-updater 6.8.9 never handed its cancellation token to the requests doing the work.
builder-util-runtime's doDownload ignored the onCancel it was given, so a cancelled full download
rejected but kept its request and file open. DifferentialDownloader made its range requests with
no token at all, so a cancelled differential download stayed pending and kept downloadPromise
reserved, and Retry rejoined it. Both are patched to abort their requests on cancel, and the
desktop waits for electron-updater to release the download before the cancel completes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(client-runtime): an update check's deadline interrupts the request it gave up on

The 60-second Promise.race freed the check but left the refresh RPC running, so a repeat check
could overlap it. Atom commands now take an abort signal that interrupts their effect, and the
update check aborts each request at its deadline.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(desktop): a differential download cancelled between ranges opens no further range

Cancelling during electron-updater's one-second pause after every 100th range rejected the
download, but the scheduled continuation still ran and opened the next range, racing the retry.
The patched DifferentialDownloader now clears that pending pause on cancel, and every range or
copy step checks the cancellation token before it resumes, in both the single and multiple range
paths.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(client-runtime): an update check that joins a running provider refresh stops at its deadline

A single-flight command hands a joining caller the running promise, so the caller's abort signal
never reached it and the update check kept spinning past its 60-second deadline. Each caller's
wait now ends when its own signal aborts, and the shared refresh-providers run is interrupted
after 60 seconds, so the request itself ends even when no caller can cancel it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(client-runtime): a shared provider refresh outlives the caller that started it

The 60 s deadline now belongs to the update check alone. Manual refreshes
keep the server's own provider budgets, so a 75 s Antigravity model
discovery is no longer cut off.

A single-flight run gets its own AbortController. Each caller's signal only
ends that caller's wait, and the run is cancelled once the last waiter
leaves. runAtomCommand keeps the two-argument call when there is no signal.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(mcp-gateway): a launcher joins the next owner when a stopping owner resets its connection

A stopping owner can accept the launcher's reconnect and then reset it while
it releases the port. Only ECONNREFUSED was transient, so the launcher exited
with ECONNRESET instead of moving the session; this made the owner-handover
test fail on CI. Treat a reset during the handshake like a retiring owner.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…ardening

# Conflicts:
#	apps/server/src/provider/agentContextBudget.json
Randy's fifth pass on #288:

- Redaction is case-insensitive. Every `{text}` reads as the marker, quoted
  or not, and text of three or more characters is replaced everywhere in a
  goal. Shorter text may appear only in a quoted label of a goal that uses
  `{text}`; elsewhere the goal is refused.
- An echoed value the helper clipped with "…" is stripped on the server, and
  the helper hides clipped and case-varied forms and scrubs the end surface.
- decision.answer logs the aliased keys; task.end, approval.request,
  approval_skipped, grant, task.progress and act are redacted before they
  are recorded, the typed text kept only as a digest.
- hostDecide reserves the step before building the state it sends, from the
  reserved task.
- Reader approvals hide the text in the app and file path; snapshot choices
  are filled round-robin, and tab and app keys count as controls.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fix(computer): bind hosts to their session and end every wait with its task
Round 5 review found several places that cut a line before hiding the
typed text, so a cut could keep a piece of it that no match then found.

- Helper: clip() takes the run's secret and hides it before cutting, so
  every control description, tab title, page text, surface and popup
  passes through one redact-then-clip path; every question set goes out
  through ask(), which scrubs state and questions.
- Server: redactThenClip/redactThenCap replace clip-then-hide in task
  ends, host events, refusals and approval bindings; readerBinding
  redacts every optional action field; clipped echoes whose cut ends in
  a prefix of the typed text count as echoes.
- Quoted labels exempt short text only when {text} stands outside short
  label-only quotes, and word boundaries apply only at alphanumeric ends.

Tests run a long, prefixed, mixed-case secret through the decider,
snapshots, status, audit and errors, cover the quoted-label cases, and
guard a decision raced against an in-flight type approval.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jayleaton
jayleaton marked this pull request as draft November 21, 2026 05:13
@jayleaton

Copy link
Copy Markdown
Author

Opened against the wrong repository by mistake; sorry for the noise.

@jayleaton jayleaton closed this Nov 21, 2026
@github-actions github-actions Bot added vouch:unvouched Author is not yet trusted in the VOUCHED list. size:XXL 1,000+ changed lines (additions + deletions). labels Nov 21, 2026
@github-actions

Copy link
Copy Markdown
Contributor

This PR changes the test suite by +700 test cases (browser +44, unit +303, server +353).

New browser test files: apps/web/src/McpGatewayHost.browser.test.tsx, apps/web/src/components/agents/AgentGatewayStatus.browser.test.tsx, apps/web/src/components/agents/AgentTaskDialog.browser.test.tsx, apps/web/src/components/agents/AgentsLoadingNotice.browser.test.tsx, apps/web/src/components/agents/AgentsRoutes.browser.test.tsx, apps/web/src/components/agents/ThreadCard.browser.test.tsx, apps/web/src/components/computer/ComputerApprovalCard.browser.test.tsx, apps/web/src/components/settings/EnvironmentActionsMenu.browser.test.tsx, apps/web/src/components/settings/McpGatewaySettings.browser.test.tsx, apps/web/src/components/settings/McpGatewaySettings.sync.browser.test.tsx, apps/web/src/state/shell.browser.test.ts.
Each browser test file costs CI seconds of module loading before its first test runs; a unit test costs milliseconds.

Keep tests that would fail for a real reason, and test logic below the UI where it can be. See Testing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XXL 1,000+ changed lines (additions + deletions). vouch:unvouched Author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant