<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: JEONSEWON</title>
    <description>The latest articles on DEV Community by JEONSEWON (@jeonsewon).</description>
    <link>https://dev.to/jeonsewon</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3781888%2Fe7d6377e-9f5c-4964-8938-bf0a1317f26e.jpg</url>
      <title>DEV Community: JEONSEWON</title>
      <link>https://dev.to/jeonsewon</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/jeonsewon"/>
    <language>en</language>
    <item>
      <title>Claude pushed and moved on. guard 0.4.21 can tell it the push broke CI.</title>
      <dc:creator>JEONSEWON</dc:creator>
      <pubDate>Fri, 27 Nov 2026 10:14:02 +0000</pubDate>
      <link>https://dev.to/boxdawn/claude-pushed-and-moved-on-guard-0421-can-tell-it-the-push-broke-ci-29em</link>
      <guid>https://dev.to/boxdawn/claude-pushed-and-moved-on-guard-0421-can-tell-it-the-push-broke-ci-29em</guid>
      <description>&lt;p&gt;Claude runs &lt;code&gt;git push&lt;/code&gt;, says the task is done, and moves on. A few minutes later the CI run on GitHub fails. The session that could look at it is already on the next thing.&lt;/p&gt;

&lt;p&gt;I build guard, a pre-run check for the shell commands Claude Code runs. Most of what it does happens before a command runs. 0.4.21 adds one opt-in setting that looks at what happens after one: &lt;code&gt;git push&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Claude sees
&lt;/h2&gt;

&lt;p&gt;I tried it on a demo repo, &lt;code&gt;boxdawn/ci-notice-demo&lt;/code&gt;, with a commit that breaks a test on purpose. Claude pushed it and the session finished. When the CI run failed, this notice woke the idle session:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Boxdawn guard: CI newly failed on the commit you just pushed (boxdawn/ci-notice-demo main @ 6f089da). Workflow 'CI': its previous run passed.
- test → Run tests
    test_calc.py:9 test_total assert 3.6 == 4.0 + where 3.6 = total([1.5, 2.5])
Check whether your change caused it: gh run view 45972956440 --repo boxdawn/ci-notice-demo --log-failed  (it may also be unrelated to the change).
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Claude ran one command to read the failed log and reported that its own commit caused the failure. I had told it not to change files, so it offered to update the test or revert the commit and left the choice to me. That was one run, on Windows.&lt;/p&gt;

&lt;p&gt;Claude Code labels the notice as hook feedback ("Stop hook feedback" when it wakes an idle session, "PostToolUse … hook blocking error" while Claude is still working). Those labels come from Claude Code; nothing is blocked.&lt;/p&gt;

&lt;h2&gt;
  
  
  When it tells Claude
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Claude runs &lt;code&gt;git push&lt;/code&gt; in Bash or PowerShell.&lt;/li&gt;
&lt;li&gt;guard waits in the background, up to 25 minutes, for that commit's GitHub Actions runs.&lt;/li&gt;
&lt;li&gt;If a run failed and the last finished run before it in the same workflow, on another commit, had passed, guard tells Claude the failed workflow, job and step, with a few lines of annotations. It compares with the same branch, or with the default branch if this is the branch's first run.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  When it stays quiet
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;The check was already broken before this push.&lt;/li&gt;
&lt;li&gt;Commit message and PR title checks.&lt;/li&gt;
&lt;li&gt;Jobs that didn't run because of billing.&lt;/li&gt;
&lt;li&gt;Commits that only change docs.&lt;/li&gt;
&lt;li&gt;Lint that only points at files outside the change.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;One notice per push, and three per session at most.&lt;/p&gt;

&lt;h2&gt;
  
  
  Turning it on
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Update guard to 0.4.21.&lt;/li&gt;
&lt;li&gt;Turn on the &lt;code&gt;ci_notice&lt;/code&gt; option in &lt;code&gt;/plugin&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Restart Claude Code.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;You need GitHub Actions on the repo, and &lt;code&gt;gh&lt;/code&gt; installed and logged in with an account that can see it. While it waits, guard calls &lt;code&gt;gh run list&lt;/code&gt; every 25 seconds through your login, so the calls count against your own GitHub API limit. &lt;code&gt;git&lt;/code&gt; and &lt;code&gt;gh&lt;/code&gt; have to be on your PATH, not inside the project folder.&lt;/p&gt;

