I build guard, a pre-run check for the shell commands Claude Code and GitHub Copilot CLI run. Before a command runs, guard denies it with a reason, asks you, or gives no decision. With no decision, your own permission settings decide. guard...
I build guard, a pre-run check for the shell commands Claude Code and GitHub Copilot CLI run. Before a command runs, guard denies it with a reason, asks you, or gives no decision. With no decision, your own permission settings decide.
guard also asks when part of a line is only known when it runs, or when it can't read the line. In 0.4.13 that included lines where a value is set earlier on the same line and used later:
S=/c/tools; $S/python.exe x.py
guard couldn't tell what $S held, so it asked. 0.4.14, 0.4.15 and 0.4.16 (out today) read more of these lines. This post is about what that changed, measured on one history: mine.
How I measured
9,574 Bash and PowerShell commands from my own Claude Code history, the same set for every version.
Each command judged in the folder it ran in, with the environment values each version's hook passes, using guard's built-in rules.
Run through 0.4.13, 0.4.14, 0.4.15 and 0.4.16. Measured Nov 22, 2026.
This is the history of my own development work with Claude. It is not a sample of other users.
The numbers
0.4.13
0.4.14
0.4.15
0.4.16
ask
916
605
539
527
deny
97
86
86
86
What moved from 0.4.13 to 0.4.14:
312 went from ask to no decision.
10 went from deny to no decision. All 10 delete inside the temp folder.
1 went from deny to ask.
0.4.14 mostly reads values set earlier on the same line (and loop values written out), so those lines are judged as if the value were written in.
What moved from 0.4.14 to 0.4.15:
67 went from ask to no decision. All of them were lines guard couldn't read before and now reads: shell syntax it didn't parse, such as an unquoted ==.
1 went from no decision to ask.
What moved from 0.4.15 to 0.4.16:
12 went from ask to no decision. All 12 use $APPDATA or $LOCALAPPDATA. 0.4.16 reads those two on Windows as their real values on that PC, so a program under them is judged as that program, and deleting one of those folders is judged as outside the project.
Nothing else moved.
Examples
These lines are written in the same shape as lines in the history, with made-up paths. The decisions are guard's real output for each version.
Asks that went away:
command
0.4.13
0.4.14
0.4.15
0.4.16
S=/c/tools; $S/python.exe x.py
ask
no decision
no decision
no decision
PY=/c/tools/python.exe; $PY -m pytest -q
ask
no decision
no decision
no decision
for n in 1 2 3; do echo "item $n" > "note_$n.txt"; done
ask
no decision
no decision
no decision
PYTHONPATH=. C:/tools/python.exe -m pytest -q
ask
ask
no decision
no decision
sed -n 1,5p a.ts; echo ==; sed -n 9,12p a.ts
ask
ask
no decision
no decision
C="$APPDATA/npm/copilot.cmd"; "$C" --help
ask
ask
ask
no decision
"$LOCALAPPDATA/Programs/cursor/Cursor.exe" --version
ask
ask
ask
no decision
Reading the value doesn't only remove questions:
command
0.4.13
0.4.14
0.4.15
0.4.16
X=rm; $X -rf ~
ask
deny
deny
deny
for d in build /etc; do rm -rf "$d"; done
deny
deny
deny
deny
rm -rf "$APPDATA"
deny
deny
deny
deny
C="rm -rf"; $C ~
ask
ask
ask
ask
X=eval; $X 'rm -rf ~'
ask
ask
ask
ask
rm -rf ~
deny
deny
deny
deny
X=rm; $X -rf ~ was a question in 0.4.13 because guard couldn't see what $X was. Once it reads X=rm, the line is rm -rf ~, which reaches outside the project, so it is denied.
The for line and rm -rf "$APPDATA" are denied in every version, but the reason changed. In 0.4.13 the for line was denied because the delete path was only known at run time; from 0.4.14 it's because /etc is outside the project. rm -rf "$APPDATA" was denied because the path was only known at run time up to 0.4.15; in 0.4.16 it's because the folder is outside the project.
C="rm -rf"; $C ~ still asks in all four versions. There the shell splits the value into words when it runs, and guard asks. X=eval; $X 'rm -rf ~' asks too.
What I can and can't say from this
On this history, the only lines that moved from deny to no decision were deletes inside the temp folder.
I can't say how this looks on your history, because I only measured mine. If you run guard and see a question you think it shouldn't ask, or a line it stays quiet on that you'd want asked, I'd like to see the command.
guard is free and source-available (FSL-1.1-ALv2).
Repo: https://github.com/boxdawn/guard
I wrote this with help from an AI assistant. The measurements were run by an AI agent under my direction, and the decisions in this post are mine.