Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

fix(work-items): decompose publish snippet is refused in worktree-isolated sessions

已关闭
#6,929 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

已经有一个关联 PR 被合并了。

  • #7090 来自 @kyle-sexton —— 已合并

评估

难度
3/5
预计耗时
1-2 天
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
git, shell
领域
tooling

调研方向

Start with the step 4 publish snippet in plugins/work-items/skills/decompose/SKILL.md, which combines a git rev-parse command substitution with a $(cat "$BODY_FILE") body argument, then read the create-item path in work-item-tracker.sh. Reproducing the refusal needs a worktree-isolated Claude Code session, and whether a --body-file option already exists is unconfirmed. Done means the documented publish runs from a worktree-isolated session without a wrapper, and the same check covers /work-items:track add.

由索引模型根据 Issue 内容生成。

描述

priority: medium

Summary

/work-items:decompose step 4's publish snippet is refused in a worktree-isolated session, so a decompose run from a worktree cannot publish slices as written.

What happened

Publishing the approved breakdown for #6917 from a worktree-isolated session, every create-item call shaped like the step 4 snippet was refused by Claude Code's worktree isolation:

this command names git in a form too complex to verify that it stays inside the worktree. Refusing to run it

Both tracker paths (main checkout and worktree copy) were refused when the body was passed inline as --body "$(cat "$BODY_FILE")". The run only published after the agent moved the call into a wrapper script that runs the worktree's copy of work-item-tracker.sh. Nothing was created by the refused attempts.

Likely cause (inference, not yet reproduced in isolation)

The snippet in plugins/work-items/skills/decompose/SKILL.md step 4 combines:

  • a fallback TRACKER="${CLAUDE_PROJECT_DIR:-$(git rev-parse --show-toplevel)}/...", which puts git inside a command substitution; and
  • --body "$(cat "$BODY_FILE")", another command substitution in the same invocation.

Claude Code documents that in an isolated worktree it "blocks a Bash or Monitor command when it can't verify from the command text that any git the command runs stays inside the worktree" (worktrees: how Claude Code enforces isolation). The tracker script itself runs gh/git, which the command-shape check cannot see through.

Fix direction

Give create-item a --body-file input (or document one if it exists) and split the snippet into plain commands with literal paths, so no git or command substitution appears in the publishing command. Same check for other skills that reuse this snippet (/work-items:track add).

Verification

  • A decompose publish from a worktree-isolated session succeeds with the documented snippet, no wrapper.
  • Related precedent: #5696, #6234 (other worktree-isolation refusals of our commands).

No related issue: found during the #6917 publish; not covered by #5696 or #6234.

主要语言
Shell
星标
22
派生
2
平均合并
8 小时 27 分钟
30 天内合并 PR
957

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

melodic-software/claude-code-plugins 的其他 Issue

查看 melodic-software/claude-code-plugins 的全部 Issue

相似的 Issue

更多 Shell/Bash Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。