&lt;h2&gt;
  
  
  What it doesn't do
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;It only tells. It doesn't block, rerun or change anything. It passes on what your CI already reported, and whether to fix it is up to Claude and you.&lt;/li&gt;
&lt;li&gt;It sends nothing to Boxdawn.&lt;/li&gt;
&lt;li&gt;It only sees pushes Claude ran itself in Bash or PowerShell. Not pushes you run in your own terminal, and not &lt;code&gt;--dry-run&lt;/code&gt;, &lt;code&gt;--delete&lt;/code&gt;, &lt;code&gt;--tags&lt;/code&gt; or &lt;code&gt;--all&lt;/code&gt; pushes.&lt;/li&gt;
&lt;li&gt;It can't report CI that takes longer than 25 minutes. If no run appears within 3 minutes of the push, it stops waiting.&lt;/li&gt;
&lt;li&gt;"Newly broke" means compared with the previous run. It can report a failure your change didn't cause, and the notice says so.&lt;/li&gt;
&lt;li&gt;A few lines of your CI's annotations go to Claude as they are. Lines that look like secrets are left out.&lt;/li&gt;
&lt;li&gt;The Copilot CLI edition doesn't have it.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The judging rules are byte-for-byte the same as 0.4.20. Incident table for 0.4.21: 24 deny / 58 ask / 25 no decision across the same 107 commands from 83 public incidents, unchanged from 0.4.20.&lt;/p&gt;

&lt;p&gt;Repo and install: &lt;a href="https://github.com/boxdawn/guard" rel="noopener noreferrer"&gt;https://github.com/boxdawn/guard&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;How do you find out today that an agent's push broke CI?&lt;/p&gt;

</description>
      <category>claude</category>
      <category>ai</category>
      <category>devtools</category>
      <category>git</category>
    </item>
    <item>
      <title>My pre-run check for Claude Code lets rm -rf src through. Since 0.4.18, it keeps a copy first.</title>
      <dc:creator>JEONSEWON</dc:creator>
      <pubDate>Wed, 25 Nov 2026 03:41:18 +0000</pubDate>
      <link>https://dev.to/boxdawn/my-pre-run-check-for-claude-code-lets-rm-rf-src-through-since-0418-it-keeps-a-copy-first-29a1</link>
      <guid>https://dev.to/boxdawn/my-pre-run-check-for-claude-code-lets-rm-rf-src-through-since-0418-it-keeps-a-copy-first-29a1</guid>
      <description>&lt;p&gt;I build guard, a pre-run check for the shell commands Claude Code runs. Before a command runs, guard denies it with a reason, asks you, or gives no decision. With no decision, your own Claude Code permission settings decide.&lt;/p&gt;

&lt;p&gt;Some deletes get no decision on purpose. Run inside the project folder, these all pass guard without a word:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;rm&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;rf&lt;/span&gt; &lt;span class="n"&gt;src&lt;/span&gt;
&lt;span class="n"&gt;rm&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;rf&lt;/span&gt; &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;src&lt;/span&gt; &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;tests&lt;/span&gt;
&lt;span class="nc"&gt;Remove&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nc"&gt;Item&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nc"&gt;Recurse&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nc"&gt;Force&lt;/span&gt; &lt;span class="n"&gt;src&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Deleting inside your own project is ordinary work, so guard leaves it to your permission settings. But that leaves a gap: if the agent deletes the wrong folder inside the project, guard had nothing to say.&lt;/p&gt;

&lt;h2&gt;
  
  
  0.4.18: undo, on by default
&lt;/h2&gt;

&lt;p&gt;Before each Bash or PowerShell command in Claude Code, guard copies the project folder's files on this PC, including ignored files like &lt;code&gt;.env&lt;/code&gt;. The copies stay on this PC.&lt;/p&gt;

