From 91d01df4936fb0b92c141f574a54b554f4ef7d83 Mon Sep 17 00:00:00 2001 From: Jinwoo Hong <73622457+Jinwoo-H@users.noreply.github.com> Date: Mon, 4 May 2026 20:55:52 -0700 Subject: [PATCH] fix(dev): skip single-instance lock for pnpm dev (#1419) Co-authored-by: Orca --- src/main/index.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/main/index.ts b/src/main/index.ts index ca89b89659b..e6d8e979bf0 100644 --- a/src/main/index.ts +++ b/src/main/index.ts @@ -120,7 +120,16 @@ function focusExistingWindow(): void { // derives the lock identity from the `userData` path, so this placement lets // dev (`orca-dev`) and packaged (`orca`) runs lock in separate namespaces // instead of serialising against each other. -const hasSingleInstanceLock = acquireSingleInstanceLock(app, focusExistingWindow) +// +// Why skip in dev: engineers routinely run `pnpm dev` in parallel from +// multiple worktrees while shipping features, and the lock makes the second +// `pnpm dev` exit silently. In dev we accept that `orca-runtime.json` and +// `endpoint.env` may race (the bundled `orca-dev` CLI / agent hooks route +// to whichever instance wrote last). The dev build is not used for real +// agent work, so that routing ambiguity is acceptable. Packaged Orca keeps +// the lock to protect against the corruption documented in PR #1326 / +// issue #1312. +const hasSingleInstanceLock = is.dev ? true : acquireSingleInstanceLock(app, focusExistingWindow) if (!hasSingleInstanceLock) { if (is.dev) { // Why: packaged runs have no attached console, but dev runs do. Emit a