Skip to main content
Run any Skill in Manus
with one click

worktree-write-abs-path-lands-in-parent-checkout

Stars2
Forks0
UpdatedJuly 8, 2026 at 11:09

In a git worktree session, a Write/Edit whose absolute path points at the MAIN-REPO ROOT (the parent checkout) silently creates the file in that parent checkout's working tree — on whatever branch it has checked out — NOT in your worktree on your feature branch. The file then doesn't appear in `git status` on your branch and `ls`/Read inside the worktree can't find it. Use when: (1) the environment's "Primary working directory" is a worktree at `<repo>/.claude/worktrees/<name>/`, (2) you're about to Write or Edit a file by ABSOLUTE path (handoff doc, generated artifact, new source file), (3) you habitually type the repo's canonical root path (`/.../<repo>/docs/...`) instead of the worktree path (`/.../<repo>/.claude/worktrees/<name>/docs/...`), (4) a later step reports "file does not exist" / a commit is missing files you "just wrote" / `git status` is unexpectedly clean. Trap: the main repo root is a real, writable checkout; writing there succeeds silently and pollutes the parent's working tree (often on a s

Installation

Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.

SKILL.md
readonly