&lt;p&gt;If something inside the project goes missing:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Run &lt;code&gt;/boxdawn-guard:undo&lt;/code&gt;. It lists the copies.&lt;/li&gt;
&lt;li&gt;Pick one. guard asks you to approve its own &lt;code&gt;undo restore&lt;/code&gt; line; that's the approval.&lt;/li&gt;
&lt;li&gt;guard saves the current state first, then restores. So a restore can be undone too.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;To turn it off, use the &lt;code&gt;undo&lt;/code&gt; option in &lt;code&gt;/plugin&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  What it costs
&lt;/h3&gt;

&lt;p&gt;On the projects I measured, under a second per command: 57 MB took 0.3 s, 632 MB took 0.75 s. The most is about 5 seconds. A folder with tens of thousands of subfolders takes about 3.5 s per command, and its copies are often not ready in time. A large project makes its first copy when the session starts (632 MB took 82 s), and commands before that aren't covered.&lt;/p&gt;

&lt;h3&gt;
  
  
  What it doesn't cover
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Only files inside the project folder.&lt;/li&gt;
&lt;li&gt;Not &lt;code&gt;.git&lt;/code&gt; (commits, branches, stash), not &lt;code&gt;node_modules&lt;/code&gt; and similar, not files over 50 MB.&lt;/li&gt;
&lt;li&gt;Not databases, cloud resources, or anything outside the folder.&lt;/li&gt;
&lt;li&gt;A session opened directly in your home folder, a drive root, Desktop, Documents, Downloads or OneDrive makes no copies. A project folder inside them works.&lt;/li&gt;
&lt;li&gt;It's for agent mistakes, not for an agent working against you. An agent can read and damage the copies too.&lt;/li&gt;
&lt;li&gt;The Copilot CLI edition makes no copies.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  If you turned undo on before 0.4.18
&lt;/h3&gt;

&lt;p&gt;The option that makes guard ask less about &lt;code&gt;git reset --hard&lt;/code&gt; and similar commands is now separate and off by default. Turn on &lt;code&gt;undo_instead_of_git_asks&lt;/code&gt; if you want it.&lt;/p&gt;

&lt;h2&gt;
  
  
  0.4.19: a line per deny and ask
&lt;/h2&gt;

&lt;p&gt;Each time a guard rule denies or asks, guard writes one line on this PC: when, which tool (Bash or PowerShell), the decision, the rule name, and whether the target was inside or outside the project. No command, no path, no reason text. This record is sent nowhere, on any plan.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;/boxdawn-guard:log&lt;/code&gt; shows the last 30 days counted by rule, plus the last 20 lines. This is the raw output from an isolated test; in a session, Claude explains it in your language:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Boxdawn guard: 2 deny and ask decisions on this machine, last 30 days.
No command or path is kept: only when, which tool, the decision and the guard's rules.

By reason (a decision with several reasons counts under each):
      2  deny  dd.outside  dd writing outside the project  (last 2026-11-25 11:53)

Last 2:
  2026-11-25 11:53  deny  Bash        dd.outside
  2026-11-25 11:53  deny  Bash        dd.outside
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It's on by default; the &lt;code&gt;judgment_log&lt;/code&gt; setting turns it off. Daily files older than 30 days are deleted either way. Read and Grep decisions aren't logged. The Copilot CLI edition keeps no log.&lt;/p&gt;

&lt;p&gt;0.4.19 changes no rule and no judging code. The rules are byte-for-byte the same as 0.4.18. It doesn't make guard safer. It makes what guard did visible.&lt;/p&gt;

&lt;p&gt;Repo and install: &lt;a href="https://github.com/boxdawn/guard" rel="noopener noreferrer"&gt;https://github.com/boxdawn/guard&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When an agent deleted something of yours, was it inside the project folder or outside?&lt;/p&gt;

</description>
      <category>claudecode</category>
      <category>ai</category>
      <category>devtools</category>
      <category>productivity</category>
    </item>
    <item>
      <title>My pre-run check for Claude Code asked on 916 of 9,574 commands from my history. Three releases later, 527.</title>
      <dc:creator>JEONSEWON</dc:creator>
      <pubDate>Sun, 22 Nov 2026 13:53:26 +0000</pubDate>
      <link>https://dev.to/boxdawn/my-pre-run-check-for-claude-code-asked-on-916-of-9574-commands-from-my-history-three-releases-3bp6</link>
      <guid>https://dev.to/boxdawn/my-pre-run-check-for-claude-code-asked-on-916-of-9574-commands-from-my-history-three-releases-3bp6</guid>
      <description>&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;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:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;S=/c/tools; $S/python.exe x.py
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;guard couldn't tell what &lt;code&gt;$S&lt;/code&gt; 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.&lt;/p&gt;

