Repository navigation
chore(claude): remove the overlayfs worktree hooks - #1341
Conversation
…ally The WorktreeCreate hook mounted a fuse-overlayfs over target/ in every agent worktree. When the main checkout's target/ is a symlink owned by a build-cache manager such as mbx, the overlay diverted the worktree's builds into an unmanaged upper layer inside the worktree, outside that manager's garbage collection. Leave target/ alone in that case so Cargo creates the worktree's own managed link; the manager already shares compiled work across checkouts.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
The WorktreeCreate/WorktreeRemove hooks mounted fuse-overlayfs layers over target/ and node_modules/ in every agent worktree. They are no longer useful: a build-cache manager such as mbx already shares compiled work across checkouts and garbage-collects it, while the target/ overlay diverted builds into an unmanaged upper layer outside that collection. pnpm installs node_modules from its content-addressed store cheaply. Remove the hooks, the project settings that only registered them, the fuse-overlayfs dev-shell package, and the overlay ignore entries, so agent worktrees use Claude Code's default creation and cleanup.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7d670415df
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| @@ -1,24 +0,0 @@ | |||
| { | |||
There was a problem hiding this comment.
Preserve the worktree hooks for unmanaged targets
When target/ is a real directory or the checkout contains node_modules, deleting this settings file disables both worktree hooks entirely, so the existing overlays are no longer mounted and hook-managed worktree cleanup no longer runs. This change is supposed to skip only the target/ overlay when that path is a symlink; retain the hook registration and add that condition in the creation script instead.
Useful? React with 👍 / 👎.
Merge Queue Status
This pull request spent 25 minutes 31 seconds in the queue, including 22 minutes 56 seconds running CI. Required conditions to merge
|
Summary
This removes the Claude Code WorktreeCreate/WorktreeRemove hooks (
.claude/scripts/worktree-{create,remove}.sh). They mounted fuse-overlayfs layers overtarget/andnode_modules/in every agent worktree, and nothing needs them now.target/: a build-cache manager such as mbx already shares compiled work across checkouts and collects it. The overlay actively hurt, because worktree builds went into<worktree>/.overlays/target/upper, outside the manager's size budget and garbage collection. In this session two agent worktrees had to unmount it by hand before building.node_modules/: pnpm installs from its content-addressed store with hard links, so a per-worktree install is cheap.Also removed:
.claude/settings.json, which only registered these hooksfuse-overlayfsdev-shell package inflake.nix.overlays/ignore entriesAgent worktrees fall back to Claude Code's default creation and cleanup.
The first commit on this branch only skipped the
target/overlay; the second removes the hooks altogether. With a squash merge, the PR title above describes the final change.Validation
grepfinds no remaining references to the scripts,.overlays, orfuse-overlayfsoutside the removed lines.