Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

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

クローズ
#6,929 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

関連するプルリクエストがすでにマージされています。

  • #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時間 25分
マージ済み PR(30日)
944

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

melodic-software/claude-code-plugins のほかの issue

melodic-software/claude-code-plugins の issue をすべて見る

似ている issue

Shell/Bash の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。