&lt;h2&gt;
  
  
  How I measured
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;9,574 Bash and PowerShell commands from my own Claude Code history, the same set for every version.&lt;/li&gt;
&lt;li&gt;Each command judged in the folder it ran in, with the environment values each version's hook passes, using guard's built-in rules.&lt;/li&gt;
&lt;li&gt;Run through 0.4.13, 0.4.14, 0.4.15 and 0.4.16. Measured Nov 22, 2026.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is the history of my own development work with Claude. It is not a sample of other users.&lt;/p&gt;

&lt;h2&gt;
  
  
  The numbers
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;0.4.13&lt;/th&gt;
&lt;th&gt;0.4.14&lt;/th&gt;
&lt;th&gt;0.4.15&lt;/th&gt;
&lt;th&gt;0.4.16&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;ask&lt;/td&gt;
&lt;td&gt;916&lt;/td&gt;
&lt;td&gt;605&lt;/td&gt;
&lt;td&gt;539&lt;/td&gt;
&lt;td&gt;527&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;deny&lt;/td&gt;
&lt;td&gt;97&lt;/td&gt;
&lt;td&gt;86&lt;/td&gt;
&lt;td&gt;86&lt;/td&gt;
&lt;td&gt;86&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;What moved from 0.4.13 to 0.4.14:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;312 went from ask to no decision.&lt;/li&gt;
&lt;li&gt;10 went from deny to no decision. All 10 delete inside the temp folder.&lt;/li&gt;
&lt;li&gt;1 went from deny to ask.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;What moved from 0.4.14 to 0.4.15:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;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 &lt;code&gt;==&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;1 went from no decision to ask.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;What moved from 0.4.15 to 0.4.16:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;12 went from ask to no decision. All 12 use &lt;code&gt;$APPDATA&lt;/code&gt; or &lt;code&gt;$LOCALAPPDATA&lt;/code&gt;. 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.&lt;/li&gt;
&lt;li&gt;Nothing else moved.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Examples
&lt;/h2&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;Asks that went away:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;command&lt;/th&gt;
&lt;th&gt;0.4.13&lt;/th&gt;
&lt;th&gt;0.4.14&lt;/th&gt;
&lt;th&gt;0.4.15&lt;/th&gt;
&lt;th&gt;0.4.16&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;S=/c/tools; $S/python.exe x.py&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;ask&lt;/td&gt;
&lt;td&gt;no decision&lt;/td&gt;
&lt;td&gt;no decision&lt;/td&gt;
&lt;td&gt;no decision&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;PY=/c/tools/python.exe; $PY -m pytest -q&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;ask&lt;/td&gt;
&lt;td&gt;no decision&lt;/td&gt;
&lt;td&gt;no decision&lt;/td&gt;
&lt;td&gt;no decision&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;for n in 1 2 3; do echo "item $n" &amp;gt; "note_$n.txt"; done&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;ask&lt;/td&gt;
&lt;td&gt;no decision&lt;/td&gt;
&lt;td&gt;no decision&lt;/td&gt;
&lt;td&gt;no decision&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;PYTHONPATH=. C:/tools/python.exe -m pytest -q&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;ask&lt;/td&gt;
&lt;td&gt;ask&lt;/td&gt;
&lt;td&gt;no decision&lt;/td&gt;
&lt;td&gt;no decision&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;sed -n 1,5p a.ts; echo ==; sed -n 9,12p a.ts&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;ask&lt;/td&gt;
&lt;td&gt;ask&lt;/td&gt;
&lt;td&gt;no decision&lt;/td&gt;
&lt;td&gt;no decision&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;C="$APPDATA/npm/copilot.cmd"; "$C" --help&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;ask&lt;/td&gt;
&lt;td&gt;ask&lt;/td&gt;
&lt;td&gt;ask&lt;/td&gt;
&lt;td&gt;no decision&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;"$LOCALAPPDATA/Programs/cursor/Cursor.exe" --version&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;ask&lt;/td&gt;
&lt;td&gt;ask&lt;/td&gt;
&lt;td&gt;ask&lt;/td&gt;
&lt;td&gt;no decision&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Reading the value doesn't only remove questions:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;command&lt;/th&gt;
&lt;th&gt;0.4.13&lt;/th&gt;
&lt;th&gt;0.4.14&lt;/th&gt;
&lt;th&gt;0.4.15&lt;/th&gt;
&lt;th&gt;0.4.16&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;X=rm; $X -rf ~&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;ask&lt;/td&gt;
&lt;td&gt;deny&lt;/td&gt;
&lt;td&gt;deny&lt;/td&gt;
&lt;td&gt;deny&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;for d in build /etc; do rm -rf "$d"; done&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;deny&lt;/td&gt;
&lt;td&gt;deny&lt;/td&gt;
&lt;td&gt;deny&lt;/td&gt;
&lt;td&gt;deny&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;rm -rf "$APPDATA"&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;deny&lt;/td&gt;
&lt;td&gt;deny&lt;/td&gt;
&lt;td&gt;deny&lt;/td&gt;
&lt;td&gt;deny&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;C="rm -rf"; $C ~&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;ask&lt;/td&gt;
&lt;td&gt;ask&lt;/td&gt;
&lt;td&gt;ask&lt;/td&gt;
&lt;td&gt;ask&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;X=eval; $X 'rm -rf ~'&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;ask&lt;/td&gt;
&lt;td&gt;ask&lt;/td&gt;
&lt;td&gt;ask&lt;/td&gt;
&lt;td&gt;ask&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;rm -rf ~&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;deny&lt;/td&gt;
&lt;td&gt;deny&lt;/td&gt;
&lt;td&gt;deny&lt;/td&gt;
&lt;td&gt;deny&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;code&gt;X=rm; $X -rf ~&lt;/code&gt; was a question in 0.4.13 because guard couldn't see what &lt;code&gt;$X&lt;/code&gt; was. Once it reads &lt;code&gt;X=rm&lt;/code&gt;, the line is &lt;code&gt;rm -rf ~&lt;/code&gt;, which reaches outside the project, so it is denied.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;for&lt;/code&gt; line and &lt;code&gt;rm -rf "$APPDATA"&lt;/code&gt; are denied in every version, but the reason changed. In 0.4.13 the &lt;code&gt;for&lt;/code&gt; line was denied because the delete path was only known at run time; from 0.4.14 it's because &lt;code&gt;/etc&lt;/code&gt; is outside the project. &lt;code&gt;rm -rf "$APPDATA"&lt;/code&gt; 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.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;C="rm -rf"; $C ~&lt;/code&gt; still asks in all four versions. There the shell splits the value into words when it runs, and guard asks. &lt;code&gt;X=eval; $X 'rm -rf ~'&lt;/code&gt; asks too.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I can and can't say from this
&lt;/h2&gt;

