From ac00560d7d9778b7e7a1f29701b66a83e39248af Mon Sep 17 00:00:00 2001 From: James Russo Date: Mon, 24 Aug 2026 11:23:58 -0700 Subject: [PATCH] fix(skills): keep the seam gate's preview attached so --project works again (#3463) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit seam-gate verify --project has failed with "preview server exited early" since #3310, which made `hyperframes preview` pick its launch mode from the TTY. The gate spawns with stdio [ignore,pipe,pipe], so interactive is false and it silently took the background path: the launcher exits 0 before the server is serving (read as a dead server), and the detached server escapes the gate's process-group cleanup (leaking a preview per run). Pass the CLI's own --foreground opt-out in the default --server-cmd. Both skill mirrors updated. — Rames --- .agents/skills/motion-doctrine/scripts/seam-gate.mjs | 7 ++++++- .claude/skills/motion-doctrine/scripts/seam-gate.mjs | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/.agents/skills/motion-doctrine/scripts/seam-gate.mjs b/.agents/skills/motion-doctrine/scripts/seam-gate.mjs index 556511368..569c91bbb 100644 --- a/.agents/skills/motion-doctrine/scripts/seam-gate.mjs +++ b/.agents/skills/motion-doctrine/scripts/seam-gate.mjs @@ -71,7 +71,12 @@ async function ensureServer() { const port = 5380 + Math.floor(Math.random() * 20); const env = { ...process.env }; delete env.HYPERFRAME_RUNTIME_URL; // wrong value fails silently as 200 HTML - const cmd = flag("server-cmd", `npx --yes hyperframes preview --no-open --port ${port}`); + // `preview` backgrounds itself when stdin/stdout aren't TTYs, which they never are here: the + // launcher would exit 0 before the server is up and detach it out of our process group. + const cmd = flag( + "server-cmd", + `npx --yes hyperframes preview --foreground --no-open --port ${port}`, + ); const child = spawn("sh", ["-c", cmd.replace(/\{port\}/g, String(port))], { cwd: project, env, diff --git a/.claude/skills/motion-doctrine/scripts/seam-gate.mjs b/.claude/skills/motion-doctrine/scripts/seam-gate.mjs index 556511368..569c91bbb 100644 --- a/.claude/skills/motion-doctrine/scripts/seam-gate.mjs +++ b/.claude/skills/motion-doctrine/scripts/seam-gate.mjs @@ -71,7 +71,12 @@ async function ensureServer() { const port = 5380 + Math.floor(Math.random() * 20); const env = { ...process.env }; delete env.HYPERFRAME_RUNTIME_URL; // wrong value fails silently as 200 HTML - const cmd = flag("server-cmd", `npx --yes hyperframes preview --no-open --port ${port}`); + // `preview` backgrounds itself when stdin/stdout aren't TTYs, which they never are here: the + // launcher would exit 0 before the server is up and detach it out of our process group. + const cmd = flag( + "server-cmd", + `npx --yes hyperframes preview --foreground --no-open --port ${port}`, + ); const child = spawn("sh", ["-c", cmd.replace(/\{port\}/g, String(port))], { cwd: project, env,