What happens
plugins/source-control/skills/worktree/context/create.md step 1 instructs the model to run root_dir="$(mktemp -d)"; printf '%s\n' "$root_dir" and use the printed value as the Write tool file_path for the worktree-root / data-root files, and to substitute it into the later Bash block.
On Windows, Git Bash's GNU mktemp reads only TMPDIR (unset here), so it prints the POSIX literal /tmp/tmp.XXXXXXXXXX (MSYS mounts /tmp on %TEMP%). The printed string round-trips through the model and reaches the Write tool — native node.exe — where Win32 resolves the leading / against the current drive. The file lands in a phantom <drive>:\tmp\tmp.XXXXXXXXXX at the drive root while the real mktemp directory sits in %TEMP%.
Observed
Confirmed live on 2026-08-30: an empty tmp.rSFIkHm5DO directory created at the C drive root's tmp at 14:15:56 by exactly this path, while the real content went to %TEMP%. Same silent drive-root emit class as #2834; docs/conventions/windows-path-emit/README.md owns the rule (Rules 2–4) that prevents it.
Expected
The emitted path is converted at the boundary — cygpath -m -l, mixed form, fail-loud — on Windows, and passes through unchanged on POSIX hosts, preserving the snippet's load-bearing properties (mktemp -d directory-exists/file-absent; the deliberate Write-tool round-trip for the raw ${user_config.worktree_root} substitution).
What happens
plugins/source-control/skills/worktree/context/create.mdstep 1 instructs the model to runroot_dir="$(mktemp -d)"; printf '%s\n' "$root_dir"and use the printed value as theWritetoolfile_pathfor theworktree-root/data-rootfiles, and to substitute it into the later Bash block.On Windows, Git Bash's GNU
mktempreads only TMPDIR (unset here), so it prints the POSIX literal/tmp/tmp.XXXXXXXXXX(MSYS mounts/tmpon%TEMP%). The printed string round-trips through the model and reaches theWritetool — native node.exe — where Win32 resolves the leading/against the current drive. The file lands in a phantom<drive>:\tmp\tmp.XXXXXXXXXXat the drive root while the real mktemp directory sits in%TEMP%.Observed
Confirmed live on 2026-08-30: an empty
tmp.rSFIkHm5DOdirectory created at the C drive root'stmpat 14:15:56 by exactly this path, while the real content went to%TEMP%. Same silent drive-root emit class as #2834;docs/conventions/windows-path-emit/README.mdowns the rule (Rules 2–4) that prevents it.Expected
The emitted path is converted at the boundary —
cygpath -m -l, mixed form, fail-loud — on Windows, and passes through unchanged on POSIX hosts, preserving the snippet's load-bearing properties (mktemp -ddirectory-exists/file-absent; the deliberateWrite-tool round-trip for the raw${user_config.worktree_root}substitution).