&lt;p&gt;On this history, the only lines that moved from deny to no decision were deletes inside the temp folder.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;guard is free and source-available (FSL-1.1-ALv2).&lt;/p&gt;

&lt;p&gt;Repo: &lt;a href="https://github.com/boxdawn/guard" rel="noopener noreferrer"&gt;https://github.com/boxdawn/guard&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;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.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>claudecode</category>
      <category>devtools</category>
      <category>security</category>
    </item>
    <item>
      <title>I ran 107 commands from real Claude Code incident reports through my pre-run check. Here is where it stays silent.</title>
      <dc:creator>JEONSEWON</dc:creator>
      <pubDate>Fri, 20 Nov 2026 11:10:54 +0000</pubDate>
      <link>https://dev.to/boxdawn/i-ran-107-commands-from-real-claude-code-incident-reports-through-my-pre-run-check-here-is-where-10ll</link>
      <guid>https://dev.to/boxdawn/i-ran-107-commands-from-real-claude-code-incident-reports-through-my-pre-run-check-here-is-where-10ll</guid>
      <description>&lt;p&gt;AI coding agents run shell commands on your machine. Most of the time that is fine. Sometimes it is &lt;code&gt;rm -rf&lt;/code&gt; in the wrong folder, a dropped production table, or a &lt;code&gt;git reset --hard&lt;/code&gt; over a day of uncommitted work. Public Claude Code issue reports have plenty of these.&lt;/p&gt;

