Repository navigation
Closed
Labels
agent-readyContext and acceptance criteria are complete enough for an agent to take this unattended.area: modulesFirst-party content modules and the module seam.area: ui-sdkWire protocol, runtime schemas, the server and client SDK surfaces.priority: p2Wanted, not scheduled. Pulled in when a milestone has room.type: fixSomething is broken and must behave the way it is documented.
Milestone
Description
Context
When the egress proxy or the provider relay refuses a request because the session is tainted, neither the agent nor the user learns that taint was the cause:
- Provider relay. The relay answers 403 with
{"type":"error","error":{"type":"egress_refused","message":"Provider network admission refused"}}(packages/ui-sdk/src/server/provider-relay.ts:419-423). The OpenAI image provider appends a generic hint to every 403 (packages/module-images/src/providers/openai.ts:197). The CLI therefore printedOpenAI: Provider network admission refused (region not supported, or the org is not verified), and the agent concluded the OpenAI account had a problem. - Turn proxy. A narrowed CONNECT is refused with no body the tools surface. WebFetch reports
proxy refused the connection, andcurlreportsCONNECT tunnel failed, response 403.
Observed on a hosted install, 2026-11-02: one image request and several WebFetch calls. In each case the agent's explanation to the user was wrong.
Scope
- Relay refusals: carry the refusal reason (
taint_allowlist,denied_host,not_allowlisted,byte_cap,budget_exceeded) in the response body'serror.typeor message, without credentials or content. - Image providers: do not add the region/verification hint when the response is a relay refusal (
brain_provider_refused/egress_refused). Show the relay's message instead. - Proxy refusals: answer a refused CONNECT or HTTP request with a short reason in the response, which the proxy currently drops, so WebFetch and
curlcan surface it. For example:Blocked: this session read untrusted content (<source>); <host> is not on its allow-list. - System prompt: make the line about network refusals name taint as a possible cause and say what the user can do.
Out of scope
- Whether the request should have been refused (sibling issues and ui-server: a relayed provider request taints the session and is narrowed after taint, so tool order decides whether WebFetch or reranking works #3246).
- Roadblock classification, which already records
network_refused egress taint_allowlistcorrectly.
Acceptance criteria
- A relayed image request refused for taint produces a CLI error naming the taint cause, with no region/verification hint. The test fails on current main.
- A refused proxy CONNECT returns a reason that appears in
curl -voutput in a test. - The provider's existing 403 hint still appears for a genuine upstream 403.
Verification
Keyless tests through the real relay and proxy on loopback, with a mutation receipt for the hint suppression.
Contract impact
The relay's refusal body is internal. If error.type values are documented, adding a reason is additive.
Metadata
Metadata
Assignees
Labels
agent-readyContext and acceptance criteria are complete enough for an agent to take this unattended.area: modulesFirst-party content modules and the module seam.area: ui-sdkWire protocol, runtime schemas, the server and client SDK surfaces.priority: p2Wanted, not scheduled. Pulled in when a milestone has room.type: fixSomething is broken and must behave the way it is documented.
Activity
schlessera commentedon Nov 4, 2026
Claiming (token
c3431-04db). Branchfix/3431-taint-refusal-reasons, based on the epic integration branchepic/3428-session-taint; PR will target the epic withRefs #3431.schlessera commentedon Nov 4, 2026
Readiness, 2026-11-04 (epic branch
epic/3428-session-taintat5c883a5b2, main merged in):narrowed,packages/ui-sdk/src/server/egress-proxy.ts:160), so a relayed image request can no longer be refused for taint. The relay can still be refused by the proxy for other causes: the egress deny list, allowlist mode, the turn byte cap, an unapproved outward host, or a budget. I'll meet AC 1 for those causes. A relayed request refused by the turn's proxy gets a body naming the cause (an additiveerror.reasonalongside the unchangederror.type), and the CLI shows it without the region/verification hint. A deny-listed host serves as the failing-first case on the current epic tip.taint_not_approved) a status text and body. This slice extends that to every proxy refusal: a tainted session's host outside the allow-list with the taint source named, deny list, allowlist mode, byte cap and outward-not-approved. The CONNECT status line carries the reason, socurl -vandegress-connectprint it.CONTRACT: fix(ui-sdk, modules): taint and egress refusals say why (#3431