# Warp Worktree Fix

> Use this skill to repair a Warp terminal worktree launch config when the generated config itself is broken, misparsed, or incompatible with the target shell or OS. Choose it for Warp-authored worktree setup files that need path normalization, launch-entry cleanup, or safe preservation of placeholders and unrelated settings. Do not use it for ordinary git worktree commands, branch management, or general repo setup unless the Warp config is the thing that is failing.

- Skill: `elijj/warp-worktree-fix` (Agent Skill, multi-file: 5 files)
- Install (CLI): `npx skillmds@latest add elijj/warp-worktree-fix`
- Raw SKILL.md: https://api.skillmd.com/api/skills/elijj/warp-worktree-fix/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: elijj (https://skillmd.com/u/elijj)
- Updated: 2026-09-22
- Page: https://skillmd.com/skills/elijj/warp-worktree-fix

---


# Fix Warp Worktree Configs for WSL

Use this skill to repair Warp terminal worktree launch configs that mix Windows and WSL path styles.

## Problem

Warp can emit Windows-style paths such as `A:\Users\...` in worktree configs even when the shell runs in WSL. Those paths need to become Unix-style `/mnt/a/...` paths before the config will work in WSL.

## Read the config

Prefer a TOML parser when the file is valid. If parsing fails, fall back to reading the file as raw text and process it line by line.

This matters because Warp-generated configs can contain single-quoted strings with backslashes that confuse TOML parsing. When that happens, do not force the parser. Work on the raw text instead.

## Detect the pattern

Look for:

- drive-letter paths like `A:\`, `B:\`, `C:\`
- backslash separators in values that should be file paths
- broken `directory` or `commands` fields in Warp worktree panes

Only touch strings that are clearly paths.

## Convert paths

Apply these conversions:

- `A:\` -> `/mnt/a/`
- `B:\` -> `/mnt/b/`
- `C:\` -> `/mnt/c/`
- any other drive letter -> `/mnt/<lowercase-drive>/`
- `\` path separators -> `/`

Preserve non-path text, quoting style, and placeholders such as `{{autogenerated_branch_name}}`.

## Fix the commands array

Warp worktree configs often split setup across `cd` and `git worktree add` commands. Rebuild the command strings with WSL paths so the worktree path, directory, and any follow-up `cd` point at the same Unix path.

Keep the command shape simple and readable. Do not rewrite unrelated shell logic.

## Do not change

Leave these values alone unless they are literal paths:

- `name`
- `id`
- `type`
- `{{autogenerated_branch_name}}`

Do not rewrite relative paths or non-path strings.

## Validate

Check that:

- no `X:\` patterns remain
- all path separators in absolute paths are forward slashes
- placeholders are unchanged
- the TOML structure still makes sense

If the destination worktree location is ambiguous, ask before guessing.

## Summary

Finish with a short summary of:

- what paths changed
- whether the config parsed cleanly or required raw-text handling
- any remaining ambiguity

