diff --git a/.changeset/shell-taint-behind-proxy.md b/.changeset/shell-taint-behind-proxy.md
new file mode 100644
index 0000000000..5b83fa807b
--- /dev/null
+++ b/.changeset/shell-taint-behind-proxy.md
@@ -0,0 +1,5 @@
+---
+"@schlessera/brain-ui-server": minor
+---
+
+**Breaking (pre-1.0, #3429):** on a governed or strict turn whose worker runs behind the turn egress proxy, shell commands no longer taint the session through the command classifier. Such a turn stops recording `taint` with `source: "fetching_command"` or `"unclassified_command"`; the proxy's `egress_connection` taint, recorded at the first admitted connection other than the inference relay, is the shell signal there. An ordinary command such as `brain diagram --help` or `cat notes/x.md` leaves the session clean, while web tools, other MCP servers, `workspaces/` and inbox reads through file tools, and marked files still taint. Turns without the proxy keep the classifier unchanged. Known gap: on a proxied turn, a shell command that reads an untrusted local file without opening a connection does not taint.
diff --git a/docs/decisions/async-collaboration.md b/docs/decisions/async-collaboration.md
index d6b60a7a30..a7448afd83 100644
--- a/docs/decisions/async-collaboration.md
+++ b/docs/decisions/async-collaboration.md
@@ -241,7 +241,7 @@ suppressed-per-model Action; unknown usage cannot become a guessed zero.
Subscription billing moves the turn counter even when spend is zero. The activity
sum exposes unpriced runs (`sumEffectiveCost`,
`packages/ui-server/src/activity/store.ts:179-194`) and settles only after execution
-(`store.rollupRun(runId);`, `packages/ui-server/src/activity/recorder.ts:756`).
+(`store.rollupRun(runId);`, `packages/ui-server/src/activity/recorder.ts:765`).
Retrospective totals alone cannot enforce admission.
The maintainer's [2026-10-01 ruling on #678](https://github.com/schlessera/brain-kit/issues/678#issuecomment-5926691626)
diff --git a/docs/decisions/governed-writable-workers.md b/docs/decisions/governed-writable-workers.md
index 1e338b8702..95059f4307 100644
--- a/docs/decisions/governed-writable-workers.md
+++ b/docs/decisions/governed-writable-workers.md
@@ -1522,7 +1522,7 @@ unmet rather than relaxed.
**Why.** Every governed turn queues an automatic index refresh after it
(`host.governedTurns?.refresh(host.workerLock)`,
-`packages/ui-server/src/ws/run-session.ts:934`). The refresh usually finishes
+`packages/ui-server/src/ws/run-session.ts:938`). The refresh usually finishes
while the next turn runs, so that turn's finish observation found a rewritten
`brain.db` and copied a whole new version of it into retained objects, inside
the observation's worker hold. #2831 measured 36 versions of a ~120 MB index in
@@ -2096,7 +2096,7 @@ limits from the same policy inputs and states independent hard limits.
**What exists.** The audit trail is the Activity span record: tool name, the
full input up to its cap, output and approval decisions
-(`"tool_input"`, `packages/ui-server/src/activity/recorder.ts:344`).
+(`"tool_input"`, `packages/ui-server/src/activity/recorder.ts:353`).
**What changes:**
@@ -3775,7 +3775,9 @@ Before the egress proxy lands, Bash commands classified as fetching (`curl`,
`wget`, `git clone` and `fetch`, the `brain` scrape and import commands, and
Chromium) taint the session. Any Bash call that the classifier cannot rule out
as network-free also taints it. Erring towards taint costs only tighter
-outward rules.
+outward rules. Where the proxy runs, the classifier is off and the proxy's
+connection taint is the shell signal (superseded 2026-11-03, see
+[below](#shell-classifier-off-behind-the-proxy)).
Taint is sticky for the session, because that content stays in the context
window. A tainted session runs under tighter rules:
@@ -3794,9 +3796,10 @@ pi-web-access's `fetch_content` and `web_search`; a file tool or brain-kit
document reader whose normalized path is under `.brain-ui/inbox/` or
`workspaces/`, or a search whose output names a file there (an absolute path
outside the brain and the strict area root counts any such segment); a
-fetching or unclassified Bash call; and any MCP tool whose server is not
+fetching or unclassified Bash call (only on a turn without the egress proxy
+since 2026-11-03, see below); and any MCP tool whose server is not
brain-kit's own `brain` or `brain-ui`
-(`inputTaintSource`, `packages/ui-server/src/activity/ingestion-taint.ts:82-92`).
+(`inputTaintSource`, `packages/ui-server/src/activity/ingestion-taint.ts:88-99`).
The fixed list of external-content MCP sources is therefore "every other MCP
server", following the rule above that erring towards taint costs only tighter
rules (maintainer ruling, 2026-10-22). The first source is the session's one
@@ -3832,6 +3835,35 @@ widens: deny and `allowlist` mode still apply first (`prepareTurnEgress`,
native storage have no proxy, so the Bash classifier remains their shell rule
and nothing narrows their egress.
+
+
+**Shell classifier off behind the proxy — 2026-11-03
+([#3429](https://github.com/schlessera/brain-kit/issues/3429)).** This
+supersedes the unconditional Bash classifier in the implemented note above.
+The classifier tainted on every shell call it could not prove network-free,
+so almost every governed session was tainted by its first ordinary command
+(`brain diagram --help`, `cat notes/x.md`) without reading anything
+untrusted. On a turn whose worker runs behind the turn egress proxy, the
+proxy already taints at the first admitted connection other than the
+inference relay, before its first byte, whatever program made it. That turn
+now records neither `fetching_command` nor `unclassified_command`: once the
+proxy is up, the host tells the turn's recorder
+(`recorder?.setEgressProxied();`, `packages/ui-server/src/ws/run-session.ts:747`),
+and its shell calls skip the classifier
+(`const command = shellProxied ? null : commandTaintSource(tool, input);`,
+`packages/ui-server/src/activity/ingestion-taint.ts:90`). A `curl` on such a
+turn taints through the proxy's `egress_connection` record. Every non-shell
+source (web tools, other MCP servers, untrusted areas, marked files) still
+taints there. A turn without the proxy keeps the classifier unchanged
+(maintainer ruling A on #3429; B, keeping the fetching classification, and
+C, the current behaviour, were rejected).
+
+Known gap, accepted by that ruling: on a proxied turn, a shell command that
+reads an untrusted local file without opening a connection (`cat
+workspaces/x/README`, or a marked file) does not taint. Path detection is not
+extended to shell arguments, because parsing them is the shell classifier
+this ruling removes. File tools reading the same path still taint.
+
**Files the user marks untrusted — 2026-11-02
([#2673](https://github.com/schlessera/brain-kit/issues/2673)).** A user can
mark a brain file untrusted from Files, and the recorder above then treats an
@@ -3844,8 +3876,9 @@ first source (`fileSource`,
still names its own source first, and an absolute path outside the brain's
host path is not matched against marks. A mark is looked up when the call
completes; a lookup that fails counts as marked
-(`const marked: MarkedLookup`, `packages/ui-server/src/activity/recorder.ts:236-242`).
-Shell reads are covered only by the Bash rules above, reads are never
+(`const marked: MarkedLookup`, `packages/ui-server/src/activity/recorder.ts:244-250`).
+Shell reads are covered only by the Bash rules above, which do not apply on a
+turn behind the egress proxy (the known gap above); reads are never
blocked, and a session that read the file before it was marked is not
tainted retroactively.
diff --git a/docs/decisions/session-principals.md b/docs/decisions/session-principals.md
index bf3df5549f..224b819bbd 100644
--- a/docs/decisions/session-principals.md
+++ b/docs/decisions/session-principals.md
@@ -102,7 +102,7 @@ Both reviewers verified every row below against the source.
| WS upgrade | `ws/connection.ts:262-264` | `createWsUpgrade` ignores the request context |
| WS admission | `ws/connection.ts:84` | `clients.add(ws)` — the socket's identity is unknown |
| Turn record | `ws/run-session.ts:136-144` | recorder built from `{turnId, sessionId, billing}`; `RunningTurn` (`ws/turns.ts:55-77`) has no actor |
-| Follow-up queue | `QueuedFollowUp`, `ws/turns.ts:61-103`; `slot.queue.push(entry)`, `run-session.ts:1125` | queued entries re-mint `turnId` in the same slot and may come from another socket |
+| Follow-up queue | `QueuedFollowUp`, `ws/turns.ts:61-103`; `slot.queue.push(entry)`, `run-session.ts:1129` | queued entries re-mint `turnId` in the same slot and may come from another socket |
| Password login | `acquirePasswordVerification(key)`, `auth.ts:739` | argon2id verify, failure counting, in-flight reservation, then `issueSessionCookie` |
| Passkey login | `issueLoginSession`, `packages/ui-server/src/middleware/passkeys.ts:441` | assertion verified, then `issueSessionCookie`; `row.id` is in scope |
| Passkey **registration** | `INSERT INTO passkey_credentials`, `packages/ui-server/src/db/account-writes.ts:31-36` | inserts a credential; calls **neither** helper |
@@ -204,7 +204,7 @@ credentials, not people.
(`upsertRollup`, `activity/sql.ts:19-24`) — the rollup is what survives span
pruning, so cost-by-actor dies at prune time without it. The precedent is
profile/billing: a root-span attr that the rollup reads (`spanId: rootSpanId`,
-`activity/recorder.ts:253-268`). Nullable for cron (`origin: "cron"`,
+`activity/recorder.ts:261-276`). Nullable for cron (`origin: "cron"`,
`activity/span-sink.ts:102`, `cron/run-job.ts:113`) and for pre-migration rows;
nothing is backfilled.
diff --git a/docs/decisions/voice-permission.md b/docs/decisions/voice-permission.md
index 98f58d7964..e1b8015258 100644
--- a/docs/decisions/voice-permission.md
+++ b/docs/decisions/voice-permission.md
@@ -490,7 +490,7 @@ An approval given by voice must be as reviewable afterwards as one given by
tapping a card. Most of that already exists: every decision is written as an
append-only `approval_decision` event carrying the principal, the decision and
the request kind, and it patches the span
-(`onApprovalDecision`, `packages/ui-server/src/activity/recorder.ts:684-699`),
+(`onApprovalDecision`, `packages/ui-server/src/activity/recorder.ts:693-708`),
fed from the bridge's
`recorded()` wrapper
(`const recorded`, `packages/ui-server/src/ws/bridge.ts:414-429`).
diff --git a/docs/hosting/agent-workers.md b/docs/hosting/agent-workers.md
index a45ff9d74f..8a84e768f0 100644
--- a/docs/hosting/agent-workers.md
+++ b/docs/hosting/agent-workers.md
@@ -1620,7 +1620,11 @@ inference relay taints the session too, and a tainted session's new
connections reach only `taint.egress.allow` and hosts its proxies already
admitted. Refusals are `egress_denial` events with reason `taint_allowlist`.
Without the proxy (hosts without managed native storage) nothing narrows
-egress, and the capabilities note says so. Files the
+egress, and the capabilities note says so. On a turn behind the proxy, the Bash
+classifier above is off: the proxy's connection taint is the shell signal, so
+ordinary commands such as `brain diagram --help` leave the session clean, and
+a shell read of an untrusted file that opens no connection does not taint it
+(#3429). Files the
user marks untrusted are not a source yet. The rules are in
[the decision record](../decisions/governed-writable-workers.md#untrusted-input-g6).
diff --git a/docs/http-api.md b/docs/http-api.md
index ecc9eb61b8..432e9dc0e3 100644
--- a/docs/http-api.md
+++ b/docs/http-api.md
@@ -1323,7 +1323,7 @@ read by any authenticated principal.
| `strict_fallback` | 1 | `path`, `reason` | A turn ran under `strict` instead of `governed` because a protected path is a `symlink`, a `hardlink` or a `mount_point`. |
| `revert_conflict` | 1 | `conflicts`, `restored` | A revert skipped paths that changed after the reverted turn. Each conflict is `{ path, state }`, with `state` one of `changed`, `deleted`, `created` or `type_changed`; `restored` counts the paths it did restore. |
| `outward_action` | 1 | `tool`, `input`, `inputTruncated`, `action`, `target`, `historyRewrite`, `tainted`, `decision`, `rule` | An action outside the brain in the user's name, allowed or not. `action` is `git_push`, `gh_write`, `mcp_tool`, `http_write` or `outward_host_connect`; `decision` is `policy_allowed`, `approved`, `declined` or `refused`; `rule` is the matching `outward.allow` rule or `null`. |
-| `taint` | 1 | `source`, `tool`, `detail` | The untrusted input that tainted the session. `source` is `web_fetch`, `web_search`, `staged_share`, `workspace_read`, `mcp_document`, `user_marked`, `egress_connection`, `fetching_command` or `unclassified_command`. |
+| `taint` | 1 | `source`, `tool`, `detail` | The untrusted input that tainted the session. `source` is `web_fetch`, `web_search`, `staged_share`, `workspace_read`, `mcp_document`, `user_marked`, `egress_connection`, `fetching_command` or `unclassified_command`. The last two come only from a turn without the turn egress proxy (#3429). |
| `provider_unavailable` | 1 | `provider`, `capability`, `command`, `degradedTo` | A worker command needed a provider whose key the host withheld from the worker. Recorded from the token the CLI prints ([CLI contract](integration-contract/cli.md#withheld-provider-keys-additive-0440-1666)), one event per distinct token in a tool result and at most 20 per turn. `capability` is `embeddings`, `completions`, `reranking` or `image`; `command` is the shell command, or the tool's name for any other tool; `degradedTo` names the fallback used (`keyword_search`, `keyword_index`, `lifecycle_order`) or is `null`. The token is text in tool output, so the event is a diagnostic, not proof. |
| `resource_limit` | 1 | `limits`, `fatal` | A worker hit a resource limit. Each limit is `{ limit, source, value, events }`: `limit` is `processes`, `memory`, `pids`, `file_size`, `data`, `cpu` or `open_files`; `source` is `rlimit` or `cgroup`; `value` is the configured limit; `events` counts the hits the source reported, or is `null`. `fatal` says whether the worker died of it. |
| `roadblock` | 1 | `category`, `family`, `signature`, `failures`, `resolution`, `remedy`, `waste`, `eventIds` | One classified roadblock episode, written when its turn ends ([classification](decisions/governed-writable-workers.md#roadblocks)). An episode opens at a failed step and closes at the next successful call of the same `family`, or at turn end. `family` is the tool family: `shell:` (with the subcommand for multi-command programs, such as `shell:git push`), `file_write`, `file_read`, `search`, `web`, `brain_write`, `subagent`, `mcp::` or `tool:`; a governance event with no call has `budget`, `scope`, `network`, `policy` or `outward`. `category` is `tool_error`, `shell_nonzero`, `fs_denied`, `permission_denied`, `policy_block`, `budget`, `scope_cap`, `network_refused` or `retry`. It is `retry` when the episode repeated a near-identical failed input, and otherwise the first failure's category. `signature` is the grouping key `\|\| ` of the first failure, for example `file_write\|.brain/*\|fs_denied EROFS .brain/*`. The target is the command's program and, for multi-command programs, its subcommand (`