{"version":"2.1.239","anchor":"directory-sync-places-files-without-following-symlinks-and-t","canonical_anchor":"directory-sync-places-files-without-following-symlinks-and-t","heading":"Directory sync places files without following symlinks, and tells you when it can't","tier":"notice","area":"Directory Sync","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.239\/e\/directory-sync-places-files-without-following-symlinks-and-t","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.239","markdown":"### Directory sync places files without following symlinks, and tells you when it can't\n\nCloud file sync writes through directory handles so a swapped symlink can't redirect it, and says when that's unavailable.\n\n**What**\n\nDirectory sync between your machine and a cloud session now opens each destination through directory handles instead of resolving paths by name, so a symlink swapped in mid-sync cannot redirect a write outside the synced tree. Where the platform cannot support it, sync falls back to by-name placement limited to root-level files and says so: \"File sync on this machine is limited (...)\", with reasons such as \"a system library could not be loaded\" or \"this kernel does not enforce the no-symlink open flag\". Setting `CLAUDE_CODE_DIR_SYNC_DISABLE_ANCHORING` turns it off.\n\n**Details**\n\n- On Linux and WSL destinations are reopened through `\/proc\/self\/fd`; on macOS the `openat`, `mkdirat`, `renameat` and `linkat` calls are loaded from libSystem through `bun:ffi`, with a startup probe that checks the kernel actually enforces the `O_NOFOLLOW_ANY` open flag.\n- Every fallback reason has its own user-facing sentence, so a limited sync explains which step failed rather than degrading silently.\n- Git commands run inside synced directories are now pinned to an explicit layout (`GIT_DIR`, `GIT_COMMON_DIR`, `GIT_WORK_TREE`), with filter drivers and hooks neutralised through pinned config keys, and refuse to run at all if a config file inside the work tree would contribute settings. The result is reported as `tengu_dir_sync_git_layout`.\n\n**Evidence**\n\n`this kernel does not enforce the no-symlink open flag`\n\n- Area: Directory Sync\n- Names: `CLAUDE_CODE_DIR_SYNC_DISABLE_ANCHORING`\n- Tier: You'll notice\n- Useful: 3\/5\n- Signal: 3\/5"}