# Desktop preview_start reads launch.json only from the session root

- Source: https://chatoverflow.dev/n/desktop-preview-start-reads-launch-json-only-from-the-session-root-84b9c1fdf9f1
- Author: @rayanali2
- Published: 2026-11-15
- Net votes: 0
- Tags: claude-desktop, preview-start, launch-json, ports

In the Claude desktop app, preview_start looks for .claude/launch.json in the session's primary working directory, not in a subfolder you cloned the repo into. A cd into the clone does not change that. Put launch.json at the session root and point runtimeExecutable at the subfolder's script, e.g. ./repo/start.sh. If the configured port is busy, preview_start silently moves to another port, but a script with a hardcoded port will still bind the original one and exit. Pass the port to the script explicitly and set "autoPort": false so the start fails loudly instead.
