Skip to content

Commit 71de6f2

Browse files
committed
fix(skills): rewrite review-task snapshot capture to use allowlisted Bash prefixes
- Replace shell variable assignment pattern (SNAPSHOT=$(git stash create -u)) with agent-level instructions using two separate Bash tool calls - Each call starts with `git`, matching the runner's Bash(git:*) allowlist - Fixes permission failure introduced by Claude Code 2.1.145 tightening variable-assignment prefix matching
1 parent 496baae commit 71de6f2

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

workflow-skills/review-task.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -305,19 +305,19 @@ summary: <one-line summary>
305305

306306
Then capture a working-tree snapshot and call `add_log`:
307307

308-
```
309-
SNAPSHOT=$(git stash create -u)
310-
if [ -z "$SNAPSHOT" ]; then
311-
SNAPSHOT=$(git rev-parse HEAD)
312-
fi
308+
1. Run `git stash create -u`. If the output is non-empty, that is the snapshot SHA — skip step 2.
309+
2. If the output is empty (no uncommitted changes), run `git rev-parse HEAD`. That is the snapshot SHA.
310+
3. Call `add_log`:
313311

312+
```
314313
add_log(card_id=<parent>, agent_id=<your id>,
315314
action="review_completed",
316-
message="head=$SNAPSHOT recommendation=<approve|approve_with_notes|revise>")
315+
message="head=<snapshot SHA> recommendation=<approve|approve_with_notes|revise>")
317316
```
318317

319-
The SHA is a `git stash create -u` snapshot — never use bare `git stash`,
320-
which would reset the working tree.
318+
Use two separate Bash tool calls for steps 1 and 2. Do not combine them in a
319+
single call with `&&` or `;`. Never use bare `git stash`, which would reset the
320+
working tree. `git stash create -u` creates a stash object without touching it.
321321

322322
Do **not** call `release_card`. Do **not** call `transition_card`.
323323

0 commit comments

Comments
 (0)