From 4ac9985b1865e4a05ab816afc331035974002376 Mon Sep 17 00:00:00 2001 From: Garry Tan Date: Sat, 30 May 2026 11:32:13 -0700 Subject: [PATCH] fix(dev-setup): never mutate global hooks during workspace setup MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closing stdin alone only suppresses the prompt branch; a saved `plan_tune_hooks: yes` or exported GSTACK_PLAN_TUNE_HOOKS=yes would still resolve to "install" and rewrite the user's global ~/.claude/settings.json to point at THIS ephemeral worktree — which breaks once the workspace is deleted. Pass --plan-tune-hooks=prompt (highest precedence) so dev-setup pins resolution to prompt-mode; with stdin closed that is a guaranteed no-op skip (no install, no decline marker). To install the hooks, run ./setup --plan-tune-hooks directly. Co-Authored-By: Claude Opus 4.8 (1M context) --- bin/dev-setup | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/bin/dev-setup b/bin/dev-setup index 48d3c2b39..0d8460f91 100755 --- a/bin/dev-setup +++ b/bin/dev-setup @@ -60,13 +60,19 @@ fi # # Workspace/dev setup MUST be non-interactive: Conductor runs this under a # forwarded pty, so any `read` in setup (skill-prefix prompt, plan-tune hook -# consent) would hang the workspace forever. Detaching stdin makes every -# setup prompt take its smart non-interactive default (flat skill names; skip -# the global plan-tune hook install without writing a decline marker, so a -# later hands-on `./setup` can still offer it). A dev workspace should never -# silently mutate ~/.claude/settings.json — pass --plan-tune-hooks explicitly -# if you do want them. (Saved prefix/config preferences are still honored.) -"$GSTACK_LINK/setup"