codex-open-worktree
Codex Open Worktree
Open a registered Git worktree in the macOS desktop app without changing Git state. Treat "switch" as "open the selected worktree in another Codex workspace" because the current task cannot be rebound to a different workspace.
Workflow
-
Resolve the repository from the current directory unless the user supplied a repository or worktree path. If neither path is inside a Git repository, ask for one; do not search the filesystem broadly.
-
If the user supplied a branch, worktree name, or path, run:
python3 ./scripts/open_worktree.py --repo <repo> <selector>Resolve
./scripts/open_worktree.pyrelative to thisSKILL.md.Open immediately when the selector has one exact or unique match. An explicit invocation with a unique selector authorizes this external app action; do not ask for redundant confirmation.
-
If the user supplied no selector, run: