{"version":"2.1.327","anchor":"add-dir-paths-resolved-relative-to-the-worktree-when-wor","canonical_anchor":"add-dir-paths-resolved-relative-to-the-worktree-when-wor","heading":"--add-dir paths are adjusted when combined with --worktree","tier":"notice","area":"Worktrees","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.327\/e\/add-dir-paths-resolved-relative-to-the-worktree-when-wor","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.327","markdown":"### `--add-dir` paths are adjusted when combined with `--worktree`\n\nClaude Code now rewrites `--add-dir` paths when `--worktree` is used, and the workspace trust check reads them the same way\n\n**Unclear.** It is not clear which launches use the rewritten paths, so it is unclear when a relative `--add-dir` path now points somewhere different.\n\n**What**\n\n`--add-dir` gives Claude access to extra folders. `--worktree` (or `-w`) starts Claude in a separate git worktree, which is a second working copy of your repository in its own folder. Claude Code now picks the `--add-dir` values out of the command line and rewrites them, taking into account whether `--worktree` was also given.\n\nThe workspace trust check reads `--add-dir` values in this same way. That check asks whether you trust a folder before Claude works in it. It used to read the values separately, without rewriting them.\n\n**Why**\n\nThis affects how relative `--add-dir` paths behave in worktree and background launches. A relative path is one written from the current folder, such as `..\/shared`.\n\n- Area: Worktrees\n- Names: `--add-dir`, `--worktree`\n- Tier: You'll notice\n- Useful: 2\/5\n- Signal: 1\/5\n- Scope: individual\n- Heads-up: no"}