fs-safe adds copy-on-write cloning for Git worktrees
fs-safe, an open-source filesystem security and primitives library from the OpenClaw project, has added native copy-on-write directory cloning to speed up Git worktree and template provisioning by roughly 80%. Implemented in Rust and exposed via @openclaw/fs-safe/copy, the feature harnesses platform-specific copy-on-write primitives across APFS, Btrfs, XFS, and ReFS to materialize caller-owned directory trees almost instantly with minimal disk overhead.
Heavy Git worktree creation has long been an I/O and storage bottleneck for parallel developer workflows and agent sandboxes, making native copy-on-write cloning an essential modernization for local execution environments. Replacing recursive byte copying with native filesystem operations achieves roughly 80% faster worktree generation while unifying APFS folder clones, Btrfs subvolumes, and parallel reflinks on XFS and ReFS into a single cross-platform API. While optimal performance requires filesystems with block cloning support and APFS bulk cloning requires careful handling of descendant ACL inheritance, this capability provides crucial infrastructure for coding agents to rapidly spin up and tear down isolated workspaces without storage bloat.
DISCOVERED
1h ago
2026-09-13
PUBLISHED
2h ago
2026-09-13
RELEVANCE
AUTHOR
steipete