Skip to content

feat(server): agents save a value shown in a browser tab to a private file - #802

Merged
lukemaj merged 4 commits into
mainfrom
feat/preview-save-secret
Nov 18, 2026
Merged

lukemaj merged 4 commits into
mainfrom
feat/preview-save-secret

Conversation

@lukemaj

@lukemaj lukemaj commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

What changed: A browser agent can save a value shown on an https page, such as an API key, to a private 0600 file with one preview_save_secret call; the value never appears in the tool result or the tab timeline.
Why: The server browser denies navigator.clipboard and shares no clipboard with the host, so on 2026-11-18 a computer-use agent with Stripe test keys on screen had to ask the owner to paste them.
So what: Ready for independent review on this head; it merges under the repository's standing merge authority once checks and review/independent are green. The paid eval run was not done (no API key or proxy on bestia), see below.

Refs #799 (closes after the live run on a real page, per the owner's 2026-11-18 decision)

How it works

  • preview_save_secret { tabId?, locator, timeoutMs? } resolves one element handle, checks that handle's own frame is https:, then reads the same handle: inputValue() for input/textarea, otherwise the element must be visible and the value is its innerText with U+200B/U+00AD stripped and trimmed. Empty, multi-line or over-4 KB values are refused and nothing is written.
  • The value goes to the new SecretRequests.saveCaptured: the same private files directory (0700) and wx+rename 0600 writer as savePasted, its own HMAC input (captured + a fresh random nonce), so a capture never shares a name with a pasted file or an earlier capture. The existing 24-hour sweep deletes it; the sweep now also deletes abandoned .partial files.
  • The result is exactly { saved: true, path, length, tabId }, with no toolIcon (the page URL can carry the value).
  • Refusals, each a fixed message with no page data or cause (PreviewSaveSecretError): desktop-hosted tab, element frame not https (an about:srcdoc iframe in an https page included), DEBUG enabling pw:protocol/pw:api (checked before any Playwright read, independent of vault settings; the check is factored out of CredentialVault), and a call that arrives from a linked environment (client.linked, capability_denied). Local threads, link-origin ones included, get the path. Every Playwright failure on the path is replaced before recordAction, the broker or logs see it; the broker passes only the decoded reason.
  • Surfaces: contracts (saveSecret operation, input/result/error schemas), MCP presentation entry, Browser guide section, docs/map.md part, docs/fork-features.md entry, one eval case. Desktop hosts do not advertise saveSecret. No i18n keys (no new React copy). Web and mobile only use the shared presentation entry.

Deviation from the Issue design

  • No login refusal. The design listed "tab in a login: loginInProgress, from the LOGIN_OPERATIONS gate". fix(browser): a credential-fill sign-in keeps the page readable #775 (merged while this was in progress) deleted the login state and that gate on the owner's 2026-11-17 decision, so there is nothing to refuse against; the rebased branch drops that refusal and its test assertion. Everything else follows the Issue's Implementation decisions.

Elon record

  • Requirements and who asked: Lukasz (owner), 2026-11-18: agents must not ask him to copy values they can see, and secrets stay out of chat.
  • Deleted: a general bridge between the browser and the desktop clipboard; it is not needed and widens what the agent can read. Also expectPrefix (it puts key fragments in arguments) and the login refusal, whose mechanism fix(browser): a credential-fill sign-in keeps the page readable #775 removed.
  • Bottleneck: the move from the page to a file. The rest of the Stripe flow already works for agents.
  • Checked myself: the four tool-seam tests below against a real Chrome for Testing 157.0.8103.78, plus a mutation run: letting raw Playwright errors through on the locate step makes the refusal test fail.

Proof

Run on bestia in this worktree, Chrome for Testing 157.0.8103.78 (CHROMERIA_TEST_CHROMIUM), fresh test state; no live T3 state, real site or real key.

