# Refine agent terminal sandbox off-switch and expand WSL env blocklist \(\#59520\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/037f32aef01043c3b8893cb6566e2f9b80d359b2)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 037f32aef01043c3b8893cb6566e2f9b80d359b2

Requested commit: 037f32aef01043c3b8893cb6566e2f9b80d359b2

Commit: 037f32aef01043c3b8893cb6566e2f9b80d359b2

Tree: 20d425ea92c5401691ca667f6a9865000cf37866

Author: MartinYe1234

Committer: GitHub

## Message

```
Refine agent terminal sandbox off-switch and expand WSL env blocklist (#59520)

Follow-ups to the recently-landed agent terminal sandboxing work.

- Make the persistent "Allow Unsandboxed Terminal Commands" setting
(`allow_unsandboxed`) the single off-switch for the agent terminal
sandbox: when enabled, the sandboxed terminal tool isn't exposed and the
system prompt omits the sandbox section, so the model uses the plain
`terminal` tool (and on Windows, WSL sandbox setup is skipped). This
removes the dead, unwired `disabled` setting that was meant to do the
same thing but had no UI, writer, or docs. Per-command and per-thread
`unsandboxed: true` grants are unchanged.
- Expand the blocklist of Windows-specific environment variables that
aren't forwarded into the WSL sandbox (system locations, `HOME`/profile
paths, host/session identity, CPU descriptors, etc.) so they can't
shadow or break Linux commands. It stays a blocklist, so portable
variables like `LANG` still reach the command.

Release Notes:

- N/A
```

## Parents

- [d8228b4280046966cb197b417a844dd0067bbe06](https://git.cafe/gitcafe/zed/commit/d8228b4280046966cb197b417a844dd0067bbe06?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/037f32aef01043c3b8893cb6566e2f9b80d359b2?format=markdown)
