ce-compound: pre-resolved repo-name command (git ... | sed ...) blocked by Claude Code multi-operation permission check
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ó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 66/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- git, typescript
- Lĩnh vực
- developer-experience, tooling
Hướng nghiên cứu
Đọc plugins/compound-engineering/skills/ce-compound/SKILL.md quanh dòng tên Repo đã được phân giải trước và so sánh với mẫu sentinel chưa được phân giải được nhắc đến cho ce-commit và ce-commit-push-pr. Xác nhận skill sử dụng giá trị repository đã phân giải như thế nào, sau đó cập nhật lệnh và hướng dẫn dispatcher để tên Repo được suy ra mà không dùng lệnh nối qua pipe. Hoàn tất khi /ce-compound vượt qua bước phân giải trước bên trong một git worktree.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Bug Description
Component: Skill — ce-compound
Summary: Invoking /ce-compound from inside a git repo fails immediately because the pre-resolved "Repo name" command pipes git rev-parse into sed. Claude Code's permission system treats piped commands as multiple operations and refuses to auto-approve, so the substitution never runs and the skill aborts before Phase 1.
This is not the same issue as #730 (which was about being outside a git repo / missing || true). I'm in a normal git worktree with broad git permissions allowlisted; the failure is the multi-op check, not exit-code handling.
Environment
- Plugin Version: compound-engineering 3.3.2 (from every-marketplace)
- Agent Platform: Claude Code
- OS: Darwin 24.6.0 (macOS, arm64)
- Working dir: inside a git worktree (
git rev-parsewould succeed)
What Happened
Error: Shell command permission check failed for pattern
"!`git rev-parse --path-format=absolute --git-common-dir 2>/dev/null | sed -E 's|/\.git/?$||; s|.*/||'`":
This Bash command contains multiple operations. The following parts require approval:
git rev-parse --path-format=absolute --git-common-dir
sed -E 's|/\.git/?$||; s|.*/||'
Skill never executes. The other pre-resolved line (git rev-parse --abbrev-ref HEAD) works fine — it's the | sed chain that trips the check.
Root Cause
plugins/compound-engineering/skills/ce-compound/SKILL.md (around line 25):
**Repo name (pre-resolved):** !`git rev-parse --path-format=absolute --git-common-dir 2>/dev/null | sed -E 's|/\.git/?$||; s|.*/||'`
Claude Code's bash permission layer splits piped commands and requires each segment to be individually allowlisted. Even with Bash(git rev-parse:*) permitted, the sed segment isn't, so the whole !...`` substitution is blocked rather than executed.
Suggested Fixes
Pick whichever fits the skill's defensive style; any of these avoids the pipe:
Option A — let git produce the basename directly (no second tool):
-**Repo name (pre-resolved):** !`git rev-parse --path-format=absolute --git-common-dir 2>/dev/null | sed -E 's|/\.git/?$||; s|.*/||'`
+**Repo name (pre-resolved):** !`basename "$(git rev-parse --show-toplevel 2>/dev/null)" 2>/dev/null || echo '__REPO_UNRESOLVED__'`
(Still two commands, but basename is usually allowlisted; if not, swap for option B.)
Option B — emit the toplevel path and let the agent take the basename:
-**Repo name (pre-resolved):** !`git rev-parse --path-format=absolute --git-common-dir 2>/dev/null | sed -E 's|/\.git/?$||; s|.*/||'`
+**Repo toplevel (pre-resolved):** !`git rev-parse --show-toplevel 2>/dev/null || echo '__REPO_UNRESOLVED__'`
Then update the "If the lines above resolved..." instruction to tell the dispatcher to take the basename of the path.
Option C — bundle into a single shell invocation (still one command from the permission system's perspective if wrapped):
-**Repo name (pre-resolved):** !`git rev-parse --path-format=absolute --git-common-dir 2>/dev/null | sed -E 's|/\.git/?$||; s|.*/||'`
+**Repo name (pre-resolved):** !`sh -c 'd=$(git rev-parse --show-toplevel 2>/dev/null) && printf "%s" "${d##*/}"' 2>/dev/null || echo '__REPO_UNRESOLVED__'`
(Permission-fragile — depends on whether sh -c is allowlisted in a given environment.)
I'd recommend B — it's the simplest, matches the existing __*_UNRESOLVED__ sentinel pattern used in ce-commit/ce-commit-push-pr, and shifts the trivial string manipulation to the agent where it belongs.
Repro
- Open Claude Code in any git worktree.
- Run
/ce-compound. - Observe
Shell command permission check failed ... contains multiple operationsbefore any phase begins.
Additional Context
The companion line right below (git rev-parse --abbrev-ref HEAD) does not use a pipe and works correctly, which confirms the trigger is the | sed chain, not git itself.
- Ngôn ngữ chính
- TypeScript
- Star
- 25.6k
- Fork
- 2.1k
- Merge trung bình
- 3 giờ 57 phút
- Pull request đã merge (30 ngày)
- 170
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
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 EveryInc/compound-engineering-plugin
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
EveryInc/compound-engineering-plugin#2085 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 80/100
EveryInc/compound-engineering-plugin#2084 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
EveryInc/compound-engineering-plugin#2083 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Host support: DeepSeek Harness (dsh)Có thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 48/100
EveryInc/compound-engineering-plugin#2072 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Respect a user policy of working on the default branch (ce-commit, ce-debug, ce-worktree, ce-test-browser, ce-dogfood)Có thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 22/100
EveryInc/compound-engineering-plugin#2071 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của EveryInc/compound-engineering-plugin
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
e2e-failure ready-to-code
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 72/100
redhat-developer/rhdh-plugin-export-overlays#4794 · 1 bình luận ·
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 78/100
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 1 ngày
-
area: plugins documentation good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
CatVinci-Studio/Textus#727 ·
Maintainer thường phản hồi trong vòng 1 ngày