Skip to content

chore(claude): drop quest's worktree hooks from project settings - #7889

Merged
kixelated merged 3 commits into
mainfrom
chore/drop-quest-worktree-hooks
Nov 4, 2026
Merged

kixelated merged 3 commits into
mainfrom
chore/drop-quest-worktree-hooks

Conversation

@kixelated

@kixelated kixelated commented Nov 4, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

Quest's Claude Code worktree hooks are becoming a user-level opt-in: moq-dev/quest#466 makes quest init write no hook entries, since a repository's settings force them on every contributor. moq still carries four hand-written entries in .claude/settings.json that run nix run "${CLAUDE_PROJECT_DIR}#quest" -- worktree hook. Quest's init only removes its own exact quest worktree hook and leaves wrappers like these with a warning, so moq removes them itself.

Approach

  • .claude/settings.json: drops the WorktreeCreate, WorktreeRemove, SubagentStart, and SubagentStop entries. The direnv SessionStart hook and the permissions stay.
  • Deletes quest/m0/quest-worktree-hooks.md (with quest rm, which also drops its links from quest/m0/README.md and quest/m1/codex-env-snapshot.md). Its goal was to keep these wrapped hooks alive across pin bumps, which no longer applies once they are gone.
  • AGENTS.md: unchanged from main, per the maintainer's decision below.

Users who want Quest to manage Claude Code's worktrees add the entries from Quest's README ("Claude Code checkouts") to their own ~/.claude/settings.json. Until then, Claude Code makes its own worktrees under .claude/worktrees/, which .gitignore already ignores.

Known staleness: main's AGENTS.md line "quest init refuses Claude Code's worktree hooks: drop them from .claude/settings.json for its run, then restore them." describes hooks this PR removes, so there is nothing left to restore. The pinned quest (moq-dev/quest@4be35081) still adds bare quest worktree hook entries on a pin bump's quest init until it includes moq-dev/quest#466, so a pin bump should drop whatever quest init adds rather than restore anything. The maintainer kept main's wording anyway.

Decisions

Made by the maintainer in /quest-complete on 2026-11-04:

  • Keep the AGENTS.md edit?
    • ✅ Revert it: restore moq's AGENTS.md exactly as on main.
    • Keep the new wording ("drop any quest init adds until the pinned quest stops writing them").
  • Keep the deletion of quest/m0/quest-worktree-hooks.md?
    • ✅ Keep the deletion.
    • Restore the quest.

Earlier, by the maintainer: an explicit PR instead of leaving the entries for quest init's warning to surface, and no follow-up quest for it.

Impact

None on public API or wire. Contributors' Claude Code sessions in moq no longer route worktrees through Quest unless they opt in at user level.

Alternatives

  • Leave the entries for quest init's warning to surface: the maintainer chose an explicit PR instead.
  • A follow-up quest: rejected for the same reason.

Neither this PR nor moq-dev/quest#466 blocks the other.

Follow-ups

None.

Validation

  • just ci origin/main (in the dev shell): passed on 5f5c7b28 (biome, markdown, gh, quest, shell, and the rest it selected; no Rust).

Review

Codex gpt-6.1-sol at xhigh effort, session 01a1a7c5, rounds 1-2 against origin/main at 735cc0ca. Reviewed head: 5f5c7b28.

  • Round 1, medium, .claude/settings.json:13: bump the Quest pin so a later quest init does not re-add the four hooks. Refuted: no Quest revision stops writing them yet. moq-dev/quest#466 is still open, and quest's main (b454ca3e) still calls installHooks(repo) at src/core/init.ts:140. The maintainer decided this PR and moq-dev/quest#466 don't block each other, and the pin bump that picks it up is its own quest. quest init runs only in a deliberate pin bump, whose diff to .claude/settings.json gets reviewed there.
  • Round 2: no findings; the reviewer accepted the refutation.

Automated reviews on the previous head fc0061a8: Pullfrog approved, CodeRabbit had no actionable comments, and the OpenAI review found nothing. The one failing check, the optional Check job, was cancelled, not failed.

🤖 Generated with Claude Code

