From fc0061a8e9ae9bca04bef35d2a6162aceb23b0a3 Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Wed, 4 Nov 2026 08:41:25 -0800 Subject: [PATCH 1/2] chore(claude): drop quest's worktree hooks from project settings Quest's Claude Code worktree hooks are now a user-level opt-in (moq-dev/quest#466), so the repository's settings stop forcing them on every contributor. Drops the quest that kept the nix-wrapped entries alive across pin bumps. Co-Authored-By: Claude Opus 5.5 --- .claude/settings.json | 40 --------------------------- AGENTS.md | 2 +- quest/m0/README.md | 1 - quest/m0/quest-worktree-hooks.md | 46 -------------------------------- quest/m1/codex-env-snapshot.md | 4 --- 5 files changed, 1 insertion(+), 92 deletions(-) delete mode 100644 quest/m0/quest-worktree-hooks.md diff --git a/.claude/settings.json b/.claude/settings.json index 2d105c725d5..6575a2bc3fe 100644 --- a/.claude/settings.json +++ b/.claude/settings.json @@ -10,46 +10,6 @@ } ] } - ], - "WorktreeCreate": [ - { - "hooks": [ - { - "type": "command", - "command": "nix run \"${CLAUDE_PROJECT_DIR}#quest\" -- worktree hook" - } - ] - } - ], - "WorktreeRemove": [ - { - "hooks": [ - { - "type": "command", - "command": "nix run \"${CLAUDE_PROJECT_DIR}#quest\" -- worktree hook" - } - ] - } - ], - "SubagentStart": [ - { - "hooks": [ - { - "type": "command", - "command": "nix run \"${CLAUDE_PROJECT_DIR}#quest\" -- worktree hook" - } - ] - } - ], - "SubagentStop": [ - { - "hooks": [ - { - "type": "command", - "command": "nix run \"${CLAUDE_PROJECT_DIR}#quest\" -- worktree hook" - } - ] - } ] }, "permissions": { diff --git a/AGENTS.md b/AGENTS.md index 1d7704bb98c..de10123d90c 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -45,7 +45,7 @@ just fix # Auto-fix lint/formatting, same scope Quests: before any work, run `quest context` and follow it. The `quest` binary and its skills come from the moq-dev/quest flake input; change them upstream and bump the input. -`quest init` refuses Claude Code's worktree hooks: drop them from `.claude/settings.json` for its run, then restore them. +Quest's Claude Code worktree hooks are a user-level opt-in: drop any `quest init` adds to `.claude/settings.json` until the pinned `quest` stops writing them. # Cross-Package Sync diff --git a/quest/m0/README.md b/quest/m0/README.md index bcb70f6c79d..4cedae633ad 100644 --- a/quest/m0/README.md +++ b/quest/m0/README.md @@ -36,5 +36,4 @@ edge, which embeds moq-relay; it moved there on 2026-09-28. - [Benchmark sessions can't overlap on a host](/quest/m0/bench-host-lock.md) - a host-level lock keeps a second benchmark or profile session from measuring under the first's load - [A waiter's record limit changes no behavior](/quest/m0/kio-waiter-records.md) - two moq-net tests stop failing when kio's waiters remember 16 lists, and the limit becomes a tuning knob worth 3.9% per delivered group - [Backport the relay and auth hardening to release](/quest/m0/backport-release-hardening.md) - `release`'s relay refuses dot-segment paths, serves its HTTP routes with main's response hardening, and withdraws advertisements a peer starves of send credit; its auth client refuses redirects -- [quest init keeps moq's nix-wrapped worktree hooks](/quest/m0/quest-worktree-hooks.md) - quest pin bumps keep the hooks that run moq's pinned `quest` - [HLS lists contributions](/quest/m0/hls-contributions.md) - an HLS master lists each catalog contribution's renditions, and a contribution's media is subscribed only while players fetch it diff --git a/quest/m0/quest-worktree-hooks.md b/quest/m0/quest-worktree-hooks.md deleted file mode 100644 index 50c2c67fd0b..00000000000 --- a/quest/m0/quest-worktree-hooks.md +++ /dev/null @@ -1,46 +0,0 @@ -# [XS] quest init keeps moq's nix-wrapped worktree hooks - -## Goal - -moq's Claude Code worktree hooks, which run the `quest` moq pins through nix, -survive quest pin bumps: `quest init` leaves them alone instead of refusing -them. - -## Plan - -Decided 2026-11-03 (maintainer, on -[moq-dev/moq#7674](https://github.com/moq-dev/moq/pull/7674)): ✅ the hooks -reach `quest` through nix (or a submodule) long-term, so they run moq's pin. -A host-wide `quest` on `PATH` is acceptable only as a temporary bridge. -Rejected: relying on an installed `quest`, `direnv exec`, adopting the bare -`quest worktree hook` now, and dropping the quest. - -Decided 2026-11-03 (maintainer, on -[moq-dev/moq#7674](https://github.com/moq-dev/moq/pull/7674)): ✅ ask -moq-dev/quest to have `quest init` treat any command hook whose arguments end -in `worktree hook` as its own. Rejected: a configured hook command, and not -asking. - -[moq-dev/moq#7674](https://github.com/moq-dev/moq/pull/7674) installed the four -hooks as `nix run "${CLAUDE_PROJECT_DIR}#quest" -- worktree hook`. That command -takes 0.1–0.5 s warm and 1.5–3 s with a cold nix cache, and builds a new pin in -about 6 s. It also bumped the pin past -[moq-dev/quest#425](https://github.com/moq-dev/quest/pull/425), so -`--worktree '#123'` starts at the PR head and workflow agents' checkouts get -released, and checked live that the hooks coexist with T3 Code's worktree -threads and isolated delegates. What remains: - -- `quest init` matches only the literal `quest worktree hook`, so it refuses a - wrapped `WorktreeCreate`/`WorktreeRemove` command (exit 1, nothing written) - and would add duplicate subagent hooks. Until quest recognizes a wrapped - command, a pin bump drops the four entries for its `quest init` run and - restores `.claude/settings.json` afterwards, as AGENTS.md says. Once - quest recognizes them, bump the pin, check that `quest init` is a - no-op here, and drop that AGENTS.md sentence. - -## Waiting - -- moq-dev/quest: land `quest init` and `quest uninstall` treating a command - hook whose arguments end in `worktree hook` as Quest's own (being planned - there as of 2026-11-03). Check: with this repository's hooks in place, the - pinned `quest init` exits 0 and leaves `.claude/settings.json` unchanged. diff --git a/quest/m1/codex-env-snapshot.md b/quest/m1/codex-env-snapshot.md index 09d6b973c7d..8f586b5a221 100644 --- a/quest/m1/codex-env-snapshot.md +++ b/quest/m1/codex-env-snapshot.md @@ -31,7 +31,3 @@ Decided 2026-11-03 (maintainer, /quest-plan of the follow-ups from and `nix develop --command` keeps its own toolchain. Public API: none. Wire: none. - -## Related - -- [Agents use quest's worktree hooks](/quest/m0/quest-worktree-hooks.md) - the Claude-side worktree hooks From 5f5c7b2884cf99508f26ff8dd01930227c47b458 Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Wed, 4 Nov 2026 10:04:40 -0800 Subject: [PATCH 2/2] docs(agents): restore main's quest init note The maintainer chose to keep AGENTS.md as on main. Co-Authored-By: Claude Opus 5.5 --- AGENTS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AGENTS.md b/AGENTS.md index de10123d90c..1d7704bb98c 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -45,7 +45,7 @@ just fix # Auto-fix lint/formatting, same scope Quests: before any work, run `quest context` and follow it. The `quest` binary and its skills come from the moq-dev/quest flake input; change them upstream and bump the input. -Quest's Claude Code worktree hooks are a user-level opt-in: drop any `quest init` adds to `.claude/settings.json` until the pinned `quest` stops writing them. +`quest init` refuses Claude Code's worktree hooks: drop them from `.claude/settings.json` for its run, then restore them. # Cross-Package Sync