[BUG] preview_start" fails to find .claude/launch.json inside nested git worktree (.claude/worktrees/<name>/)
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
Session is running in a git worktree at <repo>/.claude/worktrees/<name>/. A valid .claude/launch.json with correct JSON exists at exactly the path cited by the error message itself (verified via cat/ls). preview_start nevertheless consistently returns: "No .claude/launch.json found", including the (correct) expected path in the error message. Hypothesis: project root detection doesn't handle the .claude/worktrees/... nesting correctly (possibly sandbox path resolution stops at the outer .claude folder instead of the inner one). Workaround: curl + claude-in-chrome MCP for browser testing — works reliably.
What Should Happen?
Expected: preview_start locates .claude/launch.json at the nested worktree path and starts the preview normally, the same as it would from an unnested repo root — not report "not found" when the file demonstrably exists at the exact path the error cites.
Error Messages/Logs
Session is running in a git worktree at <repo>/.claude/worktrees/<name>/. A valid .claude/launch.json with correct JSON exists at exactly the path cited by the error message itself (verified via cat/ls). preview_start nevertheless consistently returns: "No .claude/launch.json found", including the (correct) expected path in the error message. Hypothesis: project root detection doesn't handle the .claude/worktrees/... nesting correctly (possibly sandbox path resolution stops at the outer .claude folder instead of the inner one). Workaround: curl + claude-in-chrome MCP for browser testing — works reliably.
Steps to Reproduce
Session is running in a git worktree at <repo>/.claude/worktrees/<name>/. A valid .claude/launch.json with correct JSON exists at exactly the path cited by the error message itself (verified via cat/ls). preview_start nevertheless consistently returns: "No .claude/launch.json found", including the (correct) expected path in the error message. Hypothesis: project root detection doesn't handle the .claude/worktrees/... nesting correctly (possibly sandbox path resolution stops at the outer .claude folder instead of the inner one). Workaround: curl + claude-in-chrome MCP for browser testing — works reliably.
Claude Model
Sonnet (default)
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
1.2086
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
_No response_