Untrusted Workspace Settings Boundary¶
Under
--trust-workspace falseand in an untrusted VS Code folder, a repository's settings cannot disable your hooks or toggle plugins.
Claude Code 2.1.323 (November 12, 2026) changed this for two conditions: "self-hosted runners under --trust-workspace false and VS Code sessions in an untrusted folder: the repository's settings can no longer disable your hooks or turn plugins on or off" (changelog 2.1.323). Release 2.1.326 (November 16, 2026) widened the runner rule to "ignore more repository settings; set such values in user or managed settings" (changelog 2.1.326). Neither entry lists the settings. This page covers the members the docs name, and it is not the full list.
What the docs name as ignored¶
- Hooks and skills.
--trust-workspace false"now also stops hooks in the repository's settings files and skills from running" (changelog 2.1.319, November 6, 2026). enabledPluginsandextraKnownMarketplaces. Outside a project thread, these keys can come from a repository's.claude/settings.json. "If you start the runner with--trust-workspace false, Claude Code skips both keys. SkippingenabledPluginsrequires Claude Code v2.1.323 or later." (self-hosted configuration).mcp.jsonservers. With the flag, "sessions skip the file's servers unless settings the repository doesn't commit approve them, such asenabledMcpjsonServersin the host's~/.claude/settings.json. Requires Claude Code v2.1.319 or later." (self-hosted configuration)- Repository
permissions.allowandadditionalDirectories. The flag seeds trust "so repo-committedpermissions.allowandadditionalDirectoriesare honored", and "Setfalseto drop repo-committed permission grants and configure allow rules in the host config'ssettings.jsoninstead" (runner CLI flags). That entry does not say whetherdenyandaskrules survive.
What still applies¶
The flag is not a sandbox. Its own entry says "repository-committed sandbox.* settings still apply either way" (runner CLI flags). A separate repo-settings guard, set by --confine-repo-settings, flags a session when committed settings override the operator's sandbox or hooks posture, such as sandbox.enabled: false or disableAllHooks (runner CLI flags). Its default only logs: "The default warn logs the violation and still starts the session, enforce refuses the session, and off disables the scan." (runner CLI flags) The guard "runs regardless of --trust-workspace, and doesn't cover repository hooks, .mcp.json, or Bash rules" (harden your deployment).
Why it works¶
Project settings outrank user settings. The hooks reference says "a "disableAllHooks": false in a project's .claude/settings.json overrides a true in your user settings" (hooks reference). The settings reference says "Project settings take precedence over user settings, so setting a plugin to false in ~/.claude/settings.json doesn't disable a plugin that the project's .claude/settings.json enables" (settings reference). A repository's committed settings file can therefore overrule your hook switch and your plugin choices.
The changelog states the outcome of 2.1.323 and the docs do not state the mechanism. Between the two sits an inference: the repository layer drops out of that precedence in an untrusted workspace, so neither override reaches you.
When this backfires¶
- The list is open-ended. The 2.1.326 entry says "more repository settings" and no source this page uses enumerates them. The ignored set changed in three releases within ten days (2.1.319, 2.1.323, 2.1.326), so any list, this one included, ages.
- A workflow that relies on repository
permissions.allowor.mcp.jsonloses those grants under--trust-workspace falseuntil you move the grants or approvals into the host's settings. - The changelog names two conditions. For a session outside them, the precedence rules quoted above are the documented behavior, so a repository file can override
disableAllHooksandenabledPlugins. - For VS Code, the 2.1.323 sentence is the only statement of the rule that this page's sources give. No source describes how an untrusted-folder session reaches it.
- The marketplace key has a separate trust rule: in a folder you have not trusted, including a
-prun, Claude Code "ignores them without a message" (settings reference).
Key Takeaways¶
- Move any grant a runner needs from the repository to the host: allow rules into the host
settings.json,.mcp.jsonapprovals intoenabledMcpjsonServersthere. - Set
--confine-repo-settings enforceif a repository must not override sandbox or hooks posture. The default only logs. - Treat the ignored set as at least the four groups above. The changelog says "more" and gives no list.
- Check the runner version: the
enabledPluginsskip needs 2.1.323 or later, and the.mcp.jsonskip needs 2.1.319 or later.
Related¶
- Claude Code Trust Dialog: Review Hooks Before You Accept — the interactive gate and the
disableAllHooksoverride - Scope Demotion for Repository-Committed Settings — the per-key version of the same boundary
- Pre-Trust Execution Surface in Coding Agent Harnesses — what runs before a trust prompt appears
- Enforced Versus Advisory Controls in LLM-Native IDEs — the split between controls the runtime evaluates and controls stated in the model's context
- Managed Settings Drop-In Directory — where managed values go