Repository navigation
feat(setup): quest setup --worktrees installs the worktree hooks - #565
Conversation
Quest-Claim: 7201893bb0702989
The README's pasted worktree hook JSON is gone. `quest setup --worktrees` installs WorktreeCreate, WorktreeRemove, SubagentStart, SubagentStop, SessionStart, and SessionEnd (60s timeout) entries running `quest worktree hook`, replacing entries pasted from an older README. A rerun keeps them; --no-worktrees or --remove takes them out. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 41 minutes. View limit details
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. |
kixelated
left a comment
There was a problem hiding this comment.
Automated review by review (OpenAI)
Reviewed c22fa50 against base 55070e1.
No actionable findings in the inspected changes. The worktree event table matches the handler's supported events, preserves the SessionEnd timeout, and stays separately opt-in from the context hooks. Setup preserves an existing opt-in on an ordinary rerun, migrates the earlier guarded commands, and removes worktree hooks without removing rule hooks when explicitly disabled. The existing grouped-hook preservation and malformed-file safeguards remain in place; the added regression exercises migration, idempotence and removal.
Direction: retain an end-to-end CLI settings test for omitted, positive and negative worktree flags, and verify the installed hooks on the actual Claude Code PATH when rolling out. The removed shell guard's guidance now lives in documentation rather than the runtime error.
Verification limits: GitHub-only static diff and surrounding installer, event table and test inspection. No tests, builds, settings changes or live Claude hook sessions executed. COMMENT only, not approval.
(Written by review (OpenAI))

quest setup --worktreesinstalls Quest's Claude Code worktree hooks with the rest of Quest's user-level hooks; the README's pasted hook JSON is gone. Finishesquest/m0/setup-worktree-hooks.md.Changes
src/cli/hooks.ts:WORKTREE_HOOKS(one entry perHOOK_EVENTSevent, runningquest worktree hook, SessionEnd withtimeout: 60).HookEntrygainscommandandtimeout. Handlers whose command isquest hookor ends inquest worktree hookcount as Quest's, so the README's guarded pasted entries get replaced, not duplicated.quest setup:--worktreesadds them,--no-worktreestakes them out, and with neither flag a rerun keeps whatever is installed.--removetakes everything out.quest setup --worktrees. Dropped the worktree test that ran the README's pasted JSON.Public API
New flags
quest setup --worktrees/--no-worktrees. No breaking change. Existing pasted entries migrate on the nextquest setuprun.Choices made without asking
quest hook/quest worktree hook), each with its own group, instead of one dispatcher. Both handle SessionStart and SubagentStart, but only the worktree handler should run when the user opted in, and keeping the commands separate avoids storing that opt-in anywhere.quest setupafter an upgrade doesn't silently drop them.questmessage is now in the README (start Claude withnix develop --command claude, or install quest on that PATH). It is no longer an inline shell guard, so a missingquestshows the shell'squest: command not found.HOOKS. This one adds a sibling table pluscommand/timeoutfields, so the conflict should only be textual.Suggested follow-ups
None.
Models
🤖 Generated with Claude Code
(Written by Opus 5.5)
Review
Rewritten by
quest reviewafter each round.01a1b896-a988-7e43-915b-391bbe020025, round 1No actionable defects were identified in the specified diff; CLI flag parsing was verified, but tests were not run in the read-only environment.