&lt;p&gt;I build guard, a pre-run check for Claude Code and GitHub Copilot CLI. This post is about what it does with the commands from those reports, and mostly about the ones it gives no decision on.&lt;/p&gt;

&lt;h2&gt;
  
  
  Three answers, and no "allow"
&lt;/h2&gt;

&lt;p&gt;guard reads each shell command before it runs and gives one of three answers.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Deny.&lt;/strong&gt; &lt;code&gt;rm -rf ~&lt;/code&gt; reaches outside the project, so it does not run.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ask.&lt;/strong&gt; &lt;code&gt;git reset --hard&lt;/code&gt; discards uncommitted work, so you are asked first, with that reason attached. Reading a secret file like &lt;code&gt;.env&lt;/code&gt; through a shell command is asked too.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No decision.&lt;/strong&gt; &lt;code&gt;npm test&lt;/code&gt; gets nothing. guard says nothing, and your agent's own permission settings decide what happens next.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It never answers "allow": it only ever adds a deny or a question. Your permission settings still decide everything else, so they still matter after you install it.&lt;/p&gt;

&lt;h2&gt;
  
  
  107 commands from incident reports
&lt;/h2&gt;

&lt;p&gt;I collected commands quoted in public anthropics/claude-code issue reports about destructive commands: 107 commands from 83 reports. On guard 0.4.11:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Decision&lt;/th&gt;
&lt;th&gt;Count&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Deny&lt;/td&gt;
&lt;td&gt;24&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Ask&lt;/td&gt;
&lt;td&gt;52&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;No decision&lt;/td&gt;
&lt;td&gt;31&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Before you read anything into that: this is the list I wrote guard's rules against. It describes this list. It is not a catch rate for incidents guard has never seen, and I don't have that number yet.&lt;/p&gt;

&lt;p&gt;How it was run: the commands were judged, not run, in one made-up project folder. Where a report didn't say which shell, I tried Bash and PowerShell and counted the stronger result. Some entries are fragments or contain placeholders like &lt;code&gt;&amp;lt;repo&amp;gt;&lt;/code&gt;, entered as the reporter wrote them, so a few would be judged differently written out in full.&lt;/p&gt;

&lt;h2&gt;
  
  
  The 31 with no decision
&lt;/h2&gt;

&lt;p&gt;"No decision" does not mean nobody was asked. Claude Code's own permission check may still have stepped in. It means guard had nothing to say. Here are the groups I have written up so far.&lt;/p&gt;

&lt;h3&gt;
  
  
  Databases: the SQL never reaches the shell
&lt;/h3&gt;

&lt;p&gt;Six lines came from five reports. Three are bare SQL (&lt;code&gt;DROP DATABASE&lt;/code&gt;, &lt;code&gt;DROP SCHEMA CASCADE&lt;/code&gt;, &lt;code&gt;DROP TABLE poc_staging&lt;/code&gt;), two are subcommands with the program name missing (&lt;code&gt;migrate:fresh&lt;/code&gt;, &lt;code&gt;doctrine:fixtures:load --no-interaction&lt;/code&gt;), and one is &lt;code&gt;prisma db push&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The reports show the SQL but not what sent it. guard reads shell command lines, and a bare &lt;code&gt;DROP TABLE&lt;/code&gt; is not one. When I wrap the same SQL in &lt;code&gt;psql -c&lt;/code&gt; myself, it is denied, but I built that form; if the SQL went through a database tool or an MCP server, guard never sees the call. Written in full, the two fragments are asked. &lt;code&gt;prisma db push&lt;/code&gt; is an everyday schema command with no rule; in that report the data went when Prisma offered a reset and the session accepted it.&lt;/p&gt;

&lt;h3&gt;
  
  
  Scripts: the damage was inside the file
&lt;/h3&gt;

&lt;p&gt;Four lines from three reports share one shape. The agent ran a script, and the line that did the damage was inside it.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;timeout 60 node postmessage-bench.mjs&lt;/code&gt;: the script called &lt;code&gt;process.kill(-1, SIGKILL)&lt;/code&gt; and killed every process the user owned.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;bash /tmp/.../test-lib-demo.sh&lt;/code&gt;: inside it, &lt;code&gt;trap 'rm -rf "$_HT_HOME"' EXIT&lt;/code&gt;, and &lt;code&gt;_HT_HOME&lt;/code&gt; had become &lt;code&gt;$HOME&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;&amp;amp; "...\junction-test.ps1"&lt;/code&gt;: a failed &lt;code&gt;Push-Location&lt;/code&gt; inside the script left &lt;code&gt;git clean -xdff&lt;/code&gt; running at the workspace root.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;guard reads the command line. It does not open the script file, and in all three the command line only said "run this script". The reporter of the third one had a deny rule for &lt;code&gt;git clean -f*&lt;/code&gt; and their own pre-tool hook. Neither matched, because the tool call was a script path. I don't have a good answer here. Asking on every script run means asking all day, and reading the file means trusting something that can change between the check and the run.&lt;/p&gt;

&lt;h3&gt;
  
  
  Docker: some cleanup is asked, some is not
&lt;/h3&gt;

&lt;p&gt;Two lines are Docker cleanup. &lt;code&gt;docker network prune -f&lt;/code&gt; removed unused networks across the whole daemon, including other projects' networks on the same machine; in that report the user ran it after the agent called it optional and safe. &lt;code&gt;docker stop n8n &amp;amp;&amp;amp; docker rm n8n&lt;/code&gt; removed a container with no volume mount, and the workflows, credentials and history inside it were gone.&lt;/p&gt;

&lt;p&gt;On 0.4.11, &lt;code&gt;docker volume rm&lt;/code&gt; is asked, and &lt;code&gt;docker system&lt;/code&gt;, &lt;code&gt;volume&lt;/code&gt; and &lt;code&gt;image prune&lt;/code&gt; are asked. &lt;code&gt;docker network&lt;/code&gt;, &lt;code&gt;container&lt;/code&gt; and &lt;code&gt;builder prune&lt;/code&gt;, and &lt;code&gt;docker rm&lt;/code&gt; of a container, get no decision. So "guard asks about docker prune" would be too broad.&lt;/p&gt;

&lt;h3&gt;
  
  
  Inside the project folder
&lt;/h3&gt;

&lt;p&gt;guard looks at where a delete lands more than what it deletes. Inside the project folder, &lt;code&gt;rm -rf build&lt;/code&gt; and &lt;code&gt;rm -rf src&lt;/code&gt; both get no decision, and your permission settings decide. Outside it, &lt;code&gt;rm -rf ../other-project&lt;/code&gt; and &lt;code&gt;rm -rf ~&lt;/code&gt; are denied. My reasoning was that asking on every delete inside the project would train you to click yes on &lt;code&gt;node_modules&lt;/code&gt; and &lt;code&gt;build&lt;/code&gt; until the question means nothing. The cost is that &lt;code&gt;src&lt;/code&gt; is in the same bucket, and I haven't solved that.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I'd like to hear
&lt;/h2&gt;

&lt;p&gt;If an agent has deleted something of yours, I'd like to know the command and how it got sent. The reports often leave out the part that matters: was it a shell line, a script, a database tool? And if you use guard, tell me which "no decision" you would want turned into a question.&lt;/p&gt;

&lt;p&gt;guard is free and source-available (FSL-1.1-ALv2). Claude Code on Windows, macOS and Linux. GitHub Copilot CLI is tested on Windows only so far.&lt;/p&gt;

&lt;p&gt;Repo: &lt;a href="https://github.com/boxdawn/guard" rel="noopener noreferrer"&gt;https://github.com/boxdawn/guard&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;I wrote this with help from an AI assistant, which I also used to draft and check the numbers against guard's code. The measurements were run with it under my direction, and the decisions in this post are mine.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>claudecode</category>
      <category>ai</category>
      <category>security</category>
      <category>devtools</category>
    </item>
  </channel>
</rss>
