Repository navigation
Description
Steps to reproduce
- In a clone of a repository that tracks files through Git LFS (
filter=lfsin.gitattributes) with its LFS objects already in the local store, for example melodic-software/knowledge-corpus, whose.gitattributesroutes video, images, PDFs, EPUBs and audio through LFS. - Create a worktree with
/source-control:worktree create <name>.
A worker reported on 2026-11-18 that this copied 4.2 GB of LFS objects out of the local LFS store into the new worktree. Its attempt to skip that with -c filter.lfs.* overrides on the git command was denied by the permission system.
Expected behavior
Creating a worktree checks out LFS-tracked paths as pointer files and copies nothing from the LFS store; a session that needs the content fetches it on demand.
Actual behavior
The helper's checkout runs the LFS smudge filter on every LFS-tracked path, so each new worktree writes a full copy of the repository's LFS content. The worktree skill's create path has no LFS handling: worktree-create.sh runs a plain git -C "$toplevel" worktree add ... (three forms: existing branch, --no-track -b for fresh, -b for head), and neither it nor context/create.md mentions LFS or smudge (read at origin/main today).
Severity
medium
Severity justification
Each worktree of an LFS repository costs gigabytes of disk and minutes of copying, and lanes create many worktrees; the only in-session workaround (git config overrides) is refused, so nothing is lost but every create pays the full cost.
Suggested fix location
plugins/source-control/scripts/worktree-create.sh (the git worktree add call); plugins/source-control/skills/worktree/context/create.md.
Notes
Proposal
When the repository uses LFS, run the helper's git worktree add with GIT_LFS_SKIP_SMUDGE=1 in that one command's environment, which leaves pointer files (git-lfs-smudge(1): "GIT_LFS_SKIP_SMUDGE:: Disables the smudging process"). Say on stderr that LFS content was not checked out and how to get it: git lfs pull, or git lfs pull --include <paths> for part of it. Because the variable is set inside the helper, no session-level command shape or permission change is needed.
A permission-shaped fix (an allow rule for the -c filter.lfs.* overrides) is the owner's call and is not this proposal.
Root cause
known: the helper never sets LFS smudge off for the checkout.
Acceptance criteria
- Creating a worktree with
worktree-create.shin a repository whose.gitattributesroutes paths throughfilter=lfsleaves those paths as LFS pointer files in the new worktree. - In that case the helper writes one stderr line saying LFS content was not checked out, naming
git lfs pullandgit lfs pull --include <paths>; stdout stays the worktree path alone. - In a repository with no LFS attributes, the helper's checkout and output are unchanged.
-
context/create.mdsays LFS paths arrive as pointers and how to fetch them. - A test with a fixture repository using LFS proves the first two items, skipping with a named reason when
git lfsis not installed; the helper's existing tests pass.
Out of scope
- A per-repository setting to smudge LFS content at create.
- Permission rules for git config overrides.
- Native
EnterWorktreecreation, which this skill does not use.
Metadata
Metadata
Assignees
Labels
Type
Fields
Work status
Priority
Activity
github-actions commentedon Nov 18, 2026
Size: Small
Complexity: Low
Uncertainty: Known
Flags: none
Blocked by: none
Blast radius: the source-control worktree-create.sh helper, its create.md context page and one new test; read and run by anyone creating worktrees with /source-control:worktree create.
Reversible: yes; revert the change, and worktrees already created are unaffected.
Open questions: none
Understood: creating a worktree in a Git LFS repository runs the smudge filter and copies the LFS content into every new worktree. You propose setting GIT_LFS_SKIP_SMUDGE=1 on the helper's own git worktree add, with one stderr note on how to fetch content, an update to create.md, and a fixture test. The acceptance criteria are exact, so nothing more is needed from you. I found no open duplicate and no merged pull request that already covers this.
Automated triage. A maintainer reviews it.
melodic-automation-lanes commentedon Nov 18, 2026
{"v":1,"actor_id":337595936,"title_sha256":"4de32d3cbda1a22917cdd9ae1d268514b67dd6d66c86d0d68000931c7b97d766","body_sha256":"9163b3bb36eedbee54f0fc23da6c87d11a3b3947fd85fbe78761830aa324b8c0"}
github-actions commentedon Nov 18, 2026
melodic-automation-lanes commentedon Nov 18, 2026
This records a re-fire of an earlier stop, not a new one. A GitHub API pool's stop floor stopped run 44406236443, the work-resolve-issue run that
agent-readystarted, after its model ran, until 2026-11-18T22:46:50Z. work-unblock has now removed and addedagent-readyback to start a fresh run early in a window. A floor stop is the lanes' load, not a fault in this issue. After limits.limit-stops-per-issue of these since a person last addedagent-readyor a run last reported, work-unblock waits the limits.stranded-backoff-hoursfailed-againbackoff instead.github-actions commentedon Nov 18, 2026
github-actions commentedon Nov 19, 2026