(Written by Claude Opus 5.5)

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 <noreply@anthropic.com>

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes

  • Worktree hooks removed — .claude/settings.json drops the four WorktreeCreate/WorktreeRemove/SubagentStart/SubagentStop entries, leaving the direnv SessionStart hook and permissions; the resulting file still validates against the Claude Code settings schema.
  • AGENTS.md note updated — the drop-and-restore procedure around quest init becomes "drop any it adds until the pinned quest stops writing them", matching the pinned quest's current behavior.
  • Quest removed — quest/m0/quest-worktree-hooks.md, its m0/README.md index entry, and the codex-env-snapshot.md ## Related link are gone; no other tracked references to the deleted page or the removed hook entries remain.
  • Ignore coverage intact — /.claude/worktrees/ and /.worktrees/ are already ignored, so Claude Code's fallback worktree location is still excluded from just check's untracked-file scope.

Pullfrog  | View workflow run | Using deepseek-v4.1-flash-1017 (free via Pullfrog for OSS) | 𝕏

@kixelated kixelated left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated review by review (OpenAI)

Reviewed head fc0061a against base 716ddc9.

No confirmed actionable finding. The settings remove the four Quest worktree hooks while retaining SessionStart and permissions, and the updated guidance accounts for the currently pinned quest init. This follows the recorded user-level opt-in decision.

Verification limits: GitHub-only static review of the settings and upstream decision; I did not run Claude Code, quest init, or a live worktree transition.

(Written by review (OpenAI))

@coderabbitai

coderabbitai Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The project settings no longer define the WorktreeCreate, WorktreeRemove, SubagentStart, or SubagentStop hooks that ran the Quest worktree hook. The instructions now describe Claude Code worktree hooks as a user-level opt-in and direct removal of settings added by quest init until the pinned Quest stops writing them. The Quest pin-bump workaround document, its README reference, and a related link in the Codex environment snapshot are removed.

Merge Risk: Minimal · up to fc006

The changes make Quest worktree hooks opt-in and remove obsolete guidance. No merge-blocking issue is identified.

Pre-merge checks: Passed 4
Check name Status Explanation
Title check Passed The title clearly and concisely identifies the removal of Quest worktree hooks from project settings.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description check Passed The pull request description directly explains the removal of Quest worktree hooks, related documentation changes, user-level opt-in behavior, validation, and review context. It matches the changeset.
Finishing Touches
Simplify code
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share
Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: d2692c3f-5550-4a38-97e3-4cefcb170332
Commits

Reviewing files that changed from the base of the PR and between 716ddc9 and fc0061a.

Files selected for processing: 5
  • .claude/settings.json
  • AGENTS.md
  • quest/m0/README.md
  • quest/m0/quest-worktree-hooks.md
  • quest/m1/codex-env-snapshot.md
Files with no reviewable changes: 1
  • quest/m0/quest-worktree-hooks.md

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 0 remain after this review.

kixelated added a commit to moq-dev/quest that referenced this pull request Nov 4, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
kixelated and others added 2 commits November 4, 2026 10:04
The maintainer chose to keep AGENTS.md as on main.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@kixelated kixelated left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated review by review (OpenAI)

Reviewed commit: 5f5c7b2

No new actionable findings. Compared with the prior reviewed head fc0061a, accounting for the main merge: the only substantive PR-owned update restores main's AGENTS.md instruction at line 48. The four-hook removal, retained SessionStart/permissions, and quest/link deletions are unchanged.

Overall direction: this remains consistent with the recorded maintainer decisions. The restored guidance's known staleness and the current pinned init's ability to re-add hooks are explicitly acknowledged decisions, not newly discovered defects.

Verification limits: GitHub-only source, patch and base comparison. I did not run Claude Code, quest init, or a live worktree transition, and did not independently execute the reported checks.

(Written by review (OpenAI))

@kixelated
kixelated added this pull request to the merge queue Nov 4, 2026
Merged via the queue into main with commit 4ecc744 Nov 4, 2026
10 of 12 checks passed
@kixelated
kixelated deleted the chore/drop-quest-worktree-hooks branch November 4, 2026 20:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant