Repository navigation
Description
Context
Once a session is tainted, narrowed (packages/ui-sdk/src/server/egress-proxy.ts:119-120 and :136) refuses any connection whose host is neither in taint.egress.allow nor already contacted by the session. The refusal is silent and final. The model sees proxy refused the connection (WebFetch) or CONNECT tunnel failed, response 403 (curl), and the user is never asked. Outward hosts already have an approval path in the same proxy (approveOutward, packages/ui-server/src/brain/turn-egress.ts:150-158). It asks through requestToolPermission, with no grant surface for voice (noGrantSurface: options.origin === "voice", :155).
The G6 rule (docs/decisions/governed-writable-workers.md, "Untrusted input (G6)" at :3760) chose refusal for every tainted session: egress "switches to the policy's taint.egress allow-list".
Observed on a hosted install: in several sessions, WebFetch of public pages and gh/curl to the GitHub API were refused. The agent then told the user that the page "wouldn't load here" or that they "could approve the outward network access for this turn". No such approval route exists.
Citations verified at main 3d3516a02.
Decision (maintainer, 2026-11-03)
A. Ask. When a tainted interactive session reaches a destination outside its taint allow-list, show a permission card naming the destination and the taint source (for example "this session read a shared PDF; allow a connection to example.org?"). An allow covers that host for the rest of the session. Voice and autonomous turns keep refusing. The G6 ADR update is part of the work.
Rejected: B (ask only for reads) and C (keep refusing with an after-the-fact notice).
Scope
- Route narrowed admissions in interactive turns through an approval path, reusing
requestToolPermissionand its card, the wayapproveOutwarddoes. - The card names the destination, the session's first taint source, and the consequence of allowing it.
- An allowed host is admitted for the rest of the session, across turns, without asking again.
- Voice (
noGrantSurface) and autonomous turns keep the current refusal. - Record the ruling in G6 (
docs/decisions/governed-writable-workers.md) with a dated supersession.
Out of scope
- What taints a session (ui-server: an ordinary shell command taints a governed session even when the egress proxy records real connections #3429) and the provider relay (ui-server: a relayed provider request taints the session and is narrowed after taint, so tool order decides whether WebFetch or reranking works #3246).
- Outward-action rules, which already ask while tainted.
- The
denyandallowlistegress modes, which still refuse first, without a prompt. - A classifier that decides when to ask (Spike: classify a tainted session's outgoing calls for likely data extraction, with heuristics first and JEV for the ambiguous band #3434).
Acceptance criteria
- In a tainted interactive session, a connection to a new host raises the permission card naming the destination and the taint source. Allowing it admits the connection and records an
egress_connectionfor it. Denying it refuses with a reason the model sees. The test fails on current main. - A host allowed once in a session is admitted again in later turns of that session without asking; a different host still asks.
- Voice and autonomous turns are unchanged: they refuse without a prompt.
- Hosts denied by
denyor outsideallowlistmode are refused without a prompt. - Cancelling the turn while the card is pending refuses the connection (no admission after abort).
- The G6 section records the dated supersession; contract docs describe the card if its request shape gains anything.
- A mutation that skips the approval and refuses (today's behaviour) fails the first criterion's test (receipt in the PR).
Verification
Proxy and turn-egress tests with a real permission bridge double at the lowest shared request method, plus a ui-react test for the card copy.
Contract impact
Additive. The card reuses the existing tool-permission request; any new request kind, field or card variant is additive and is documented with a CONTRACT: commit and changeset. The governance behaviour change (ask instead of refuse in interactive sessions) is recorded in G6.
Triage 2026-11-03: folded the maintainer ruling (A: ask with a session-scoped per-host grant; voice and autonomous keep refusing; G6 update in scope).
Activity
schlessera commentedon Nov 3, 2026
Decision (maintainer, 2026-11-03): A — ask. A tainted interactive session that reaches a destination outside its taint allow-list shows a permission card naming the destination and the taint source. An allow covers that host for the rest of the session. Voice and autonomous turns keep refusing. Updating the G6 ADR is part of the acceptance criteria. B and C are rejected. Removed
needs: decision;agent-ready. #3434 stays blocked on this issue's delivery.schlessera commentedon Nov 3, 2026
Claimed (
claim-3430-80b3a03b). Branchfeat/3430-tainted-destination-asks, targeting the epic integration branchepic/3428-session-taint.Collision report: path overlap with #3443 (epic #1645 batch 1 to main; touches
egress-proxy.ts,turn-egress.tsand G6) and doc-only overlap ongoverned-writable-workers.mdwith #3342, #3393, #3404, #3449, #3456, #3458, #3464. Other reports are closure-only.schlessera commentedon Nov 3, 2026
Implementation is in #3507 (ready), targeting
epic/3428-session-taint; head7184e3eec, epic basec89c5b823. It covers every acceptance criterion, with failing-first and mutation receipts in the PR. Hosted CI proof is pending. The two governed composition cases and the provider-history guard can't run on the local host, which can't create user namespaces; the composition cases fail identically on the unmodified epic. The issue stays assigned and open until the epic batch lands on main.CONTRACT: feat(ui-sdk): a tainted interactive session asks before a n…
Merge branch 'main' into epic/3428-session-taint
test(evals): measure an extraction classifier for tainted sessions' o…
CONTRACT: feat(ui-server,common): judge a tainted session's outgoing …