Skip to content

chore(claude): remove the overlayfs worktree hooks - #1341

Merged
mergify[bot] merged 2 commits into
masterfrom
fix/worktree-hook-managed-target
Oct 16, 2026
Merged

mergify[bot] merged 2 commits into
masterfrom
fix/worktree-hook-managed-target

Conversation

@tignear

@tignear tignear commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Summary

This removes the Claude Code WorktreeCreate/WorktreeRemove hooks (.claude/scripts/worktree-{create,remove}.sh). They mounted fuse-overlayfs layers over target/ and node_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 hooks
  • the fuse-overlayfs dev-shell package in flake.nix
  • the .overlays/ ignore entries

Agent 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

  • grep finds no remaining references to the scripts, .overlays, or fuse-overlayfs outside the removed lines.
  • The change touches no Rust or TypeScript sources, so no build or test scope is affected.

…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.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-16T09:05:40.102407Z 7d67041 New commits
ℹ️ 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" or "@codex security review".

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.
@tignear tignear changed the title chore(claude): skip the target overlay when target/ is managed externally chore(claude): remove the overlayfs worktree hooks Oct 16, 2026
@tignear tignear added the merge-ready Request merging through Mergify after required checks label Oct 16, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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".

Comment thread .claude/settings.json
@@ -1,24 +0,0 @@
{

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

@mergify mergify Bot added the queued Mergify queue entry label Oct 16, 2026
@mergify

mergify Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

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
  • check-success = Conventional Commit title
  • check-success = Queue validation
  • any of [🛡 GitHub repository ruleset rule master]:
    • check-success = @github-actions/Lint & Format
    • check-neutral = @github-actions/Lint & Format
    • check-skipped = @github-actions/Lint & Format
  • any of [🛡 GitHub repository ruleset rule master]:
    • check-success = @github-actions/NAPI Build (Linux ARM64 GNU)
    • check-neutral = @github-actions/NAPI Build (Linux ARM64 GNU)
    • check-skipped = @github-actions/NAPI Build (Linux ARM64 GNU)
  • any of [🛡 GitHub repository ruleset rule master]:
    • check-success = @github-actions/NAPI Build (Windows)
    • check-neutral = @github-actions/NAPI Build (Windows)
    • check-skipped = @github-actions/NAPI Build (Windows)
  • any of [🛡 GitHub repository ruleset rule master]:
    • check-success = @github-actions/Rust Test & NAPI Build
    • check-neutral = @github-actions/Rust Test & NAPI Build
    • check-skipped = @github-actions/Rust Test & NAPI Build
  • any of [🛡 GitHub repository ruleset rule master]:
    • check-success = @github-actions/JS Test (Ubuntu)
    • check-neutral = @github-actions/JS Test (Ubuntu)
    • check-skipped = @github-actions/JS Test (Ubuntu)
  • any of [🛡 GitHub repository ruleset rule master]:
    • check-success = @github-actions/JS Test (Windows)
    • check-neutral = @github-actions/JS Test (Windows)
    • check-skipped = @github-actions/JS Test (Windows)
  • any of [🛡 GitHub repository ruleset rule master]:
    • check-success = @github-actions/Conventional Commit title
    • check-neutral = @github-actions/Conventional Commit title
    • check-skipped = @github-actions/Conventional Commit title

@mergify
mergify Bot merged commit 43ae2f4 into master Oct 16, 2026
22 checks passed
@mergify
mergify Bot deleted the fix/worktree-hook-managed-target branch October 16, 2026 10:07
@mergify mergify Bot removed the queued Mergify queue entry label Oct 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-ready Request merging through Mergify after required checks

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant