Skip to content

Untrusted Workspace Settings Boundary

Under --trust-workspace false and 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).
  • enabledPlugins and extraKnownMarketplaces. 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. Skipping enabledPlugins requires Claude Code v2.1.323 or later." (self-hosted configuration)
  • .mcp.json servers. With the flag, "sessions skip the file's servers unless settings the repository doesn't commit approve them, such as enabledMcpjsonServers in the host's ~/.claude/settings.json. Requires Claude Code v2.1.319 or later." (self-hosted configuration)
  • Repository permissions.allow and additionalDirectories. The flag seeds trust "so repo-committed permissions.allow and additionalDirectories are honored", and "Set false to drop repo-committed permission grants and configure allow rules in the host config's settings.json instead" (runner CLI flags). That entry does not say whether deny and ask rules 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.allow or .mcp.json loses those grants under --trust-workspace false until 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 disableAllHooks and enabledPlugins.
  • 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 -p run, 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.json approvals into enabledMcpjsonServers there.
  • Set --confine-repo-settings enforce if 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 enabledPlugins skip needs 2.1.323 or later, and the .mcp.json skip needs 2.1.319 or later.