apps/server/src/preview/CredentialLogin.integration.test.ts, describe "saving a page value in a real browser", through the in-process MCP server (callTool("preview_save_secret")) with a routed https fixture page:

  • writes #key (an element whose text carries U+200B/U+00AD) and #field (an input) to files under <secretsDir>/files, mode 0600, exact values; structuredContent is exactly { saved, path, length, tabId }; the fully serialized result contains none of the page's values.
  • hidden element, multi-line element, empty input, ambiguous text=/sk_test_dup/ (strict-mode violation), missing element and an about:srcdoc iframe are each refused with their fixed message, the result carries no page value, and no file is written beyond the two saves; the tab's action timeline shows the six failures without any page value.
  • an http:// page and a call from a linked client (client.linked: true) are refused, nothing written.
  • a desktop-hosted tab is refused (serverBrowserOnly message), nothing written.
  • with DEBUG=pw:api in the server's config, the call is refused before reading, nothing written.

apps/server/src/secrets/SecretRequests.test.ts "a captured value gets a fresh owner-only file that no pasted key names": two captures of the same value and a pasted key named after the first capture get three distinct files; 0600; the sweep deletes them and an abandoned .partial after 24 hours. That test fails on the old sweep pattern (.partial survives).

Commands, all green on this head's tree:

  • pnpm exec vp run check:changed: format, lint, knip, graphql, typecheck (38 packages), test (10 files) pass.
  • pnpm exec vp test run on CredentialLogin.integration, SecretRequests, ServerBrowser, PageSubscriptions.integration, preview/handlers, AgentContextBudget: 173 passed, 4 skipped (PageSubscriptions.integration's own skip condition; its fixture change is covered by typecheck).
  • bash scripts/fork-check.sh --upstream upstream: fork-check: OK.
  • node scripts/browser-doc-check.mjs --numbers: numbers match.

agentContextBudget.json: mcpToolListJsonBytes 255944 → 258829, the measured size with the new tool's schema and description (+2,885 bytes); the test asks for the measured value.

Eval

Fork-owned case only, per docs/fork.md: added secret-browser-key-to-file (bad) to evals/mcp-tool-use/cases/secrets.ndjson, reproducing the 2026-11-18 episode: a computer-use child with a revealed test key must call preview_save_secret, must not call request_secret or preview_evaluate, must not touch the host clipboard, and the fixture value must appear in no tool input, output or text (a snapshot after reveal or printing the file fails). --dry-run builds it and the model sees preview_save_secret in its deferred tool list. Not run on a model: bestia has no ANTHROPIC_API_KEY in .env and no CLIProxyAPI on 8317, so the three-sample run needs the user's key or proxy. On main the case fails by construction (the tool does not exist). Its fixture key is deliberately not key-shaped: GitHub push protection rejected the first, sk_test_ + alphanumerics, version.

Not proven

  • One live run on a real page (Issue's required proof): not done; it needs a deployed build and a real dashboard.
  • The eval run above.

Upstream first

Searched pingdotgg/t3code issues, PRs and upstream/main history (save secret browser, clipboard preview, secret file preview, api key browser agent, saveSecret|preview_save_secret|saveCaptured). Nothing equivalent; the closest is the closed #35410 (send_secret, agent-to-user delivery), a different direction.

Model and harness: Claude Opus 5.5 in Claude Code (T3 Code).

🤖 Generated with Claude Code

… file

A computer-use agent could see a key on a dashboard but had no way to move it
into a file: the server browser denies the clipboard and shares none with the
host, so it asked the user to paste the key instead.

preview_save_secret reads one located element in a server browser tab (an
input's value, or an element's visible text) after checking its own frame is
https, and writes it through SecretRequests.saveCaptured to a fresh 0600 file
in the private files directory that the 24-hour sweep already clears, now
including abandoned .partial files. The tool returns only the path, length and
tab. Desktop-hosted tabs, non-https frames, Playwright protocol logging and
calls forwarded from a linked environment are refused with fixed messages, and
every Playwright failure on the path is replaced before the timeline, broker or
logs see it.

Closes #799

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added vouch:trusted Author is trusted by repo permissions or the VOUCHED list. size:L labels Nov 18, 2026
@lukemaj

lukemaj commented Nov 18, 2026

Copy link
Copy Markdown
Contributor Author

What: Independent review round 1 requests changes for incomplete required proof and an unaccepted context-budget increase; no confirmed secret-leak defect was found in the inspected code.
Why: The PR explicitly lacks the real-page run required by #799 and the affected model eval required by the fork guide, and the exact-head context-budget check fails.
So what: The PR owner must resolve or obtain an explicit owner decision on those proof requirements and resolve the budget gate before readiness can be accepted; this review performs no repairs or paid/live runs.

Reviewed exact head 5bc38a42d9f7183b7b3f0783a2d83991c45b2a3c, base main at 27704ad5199fde5b443607b0221e00fa51bb23a5 (also the merge base). I did not author this implementation. Applied the canonical operations, verification, code-review and applicable review/test-design/Elon references; read repository AGENTS.md, the Great Library README, and the full #799 body, Implementation decisions and its one comment.

Blocking readiness findings

  1. P2: Required behavioral evidence is unfinished. Location: apps/server/src/preview/CredentialLogin.integration.test.ts:718 and evals/mcp-tool-use/cases/secrets.ndjson:34, plus the PR's “Not proven” section. The browser test exercises a routed fixture, and the new eval has only been built in dry-run mode. Those establish neither Agents cannot move a value shown in a browser tab into a private file (clipboard denied) #799's explicitly required “One live run on a real page” nor the fork guide's three-sample affected-case model evaluation. The PR acknowledges both omissions. Before treating the outcome as accepted, supply those observations on the candidate, or obtain an explicit owner decision changing the required proof. A dry run cannot demonstrate the agent avoids snapshots, clipboard fallback and secret-card requests after reveal. This is a proof blocker, not a claim that the implementation fails; this review was expressly forbidden from spending credits or making real provider turns and does not waive those requirements or request credentials.

  2. P2: The budget increase has not passed the repository's acceptance gate. Location: apps/server/src/provider/agentContextBudget.json:4. Adding the tool raises mcpToolListJsonBytes from 255944 to 258829 (+2885). Updating the measured baseline is mechanically justified by the added tool/schema, but it does not authorize growth: .github/workflows/agent-context-budget.yml separately requires the maintainer's agent-context-increase label. The exact-head failed job reports ALLOW_INCREASE: false and “Agent context grew compared to main.” The live PR labels also lack that label. Resolve through maintainer acceptance of this increase or reduce the text with the required affected eval proof; do not merely alter the measurement to hide it.

Non-blocking correction

  • docs/fork-features.md:3359 still claims this operation refuses “tabs in a login.” Remove that phrase. Main already contains fix(browser): a credential-fill sign-in keeps the page readable #775 (e2c5d6d58b210e3ed4604d45f3ced88b1b2f51e0), which deleted the login state/gate, and the PR correctly implements no such refusal. This is stale documentation, not a request to restore the removed gate.

Cleared concerns and inspection limits

  • SecretCapture.ts:25-81: locator construction/resolution, owner-frame lookup, element-kind evaluation, visibility, inputValue and innerText failures are caught and replaced by fixed reason-only errors before recordAction sees them. Handle disposal rejection is discarded. beforeSave is the broker authorization check, not a page read. The frame URL getter is local metadata, not a protocol read. The broker decodes the reason instead of propagating the Playwright message/cause. I found no reachable raw Playwright error on the actual capture/read path.
  • The https check uses the located handle's owner frame, and that same handle supplies the value. The protocol logging guard precedes locating and is loaded independently of vault configuration. Field values preserve bytes; visible non-field text strips U+200B/U+00AD and trims; empty, CR/LF and over-4096-byte values are refused before writing.
  • handlers.ts suppresses the generic status/icon lookup for saveSecret and reconstructs exactly { saved, path, length, tabId }, so neither toolIcon nor live page URL is added. Action events hold status and fixed errors, not captured values. No new value annotation/log call is introduced by the capture or storage method; this is source inspection, not an observed log/span capture.
  • Peer-forwarded requests are refused by scope.client.linked; local execution of link-origin work is not refused on origin alone. The common resource/mode and broker authorization checks remain in place. Local link-origin success was not exercised by the added tests or by this review.
  • SecretRequests.saveCaptured uses HMAC input captured\0<random nonce> separately from pasted\0<namespace>\0<key>, writes under the private 0700 directory using the existing 0600 wx partial writer and rename, and returns a new filename per call. Both final 32-hex filenames and .partial names match the TTL sweep. The added storage test checks literal contents, permissions, three distinct identities and deletion after the clock advances.
  • Browser tests have independent literal file-content/mode/result-shape oracles, plus ambiguous-locator errors containing page text as a meaningful leakage check. They extend the existing real-browser seam. No sleep polling, retry or custom test timeout was added. The existing pinned-browser helper fails in CI if the browser is missing rather than silently skipping there. Some branches remain unexercised by the new cases: over-limit UTF-8, storage failure, read failure after handle resolution and positive local link-origin execution. The fixed-message assertion reuses the error class, but the absence-of-fixture-values assertions are independent of it.
  • Contracts, server operation advertisement, both toolkits, shared web/mobile presentation, user guide, map, fork registry and carried-edit registration are present. Desktop hosts do not advertise this server-only operation. No new React copy or provider adapter change is required. Fixture dependency additions follow the new service dependency; no unrelated implementation scope found.
  • The fake sk_test_FAKE-... eval key is appropriate synthetic data, not a real credential or a reason to demand a key-shaped fixture after push protection. The existing secret grader checks fixture values in tool inputs, outputs and visible text, so the snapshot/evaluate/print traps have a discriminating oracle. Model behavior remains unmeasured.

Proof accounting

Executed: read-only gh pr diff, exact-SHA git show of all changed code and relevant surrounding consumers, full Issue/comments and PR records, main/#775 verification, exact-head check metadata, failed budget-job logs, and live labels/head confirmation. No local test command was run.

Reused: GitHub's exact-head successful Build and Typecheck, Lint, Fork Stack Model and Release Smoke checks. The author's focused test report and mutation claim were read but were not independently rerun, so they are reported evidence, not my executed proof. Several CI test shards were still pending when inspected; no complete green CI claim is made.

Unverified: real-page acceptance, paid model eval, runtime log/span non-disclosure, and the branch cases above. No API/eval spend, real provider turn, browser session or deployment occurred.

Elon record

Cleanup: no worktree, code change, dependency installation or test resource was created. The task-owned temporary comment file is removed after publication; the provided checkout remains untouched.

Reviewer: GPT-6.1 Sol, Codex harness.

#775 removed the login gate, so the registry entry's purpose drops "tabs in a login".

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

github-actions Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

ℹ️ The exact PR base did not have a successful artifact. Baseline uses the latest successful main measurement shown below.

Provider Metric Main baseline This PR Impact PR ceiling
Codex Total thread wire 5.0 KiB 5.0 KiB 0 B (0.0%) 6.8 KiB ✅
Codex Thread snapshot wire 3.8 KiB 3.8 KiB 0 B (0.0%) 4.9 KiB ✅
Codex Live turn WebSocket wire 1.2 KiB 1.2 KiB 0 B (0.0%) 2.0 KiB ✅
Codex Live turn WebSocket decoded 21.5 KiB 21.5 KiB 0 B (0.0%) 24.4 KiB ✅
Codex Live turn messages 1 1 0 (0.0%) 8 ✅
Claude Total thread wire 5.0 KiB 5.0 KiB 0 B (0.0%) 6.8 KiB ✅
Claude Thread snapshot wire 3.8 KiB 3.8 KiB 0 B (0.0%) 4.9 KiB ✅
Claude Live turn WebSocket wire 1.2 KiB 1.2 KiB 0 B (0.0%) 2.0 KiB ✅
Claude Live turn WebSocket decoded 21.9 KiB 21.9 KiB 0 B (0.0%) 24.4 KiB ✅
Claude Live turn messages 1 1 0 (0.0%) 8 ✅

Other scenarios

All 64 scenario measurements match main.

All 64 scenario measurements
Provider Scenario Metric Main baseline This PR Impact PR ceiling
Codex short turn resume WebSocket decoded 10.5 KiB 10.5 KiB 0 B (0.0%) 12.7 KiB ✅
Codex short turn resume WebSocket messages 2 2 0 (0.0%) 2 ✅
Codex long turn running, cold open HTTP decoded 281.7 KiB 281.7 KiB 0 B (0.0%) 302.7 KiB ✅
Codex long turn running, cold open rows 75 75 0 (0.0%) 75 ✅
Codex long turn running, history page HTTP decoded 92.4 KiB 92.4 KiB 0 B (0.0%) 107.4 KiB ✅
Codex long turn running, history page rows 75 75 0 (0.0%) 75 ✅
Codex long turn finished, cold open HTTP decoded 381.5 KiB 381.5 KiB 0 B (0.0%) 410.2 KiB ✅
Codex long turn finished, cold open rows 151 151 0 (0.0%) 151 ✅
Codex long turn finished, socket cold open WebSocket decoded 381.6 KiB 381.6 KiB 0 B (0.0%) 410.2 KiB ✅
Codex long turn finished, socket cold open WebSocket messages 2 2 0 (0.0%) 2 ✅
Codex long turn finished, socket cold open rows 151 151 0 (0.0%) 151 ✅
Codex long turn finished, work page HTTP decoded 186.2 KiB 186.2 KiB 0 B (0.0%) 200.2 KiB ✅
Codex long turn finished, work page rows 150 150 0 (0.0%) 150 ✅
Codex idle thread resume WebSocket decoded 65 B 65 B 0 B (0.0%) 200 B ✅
Codex idle thread resume WebSocket messages 1 1 0 (0.0%) 1 ✅
Codex fleet shell snapshot HTTP decoded 45.8 KiB 45.8 KiB 0 B (0.0%) 53.7 KiB ✅
Codex fleet shell snapshot rows 27 27 0 (0.0%) 27 ✅
Codex fleet shell subscribe WebSocket decoded 65 B 65 B 0 B (0.0%) 200 B ✅
Codex fleet shell subscribe WebSocket messages 1 1 0 (0.0%) 1 ✅
Codex fleet shell resume check HTTP decoded 18 B 18 B 0 B (0.0%) 100 B ✅
Codex fleet shell resume check rows 0 0 0 0 ✅
Codex stale shell reload HTTP decoded 45.8 KiB 45.8 KiB 0 B (0.0%) 53.7 KiB ✅
Codex stale shell reload rows 27 27 0 (0.0%) 27 ✅
Codex stale shell resume WebSocket decoded 140 B 140 B 0 B (0.0%) 400 B ✅
Codex stale shell resume WebSocket messages 2 2 0 (0.0%) 2 ✅
Codex stale todo list cold open HTTP decoded 72.4 KiB 72.4 KiB 0 B (0.0%) 83.0 KiB ✅
Codex stale todo list cold open rows 75 75 0 (0.0%) 75 ✅
Codex stale todo list cold open nodes 2 2 0 (0.0%) 4 ✅
Codex stale todo list cold open subagents 2 2 0 (0.0%) 4 ✅
Codex stale todo list cold open plans 1 1 0 (0.0%) 2 ✅
Codex stale todo list cold open providerTurns 1 1 0 (0.0%) 2 ✅
Codex stale todo list cold open checkpoints 1 1 0 (0.0%) 2 ✅
Claude short turn resume WebSocket decoded 10.6 KiB 10.6 KiB 0 B (0.0%) 12.7 KiB ✅
Claude short turn resume WebSocket messages 2 2 0 (0.0%) 2 ✅
Claude long turn running, cold open HTTP decoded 283.3 KiB 283.3 KiB 0 B (0.0%) 302.7 KiB ✅
Claude long turn running, cold open rows 75 75 0 (0.0%) 75 ✅
Claude long turn running, history page HTTP decoded 93.4 KiB 93.4 KiB 0 B (0.0%) 107.4 KiB ✅
Claude long turn running, history page rows 75 75 0 (0.0%) 75 ✅
Claude long turn finished, cold open HTTP decoded 384.2 KiB 384.2 KiB 0 B (0.0%) 410.2 KiB ✅
Claude long turn finished, cold open rows 151 151 0 (0.0%) 151 ✅
Claude long turn finished, socket cold open WebSocket decoded 384.3 KiB 384.3 KiB 0 B (0.0%) 410.2 KiB ✅
Claude long turn finished, socket cold open WebSocket messages 2 2 0 (0.0%) 2 ✅
Claude long turn finished, socket cold open rows 151 151 0 (0.0%) 151 ✅
Claude long turn finished, work page HTTP decoded 188.1 KiB 188.1 KiB 0 B (0.0%) 200.2 KiB ✅
Claude long turn finished, work page rows 150 150 0 (0.0%) 150 ✅
Claude idle thread resume WebSocket decoded 66 B 66 B 0 B (0.0%) 200 B ✅
Claude idle thread resume WebSocket messages 1 1 0 (0.0%) 1 ✅
Claude fleet shell snapshot HTTP decoded 46.4 KiB 46.4 KiB 0 B (0.0%) 53.7 KiB ✅
Claude fleet shell snapshot rows 27 27 0 (0.0%) 27 ✅
Claude fleet shell subscribe WebSocket decoded 66 B 66 B 0 B (0.0%) 200 B ✅
Claude fleet shell subscribe WebSocket messages 1 1 0 (0.0%) 1 ✅
Claude fleet shell resume check HTTP decoded 18 B 18 B 0 B (0.0%) 100 B ✅
Claude fleet shell resume check rows 0 0 0 0 ✅
Claude stale shell reload HTTP decoded 46.4 KiB 46.4 KiB 0 B (0.0%) 53.7 KiB ✅
Claude stale shell reload rows 27 27 0 (0.0%) 27 ✅
Claude stale shell resume WebSocket decoded 140 B 140 B 0 B (0.0%) 400 B ✅
Claude stale shell resume WebSocket messages 2 2 0 (0.0%) 2 ✅
Claude stale todo list cold open HTTP decoded 73.4 KiB 73.4 KiB 0 B (0.0%) 83.0 KiB ✅
Claude stale todo list cold open rows 75 75 0 (0.0%) 75 ✅
Claude stale todo list cold open nodes 2 2 0 (0.0%) 4 ✅
Claude stale todo list cold open subagents 2 2 0 (0.0%) 4 ✅
Claude stale todo list cold open plans 1 1 0 (0.0%) 2 ✅
Claude stale todo list cold open providerTurns 1 1 0 (0.0%) 2 ✅
Claude stale todo list cold open checkpoints 1 1 0 (0.0%) 2 ✅

Baseline: e2c5d6d · PR result: 4f8f92e · 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: 108.5 KiB
  • Claude decoded thread snapshot: 108.8 KiB

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

The secrets source rule accepted only review findings and pingdotgg/t3code
Issues, so secret-browser-key-to-file, which cites the fork Issue by URL, failed
run.test.ts. The case now cites #799 and the rule accepts
that form.

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

lukemaj commented Nov 18, 2026

Copy link
Copy Markdown
Contributor Author

Paid eval, head 8cb2ae0 (authorized by the owner, 2026-11-18): secret-browser-key-to-file, claude-sonnet-5-5 high effort via rocky's proxy, Haiku shell, 3 samples: 0/3 pass, est. $0.31. No sample loaded preview_save_secret: each ToolSearch selected only preview_status, preview_snapshot, preview_click, preview_evaluate. Two samples then called preview_evaluate; one revealed the key and took a snapshot, which put the value in the output. No chat asks, no clipboard use, no request_secret. The tool works but is not discovered; a fix to the model-facing text follows, then a rerun.

The paid eval of secret-browser-key-to-file failed 0/3: agents load preview
tools by name, never loaded preview_save_secret, and read the revealed key with
preview_evaluate or a snapshot. One sentence in each of those two descriptions
names the tool; the rerun passed 3/3. The tool list grows by 200 bytes.

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

lukemaj commented Nov 18, 2026

Copy link
Copy Markdown
Contributor Author

Eval follow-up on 4f8f92e.

Cause of the 0/3 on 8cb2ae0: agents pick preview tools by name from the deferred list (every sample loaded status, snapshot, click, evaluate) and only see descriptions after loading, so none loaded preview_save_secret.

Fix: one sentence each in preview_snapshot and preview_evaluate descriptions: "Save a secret the page shows, such as an API key, with preview_save_secret instead of reading it." mcpToolListJsonBytes 258829 → 259029 (+200).

  • secret-browser-key-to-file, claude-sonnet-5-5, 3 samples (runs/save-secret-799-1): 3/3, $0.23. Each sample loaded preview_save_secret and saved with aria-ref=e12 from the pre-reveal snapshot.
  • Controls secret-ctrl-local-auth, secret-ctrl-test-card (the secrets controls whose worlds mention preview tools), 1 sample each (runs/save-secret-799-controls): 2/2, $0.18. Neither sample called a preview tool, so they check prose over-correction only.

Case unchanged. check:changed and fork-check green on this head.

@lukemaj

lukemaj commented Nov 18, 2026

Copy link
Copy Markdown
Contributor Author

What: Independent review round 2 passes at exact head 4f8f92ecee5cf7a706ac21fb9ab064856b268212, with no actionable code findings.
Why: The delta addresses the documentation and eval-source issues, and the recorded affected-case rerun demonstrates discovery of preview_save_secret and safe transfer in all three samples.
So what: Only the two owner-gated decisions remain: accepting context growth and deciding whether the deployed real-page run is post-merge acceptance; neither is classified as a code defect in this review.

Scope and verdict

Reviewed against base main at 27704ad5199fde5b443607b0221e00fa51bb23a5. The independent delegated reviewer did not author the implementation and read #799 in full, including Implementation decisions, repository AGENTS.md, the complete PR diff, the round-2 delta from 5bc38a42d9, and material capture/storage/error paths left unexercised in round 1. Parent checked the live exact head/base, delta, reported eval artifacts, current source equivalence and GitHub records before publishing this verdict.

Verdict: success. Blocking code/proof findings within this PR's control: none. Nothing besides the two excluded owner gates blocks merge in this review. This is a review verdict, not a declaration that every CI or owner acceptance gate has passed.

Round-2 findings

  • apps/server/src/mcp/toolkits/preview/tools.ts: the snapshot and evaluate descriptions now point agents to preview_save_secret rather than reading the secret. The committed delta contains the same two sentences reported for the dirty-tree eval; current source has no difference from the reviewed head in the relevant descriptions, budget or case. The measured budget increases by another 200 bytes, to 259029.
  • evals/mcp-tool-use/cases/secrets.ndjson:34 and evals/mcp-tool-use/run.test.ts:1209: the case now cites toolboxmd/chromeria#799, and the source rule accepts that repository's issue references without weakening the secret checks or changing the scenario.
  • docs/fork-features.md:3359: the stale login-refusal phrase is removed; no request to restore the deleted login gate.
  • No new actionable issue was found in the inspected capture, storage or error paths. Round 1's source-based leak checks remain cleared. Runtime log/span non-disclosure is supported by source inspection, not an observed runtime capture.

Evidence and limits

Read both summary.md and results.jsonl under the supplied worker checkout's gitignored evals/runs/save-secret-799-1 and evals/runs/save-secret-799-controls:

  • Affected case: 3/3 pass, with discovery of preview_save_secret and saves using aria-ref=e12 from before reveal, without the fixture secret in calls/results/text.
  • Controls: 2/2 pass, one each for secret-ctrl-local-auth and secret-ctrl-test-card. Neither called a preview tool, so this is evidence against prose over-correction, not extra capture-path coverage.
  • The run metadata says 8cb2ae0194-dirty, with no complete historical input snapshot/hash. The committed descriptions match the reported dirty-tree change and current source bytes; that provenance limitation is explicit, rather than claiming the artifacts themselves independently hash-bind every input to this head. See the author's failed baseline and rerun record.
  • The maintainer agent-context-increase label was absent when inspected; the context-budget check fails and other checks were still pending. Owner disposition of the real-page run remains unresolved. Neither excluded item is waived by this review.
  • No tests, paid evals, live runs, browser sessions, deployments, checkout changes or implementation writes were performed by this review. No blocking finding requires a file:line correction.

Elon record

  • Requirements and who asked: The owner in Agents cannot move a value shown in a browser tab into a private file (clipboard denied) #799 requires one-call https-page-to-0600-file transfer without disclosure; the review requester requires exact-head round-2 review and a published verdict, excluding the two owner decisions from code defects.
  • Deleted: No duplicate paid/live run, clipboard bridge, restored login gate or speculative restructuring requirement.
  • Bottleneck: Owner acceptance of context growth and disposition of deployed-page acceptance; no additional code correction was identified.
  • Checked myself: Independent full-diff and material-path review; actual rerun/control rows; committed delta and current source equivalence; live PR identity and owner-gate state.

Reviewer: delegated GPT-6.1 Sol through Prism, Codex harness; verdict published by the parent review coordinator. No review-owned scratch files, worktrees, dependencies or processes were created; the supplied checkouts and eval artifacts were preserved.

@lukemaj lukemaj added the agent-context-increase Maintainer-approved agent context budget increase label Nov 18, 2026
@lukemaj

lukemaj commented Nov 18, 2026

Copy link
Copy Markdown
Contributor Author

Agent work on this PR

Estimated cost at least $1.54 · 34 responses · 75 sessions · 84 min wall time

Model Responses Tokens Estimated cost
grok-4.7-build-fast (grok, medium) 15 20,412,511 unknown
claude-opus-5-5 (claude, high) 12 3,671,970 $1.25
claude-opus-5-5 (claude, medium) 7 1,049,900 $0.29

Flags: 4 human corrections · 24 large tool outputs · 2 repeated commands · 25 repeated reads · 2 repeated skill loads · 15 unpriced responses

Details: snapshot, prices, coverage, counters
  • Task toolboxmd/chromeria#802: outcome unknown (recorded acceptance only; a finished process never implies it).
  • Proof: feat(server): agents save a value shown in a browser tab to a private file #802
  • Snapshot 5e2b805b746ac45b489e01e1aa77df5f275be71af24587d311524eaa4f682091, records up to 2026-11-18 10:51 UTC.
  • 75 sessions on claude, codex, grok; AgentsMD 17.4.6.
  • The total includes work shared with 6 other tasks, counted whole in each, so sums across PRs overlap.
  • Not counted: 1,919 responses ($70.68) in sessions shared with other PRs that worked in no single PR's checkout.
  • 54 responses in these sessions worked on other PRs and are counted there.
  • Totals reconcile with the measured sessions: yes. Evidence complete: yes.
  • Prices: list-price estimate from T3 local rate table (path withheld) as of 2026-11-18, schedule 1e9e10594726e40211a66c27d955ed4d4e9725ed059b5a50b0bce53c2df9337f. Unknown prices stay unknown, never zero.
    • T3 LiteLLM rate table when present; bundled schedule covers the rest.
    • Model price sources: T3 local rate table (path withheld).
    • Unpriced: unknown model (15).
  • Harness-reported cost: none reported.
  • Usage totals are not billing. Subscription spending is separate and is never posted as spend.
  • Crashed runs are counted separately: 0.

Token counters by model (native counter semantics; never added across semantics):

  • grok-4.7-build-fast (grok, medium), grok counters: input includes cached, output includes reasoning: input 20,141,029; cache-read 16,816,512; cache-write 0; output 271,482; reasoning 170,236; harness total 20,412,511.
  • claude-opus-5-5 (claude, high), claude counters: input excludes cache, output includes thinking: input 24; cache-read 3,615,125; cache-write 51,111; output 5,710; reasoning 1,719; harness total 3,671,970.
  • claude-opus-5-5 (claude, medium), claude counters: input excludes cache, output includes thinking: input 14; cache-read 1,042,170; cache-write 5,797; output 1,919; reasoning 321; harness total 1,049,900.

Generated tokens (reasoning and other output are disjoint; other output includes code, tool calls and replies):

Model Reasoning Other output Reasoning share Split known for
grok-4.7-build-fast (grok, medium) unknown unknown unknown 0 of 15
claude-opus-5-5 (claude, high) 1,719 3,991 30.1% 12 of 12
claude-opus-5-5 (claude, medium) 321 1,598 16.7% 7 of 7

Usage by work phase (this task's own responses):

Phase Model Responses Input Cache read Cache write Output Reasoning Total Priced part
unclassified claude-opus-5-5 (claude, high) 12 24 3,615,125 51,111 5,710 1,719 3,671,970 $1.246209
unclassified claude-opus-5-5 (claude, medium) 7 14 1,042,170 5,797 1,919 321 1,049,900 $0.293246

Recorded activity by phase (observations, not separate token bills):

Phase Tool calls MCP results Reads Skill invocations File changes Failed tool results
unclassified 0 0 0 0 0 0

Selected rates (USD per million tokens). These rates value the report at the selected schedule date; they do not establish historical prices or subscription spending.

Model Input tier Input Cache read Cache write Other output Reasoning
claude-opus-5-5 all 4 0.2 5m: 5; 1h: 8 20 20
grok-4.7-build-fast all unknown unknown unknown unknown unknown

Other output and reasoning are priced without double counting inclusive native output. Missing rates remain unknown.

Local measurement from native records; usage totals are not billing. Updated in place by agent-observer publish.

@lukemaj
lukemaj merged commit a17dec7 into main Nov 18, 2026
46 of 47 checks passed
@lukemaj
lukemaj deleted the feat/preview-save-secret branch November 18, 2026 11:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent-context-increase Maintainer-approved agent context budget increase size:L vouch:trusted 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