work-items: preflight credits the main checkout's settings.local.json to worktrees on Windows, where approvals stay per worktree
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 72/100
Hướng nghiên cứu
Read plugins/work-items/skills/work/scripts/preflight.sh and its collect() function, then compare the platform-specific settings behavior described in the issue with Cases 16 and 16b in plugins/work-items/skills/work/scripts/preflight.test.sh. Add a Windows-layout test alongside those cases and update the preflight behavior to match it. Done means the main settings file is not credited for a Windows worktree and the worktree's own local settings are considered.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
The work-items preflight credits the main checkout's .claude/settings.local.json to every linked worktree. The live docs say approvals are shared that way only where Claude Code uses the repository root; on Windows and the other layouts where it does not, an approval stays with the worktree it was granted in. On those layouts the preflight reports a grant as covered that the worktree session will not have, so an unattended lane can hit a permission prompt the preflight said was covered.
Affected area / component
plugins/work-items/skills/work/scripts/preflight.sh (collect()), plugins/work-items/skills/work/scripts/preflight.test.sh
Steps to reproduce
- On Windows, put
Bash(gh pr create *)in the main checkout's.claude/settings.local.jsononly. - Run the preflight for a linked worktree (
--worktree-root <worktree>). - The preflight reports no gap for
gh pr create. - Start a session in that worktree and run
gh pr create: it prompts.
(Steps 1-3 match the existing test "Case 16" at preflight.test.sh:303; step 4 follows from the docs and was not run.)
Expected behavior
On Windows and other layouts where Claude Code does not use the repository root, the preflight reads the worktree's own settings.local.json and does not credit the main checkout's.
Actual behavior
preflight.sh:24-31and:143-146: since Claude Code v2.1.211, "don't ask again" approvals "save here (resolved through worktrees to the main checkout) and apply in every worktree of the repository, so this file is read in every mode".collect()at:343reads it unconditionally on every platform.preflight.test.sh:303-322("Case 16") asserts the main checkout's grant covers a worktree run;:324("Case 16b") asserts a worktree's own local file is excluded.- Live docs (read 2026-10-12):
- https://code.claude.com/docs/en/worktrees#what-worktrees-share-with-the-main-checkout: "On Windows and in the other cases where Claude Code doesn't use the repository root, the rule stays with that worktree."
- https://code.claude.com/docs/en/permissions#permission-system: "In some cases, such as outside a git repository or on Windows, Claude Code doesn't use the repository root."
Suggested fix
Branch on the layout: on Windows and the other non-repository-root cases listed at https://code.claude.com/docs/en/settings#where-claude-code-keeps-the-local-file-in-a-git-repository (outside a git repository, a home-directory repository root, Windows, or a root not owned by the user), read the worktree's own settings.local.json instead of the main checkout's. Add a Windows-layout case beside Case 16 and invert Case 16b for that layout.
Environment
Windows; work-items on main as of 2026-10-12.
Found during the upstream-pointer sweep (PRs #7061-#7274).
- Ngôn ngữ chính
- Shell
- Star
- 22
- Fork
- 2
- Merge trung bình
- 8 giờ 27 phút
- Pull request đã merge (30 ngày)
- 957
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của melodic-software/claude-code-plugins
-
priority: medium
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
melodic-software/claude-code-plugins#7351 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
agent-ready priority: high work-class: scoped
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
melodic-software/claude-code-plugins#7312 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
priority: medium
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
melodic-software/claude-code-plugins#7288 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
knowledge: docpage-digest dual verification defines no verdict vocabulary or pass/fail thresholdĐang mởneeds-human
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
melodic-software/claude-code-plugins#7286 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
priority: low
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
melodic-software/claude-code-plugins#7282 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của melodic-software/claude-code-plugins
Issue tương tự
-
e2e-failure ready-to-code
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
redhat-developer/rhdh-plugin-export-overlays#4391 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
documentation good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
graygarbage/HermesKey#20 ·
-
review-bot
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
midagedev/bloomery#151 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
needs-triage
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
mattpocock/skills#1269 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 2 ngày