<?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: the kilted dev</title>
    <description>The latest articles on DEV Community by the kilted dev (@thekilteddev).</description>
    <link>https://dev.to/thekilteddev</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%2F4030958%2Fc40140e1-f5ac-4668-9b6b-166ea0ddc762.png</url>
      <title>DEV Community: the kilted dev</title>
      <link>https://dev.to/thekilteddev</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/thekilteddev"/>
    <language>en</language>
    <item>
      <title>The test that passed a bug</title>
      <dc:creator>the kilted dev</dc:creator>
      <pubDate>Sat, 28 Nov 2026 08:53:11 +0000</pubDate>
      <link>https://dev.to/thekilteddev/the-test-that-passed-a-bug-3de3</link>
      <guid>https://dev.to/thekilteddev/the-test-that-passed-a-bug-3de3</guid>
      <description>&lt;div&gt;
    &lt;iframe src="https://www.youtube.com/embed/uoL7tZFAd_o" width="315" height="560"&gt;
    &lt;/iframe&gt;
  &lt;/div&gt;


&lt;p&gt;The tool was unlazy, an anti-laziness skill for coding agents (Claude Code, Codex, Cursor) that&lt;br&gt;
gates file changes behind discipline checks, offers an optional Stop hook (a mechanism that can&lt;br&gt;
block a session from finishing until its own checks pass) as an enforcement layer, and can&lt;br&gt;
decompose a larger build into an orchestrated tree of sub-tasks. It surfaced the same way a lot of&lt;br&gt;
noise does: an Instagram reel with a repo link. Most of those don't survive a second look. This&lt;br&gt;
one did. A repository, a README, a terminal on screen, a named developer. Nothing hidden. A direct&lt;br&gt;
read of its two Node scripts, &lt;code&gt;stop-hook.mjs&lt;/code&gt; and &lt;code&gt;install-hooks.mjs&lt;/code&gt;, confirmed it: no network&lt;br&gt;
calls, no obfuscation, the hook installer scoped to the project by default rather than reaching&lt;br&gt;
for anything global.&lt;/p&gt;

&lt;p&gt;Clean enough to be worth an opinion. The request was for something stronger than an opinion: a&lt;br&gt;
trial.&lt;/p&gt;

&lt;h2&gt;
  
  
  Designing an experiment instead of forming an impression
&lt;/h2&gt;

&lt;p&gt;The obvious way to trial a discipline tool is to run it once, read the output, and decide whether&lt;br&gt;
it feels more careful. That's not a trial, it's a vibe check, and it's exactly the kind of soft&lt;br&gt;
verdict this hub tries to avoid. So the design went further: two conditions, run per round. A&lt;br&gt;
baseline build, doing the task the ordinary way. A second, disciplined build, running under&lt;br&gt;
unlazy's own gates. Same task, same prompt, dispatched into two isolated scratch folders.&lt;/p&gt;

&lt;p&gt;Then the part that matters. Neither build graded itself. A third, independent agent verified both&lt;br&gt;
outputs instead, handed only two neutrally-named folders, explicitly told never to open either&lt;br&gt;
build's own self-report or test files, and instructed to test live behaviour itself rather than&lt;br&gt;
trust anything either build claimed about its own work.&lt;/p&gt;

&lt;h2&gt;
  
  
  Round 1: a null result
&lt;/h2&gt;

&lt;p&gt;The first round was deliberately easy, a 3-page site with form validation and a responsive layout.&lt;br&gt;
The blind verifier found both builds functionally equivalent: every requirement passed, on both.&lt;br&gt;
The disciplined build cost roughly 2.5x the wall time, 1.9x the tool calls, and 1.4x the tokens of&lt;br&gt;
the baseline, for zero measurable benefit.&lt;/p&gt;

&lt;p&gt;That's not a footnote to bury. It's the shape of the result: the task was small enough that&lt;br&gt;
a careful single pass already got it right, which is exactly the case unlazy's own README admits&lt;br&gt;
it isn't built to help with. A trial that only reports the round where the tool wins isn't a&lt;br&gt;
trial. It's marketing with extra steps.&lt;/p&gt;

&lt;h2&gt;
  
  
  Round 2: the test that lied
&lt;/h2&gt;

&lt;p&gt;The second round raised the difficulty on purpose: a CSV-to-JSON command-line tool with fifteen&lt;br&gt;
distinct edge cases to handle correctly, built under unlazy's orchestrated mode, the build broken&lt;br&gt;
into a tree of sub-tasks four layers deep. Same structure. Baseline and disciplined build,&lt;br&gt;
dispatched blind, verified by a third agent that had no access to either build's own account of&lt;br&gt;
itself.&lt;/p&gt;

&lt;p&gt;This time the blind verifier didn't just re-run existing checks. It wrote its own fixtures from&lt;br&gt;
scratch, working from the original requirements rather than either build's interpretation of them.&lt;br&gt;
That's what caught it: a reproducible bug in the baseline build. A trailing blank line at the end&lt;br&gt;
of the input file threw an error instead of being silently ignored, exactly the kind of edge case&lt;br&gt;
a spec-writer expects a competent tool to handle. The disciplined build handled it correctly.&lt;/p&gt;

&lt;p&gt;Here's the part that makes it more than a bug report. The baseline build's own, self-authored test&lt;br&gt;
suite had reported that exact case as passing. The code was wrong, and the tests written by the&lt;br&gt;
same process that wrote the code agreed with it.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Round&lt;/th&gt;
&lt;th&gt;Task&lt;/th&gt;
&lt;th&gt;Wall time&lt;/th&gt;
&lt;th&gt;Tool calls&lt;/th&gt;
&lt;th&gt;Tokens&lt;/th&gt;
&lt;th&gt;Outcome&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;1 (easy)&lt;/td&gt;
&lt;td&gt;3-page site, form validation, responsive layout&lt;/td&gt;
&lt;td&gt;~2.5x&lt;/td&gt;
&lt;td&gt;~1.9x&lt;/td&gt;
&lt;td&gt;~1.4x&lt;/td&gt;
&lt;td&gt;Builds equivalent, no measurable benefit&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;2 (hard)&lt;/td&gt;
&lt;td&gt;CSV-to-JSON CLI, 15 edge cases, tree depth 4&lt;/td&gt;
&lt;td&gt;~4.7x&lt;/td&gt;
&lt;td&gt;~4.2x&lt;/td&gt;
&lt;td&gt;~1.6x&lt;/td&gt;
&lt;td&gt;Baseline shipped a bug its own tests missed; disciplined build caught it&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;em&gt;All costs relative to that round's baseline build (1x).&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Why the verifier had to be blind
&lt;/h2&gt;

&lt;p&gt;This is the actual finding, and it isn't about unlazy at all. When one process writes both the&lt;br&gt;
implementation and the tests for it in the same continuous pass, the tests inherit whatever the&lt;br&gt;
implementation got wrong. If the code never considered a trailing blank line, the tests it writes&lt;br&gt;
for itself won't consider one either, not because of carelessness, but because both the mistake&lt;br&gt;
and the blind spot came from the exact same reasoning.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;A test suite written by the code's own author can confirm the code does what its author thinks&lt;br&gt;
it does. It can't tell you what its author never thought of.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Re-running the builder's own tests against a second build proves nothing about that gap. It just&lt;br&gt;
re-asks the same question the builder already answered. A verifier that works from the original&lt;br&gt;
spec instead, with no visibility into either build's self-report, has no reason to share that&lt;br&gt;
blind spot. That's the only reason round 2 produced a decisive result instead of two builds that&lt;br&gt;
both claimed to pass.&lt;/p&gt;

&lt;h2&gt;
  
  
  What this piece owes the reader
&lt;/h2&gt;

&lt;p&gt;One thing this trial did not confirm, and shouldn't be allowed to quietly imply: whether unlazy's&lt;br&gt;
own Stop hook actually engaged during either round. Both builds ran as subagent dispatches inside&lt;br&gt;
an existing session, not as fully separate Claude Code sessions. Whether that dispatch path goes&lt;br&gt;
through the same hook pipeline a separately-launched session would use is unconfirmed. An&lt;br&gt;
unrelated authentication limitation on the machine running the trial ruled out a true&lt;br&gt;
isolated-session test. Not a choice.&lt;/p&gt;

&lt;p&gt;So the finding here is narrower than "unlazy's hook mechanism improved the output," and should be&lt;br&gt;
reported that way. What the trial actually demonstrated is that a build carried out under unlazy's&lt;br&gt;
discipline (whatever combination of prompt framing, gates, and possibly hook enforcement produced&lt;br&gt;
it) caught something the baseline build and its own tests missed. It's the &lt;em&gt;method&lt;/em&gt; of blind,&lt;br&gt;
spec-driven verification that surfaced it. Whether the hook itself was the load-bearing mechanism&lt;br&gt;
is an open question this trial can't answer, and this piece says so rather&lt;br&gt;
than rounding up to a cleaner story.&lt;/p&gt;

&lt;h2&gt;
  
  
  The verdict
&lt;/h2&gt;

&lt;p&gt;Filed as trialled, not adopted outright and not dismissed. The real, disclosed limitation above&lt;br&gt;
means it can't be filed as a clean mechanistic win. But the result that did survive verification is&lt;br&gt;
real: on a task with enough discrete edge cases that a careful single pass, and a self-authored&lt;br&gt;
test suite, can plausibly miss one, the disciplined build caught something the baseline confidently&lt;br&gt;
got wrong. On the easy round, it added cost for nothing. The recommendation is task-shaped,&lt;br&gt;
not blanket: worth reaching for on multi-edge-case builds, not worth it on anything a single&lt;br&gt;
careful pass already handles well.&lt;/p&gt;

&lt;h2&gt;
  
  
  It generalizes past this one tool
&lt;/h2&gt;

&lt;p&gt;The reusable part isn't the specific tool, it's the verification pattern: a blind agent, working&lt;br&gt;
from the original spec, that writes its own fixtures instead of re-running whatever the build&lt;br&gt;
under test already claims passes. Any tool that markets itself as improving completeness or&lt;br&gt;
correctness deserves exactly this kind of check before its claim gets believed, because the&lt;br&gt;
alternative, letting a build (or its author) grade its own homework, is precisely the setup that&lt;br&gt;
let a bug slip past the very test suite meant to catch it.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://thekilted.dev/the-test-that-passed-a-bug/" rel="noopener noreferrer"&gt;thekilted.dev/the-test-that-passed-a-bug&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>aiagents</category>
      <category>buildinpublic</category>
      <category>devlog</category>
      <category>softwareengineering</category>
    </item>
    <item>
      <title>Indistinguishable from malware</title>
      <dc:creator>the kilted dev</dc:creator>
      <pubDate>Sat, 21 Nov 2026 09:09:19 +0000</pubDate>
      <link>https://dev.to/thekilteddev/indistinguishable-from-malware-5am6</link>
      <guid>https://dev.to/thekilteddev/indistinguishable-from-malware-5am6</guid>
      <description>&lt;div&gt;
    &lt;iframe src="https://www.youtube.com/embed/Kub-TZMb2Y0" width="315" height="560"&gt;
    &lt;/iframe&gt;
  &lt;/div&gt;


&lt;h2&gt;
  
  
  The build
&lt;/h2&gt;

&lt;p&gt;Terminal Relay is a small, purpose-built tool. Instead of an AI coding assistant printing a shell&lt;br&gt;
command in chat for a human to copy, paste, and report back on, it writes the command into a&lt;br&gt;
shared queue folder. A &lt;code&gt;relay-watch.ps1&lt;/code&gt; script, started by the human in their own terminal and&lt;br&gt;
never spawned by the assistant, polls that folder, shows the command, and requires either a&lt;br&gt;
keypress or an allowlist match before running it. A short, fixed list of command classes&lt;br&gt;
(registry edits, firewall rules, local-user changes) is hard-excluded from the allowlist entirely.&lt;br&gt;
No pattern can auto-approve them, ever.&lt;/p&gt;

&lt;p&gt;It went through six-plus rounds of adversarial review before anyone trusted it with a real&lt;br&gt;
command. The first pass alone found a wildcard bypass that could let one narrow approved pattern&lt;br&gt;
auto-run an arbitrary trailing payload, and a decline gate that would run the command on anything&lt;br&gt;
typed except the literal word "skip." A second, five-angle review pass found nine more holes.&lt;br&gt;
Three of those angles, working independently, converged on the same pipe-chaining bypass, usually&lt;br&gt;
a sign the bug is real, not a fluke of one reviewer's imagination.&lt;/p&gt;

&lt;p&gt;The hardest bug took three attempts. The danger was a TOCTOU race: verify a command is safe, then&lt;br&gt;
execute it, with a gap in between where the thing on disk could change. Attempt one re-checked,&lt;br&gt;
then executed the original file by its path. Exploitable in 19 of 30 trials. Attempt two&lt;br&gt;
re-checked, then executed a fresh copy in a new temp file instead. Exploitable in 14 of 15 trials,&lt;br&gt;
and &lt;em&gt;worse&lt;/em&gt;: a wider window, not a narrower one. Both failed for the identical structural reason.&lt;br&gt;
Routing a verified command through any file a child process reopens is racy, no matter which file&lt;br&gt;
it is. After the second attempt failed too, and a third fix was about to be dispatched, the person&lt;br&gt;
overseeing the review stopped it and named what was actually happening: the fix loop had turned&lt;br&gt;
into a doom loop, chasing the same mistake through cosmetic variations instead of questioning the&lt;br&gt;
approach itself. Attempt three abandoned files entirely. The verified command's exact bytes get&lt;br&gt;
handed straight to the child process's own encoded-command argument, with no file in the execution&lt;br&gt;
path at all. A positive-control test reconstructed attempt one's approach to confirm it was still&lt;br&gt;
exploitable, then ran the same timing sweep against the new approach: zero exploits in 21 tries.&lt;/p&gt;

&lt;p&gt;By the end of that process the tool had been checked against a plain success, a deliberate&lt;br&gt;
hard-excluded registry write, a genuine failure with a readable error, and a mid-run crash of its&lt;br&gt;
own archive folders. It recovered cleanly from every one, live, in front of the person using it.&lt;/p&gt;

&lt;h2&gt;
  
  
  The collision
&lt;/h2&gt;

&lt;p&gt;The first time the tool got used for something real instead of its own testing, the antivirus&lt;br&gt;
software already running on the machine blocked it. Not a signature match against a known-bad&lt;br&gt;
file. Avast's Behavior Shield, which watches what a running process actually does rather than what&lt;br&gt;
it looks like on disk. It blocked the relay twice, in one sitting.&lt;/p&gt;

&lt;p&gt;The task itself was mundane: launch a separate, unrelated tool called wmux (a terminal-workspace&lt;br&gt;
manager) through the relay instead of by hand. Before the relay could even run, &lt;code&gt;relay-watch.ps1&lt;/code&gt;&lt;br&gt;
itself turned out to already be sitting in Avast's quarantine, flagged as &lt;code&gt;IDP.HELU.PSE87&lt;/code&gt;,&lt;br&gt;
collateral from the exact code-hardening work described above, caught by the same overnight&lt;br&gt;
cloud-reputation sweep, not anything in that session. Restoring it from quarantine let the relay&lt;br&gt;
start. Running it did not let the command through: Avast's Behavior Shield killed the child&lt;br&gt;
process the relay spawns for every approved command, the same &lt;code&gt;-EncodedCommand&lt;/code&gt; mechanism built&lt;br&gt;
specifically to close the TOCTOU race, not once but twice, confirmed by matching the antivirus's&lt;br&gt;
own block timestamp to the relay's log within one second.&lt;/p&gt;

&lt;p&gt;This is the shape of the story. To a heuristic scanner, the fix that made the tool safe against a&lt;br&gt;
deliberate attacker looks exactly like an attacker's own obfuscated payload. Passing verified bytes&lt;br&gt;
straight into an encoded PowerShell argument with no file to race is good security engineering. It&lt;br&gt;
is also, by pattern, indistinguishable from malware.&lt;/p&gt;

&lt;p&gt;A narrower fix was tried: a Command-Line-scoped Avast exception naming the exact invocation. It&lt;br&gt;
did not work. Avast's matching there requires an exact literal argument match, and the payload is&lt;br&gt;
encoded differently on every single run, so no static exception can generalize to it. Even if it&lt;br&gt;
had worked, it would have been the wrong fix: the only way to make a Command-Line exception match&lt;br&gt;
a different payload every time is to loosen it into a wildcard, which would also stop Avast from&lt;br&gt;
catching a real attacker's own encoded PowerShell command on this machine. The exception was&lt;br&gt;
reverted for exactly that reason. A fix that trades real detection coverage for zero actual&lt;br&gt;
benefit is not a fix.&lt;/p&gt;

&lt;p&gt;A second, separate bug came out of the same incident. The relay's own result file reported&lt;br&gt;
&lt;code&gt;exitCode: 0&lt;/code&gt;, success, on at least one run that had actually been silently killed by the&lt;br&gt;
antivirus. The tool, meant never to hide a failure, could not yet tell the difference between&lt;br&gt;
"ran" and "was stopped without anyone being told."&lt;/p&gt;

&lt;p&gt;Nine more Behavior Shield alerts followed, hours later, on a different but related class of file:&lt;br&gt;
old proof-of-concept scripts left over from the TOCTOU testing itself, the literal exploit&lt;br&gt;
reproductions written to prove the bugs were real before fixing them. All nine were traced and&lt;br&gt;
confirmed as the same false-positive pattern, on files that had already been deleted during the&lt;br&gt;
original session's own cleanup roughly eleven hours before the alert, consistent with a delayed&lt;br&gt;
cloud-reputation verdict on old files, not anything currently running.&lt;/p&gt;

&lt;h2&gt;
  
  
  What actually happened
&lt;/h2&gt;

&lt;p&gt;Nothing here is fixed. The relay is not currently trusted to run wider than the one project that&lt;br&gt;
built it, and that's stated as the actual reason, not softened: on this machine, with this&lt;br&gt;
antivirus, in this configuration, the tool cannot currently guarantee it did what it reported&lt;br&gt;
doing. That's a harder problem than the TOCTOU race was. TOCTOU had an available fix once the&lt;br&gt;
approach changed. Telling "succeeded" apart from "silently blocked by a third party watching the&lt;br&gt;
same process" is a different kind of problem, and it's still open.&lt;/p&gt;

&lt;p&gt;Two threads remain, deliberately not tied off: whether the relay can be made to detect an&lt;br&gt;
antivirus-killed child process instead of reporting false success, and whether a narrower,&lt;br&gt;
Behavior-Shield-specific exception mechanism exists that doesn't trade away real detection coverage&lt;br&gt;
the way the Command-Line one did. Neither has been tried yet.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://thekilted.dev/indistinguishable-from-malware/" rel="noopener noreferrer"&gt;thekilted.dev/indistinguishable-from-malware&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>infosec</category>
      <category>buildinpublic</category>
      <category>devlog</category>
      <category>softwareengineering</category>
    </item>
    <item>
      <title>No Reason to Be Kind</title>
      <dc:creator>the kilted dev</dc:creator>
      <pubDate>Sat, 14 Nov 2026 07:54:56 +0000</pubDate>
      <link>https://dev.to/thekilteddev/no-reason-to-be-kind-il1</link>
      <guid>https://dev.to/thekilteddev/no-reason-to-be-kind-il1</guid>
      <description>&lt;div&gt;
    &lt;iframe src="https://www.youtube.com/embed/w_gysbR0OVE" width="315" height="560"&gt;
    &lt;/iframe&gt;
  &lt;/div&gt;


&lt;p&gt;SuperClaude is the same configuration layer for Claude Code covered here before: slash commands,&lt;br&gt;
agents, behavioural modes, fifty-seven items in the catalogue in total. Two of them were already&lt;br&gt;
out. &lt;code&gt;/sc:pm&lt;/code&gt; turned out to be a session-management layer built entirely from calls to a server&lt;br&gt;
this setup doesn't run. Deep Research mode wanted to run unbounded, multi-hop searches with no&lt;br&gt;
cost gate in sight. Out of everything left, this setup kept exactly one command:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;› /sc:spec-panel&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Fifty-seven items in the catalogue. One command kept.&lt;/p&gt;
&lt;h2&gt;
  
  
  What it actually is
&lt;/h2&gt;

&lt;p&gt;No install, no MCP (Model Context Protocol) server, no dependency on the rest of the framework. The&lt;br&gt;
command file is a single prompt, about four hundred and forty lines long, that assembles a panel of&lt;br&gt;
real named software engineers and has each one critique a document through their own actual&lt;br&gt;
documented methodology.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Expert&lt;/th&gt;
&lt;th&gt;Methodology&lt;/th&gt;
&lt;th&gt;Sample critique it's instructed to ask&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Karl Wiegers — Requirements engineering pioneer, author of &lt;em&gt;Software Requirements&lt;/em&gt;
&lt;/td&gt;
&lt;td&gt;SMART criteria, testability analysis, stakeholder validation&lt;/td&gt;
&lt;td&gt;"This requirement lacks measurable acceptance criteria. How would you validate compliance in production?"&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Gojko Adzic — Creator of Specification by Example&lt;/td&gt;
&lt;td&gt;Given/When/Then scenarios, example-driven requirements, collaborative specification&lt;/td&gt;
&lt;td&gt;"Can you provide concrete examples demonstrating this requirement in real-world scenarios?"&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Alistair Cockburn — Use-case methodology pioneer, Agile Manifesto co-author&lt;/td&gt;
&lt;td&gt;Goal-oriented analysis, primary-actor identification, scenario modeling&lt;/td&gt;
&lt;td&gt;"Who is the primary stakeholder here, and what business goal are they trying to achieve?"&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Martin Fowler — Software architecture and refactoring, Thoughtworks&lt;/td&gt;
&lt;td&gt;Interface segregation, bounded contexts, refactoring patterns&lt;/td&gt;
&lt;td&gt;"This interface violates the single responsibility principle. Consider separating concerns."&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Michael Nygard — Author of &lt;em&gt;Release It!&lt;/em&gt;
&lt;/td&gt;
&lt;td&gt;Failure-mode analysis, circuit-breaker patterns, operational excellence&lt;/td&gt;
&lt;td&gt;"What happens when this component fails? Where are the monitoring and recovery mechanisms?"&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Sam Newman — Microservices and distributed systems author&lt;/td&gt;
&lt;td&gt;Service decomposition, API versioning, distributed system patterns&lt;/td&gt;
&lt;td&gt;"How does this specification handle service evolution and backward compatibility?"&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Gregor Hohpe — Co-author, &lt;em&gt;Enterprise Integration Patterns&lt;/em&gt;
&lt;/td&gt;
&lt;td&gt;Message-driven architecture, integration patterns, event-driven design&lt;/td&gt;
&lt;td&gt;"What's the message exchange pattern here? How do you handle ordering and delivery guarantees?"&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Lisa Crispin — Agile testing author&lt;/td&gt;
&lt;td&gt;Whole-team, risk-based testing, quality attribute specification&lt;/td&gt;
&lt;td&gt;"How would the testing team validate this requirement? What are the edge cases and failure scenarios?"&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Janet Gregory — Testing advocate, co-author with Crispin&lt;/td&gt;
&lt;td&gt;Specification workshops, "three amigos", quality conversation facilitation&lt;/td&gt;
&lt;td&gt;"Did the whole team participate in creating this specification? Are quality expectations clearly defined?"&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Kelsey Hightower — Cloud-native and Kubernetes advocate&lt;/td&gt;
&lt;td&gt;Cloud-native patterns, infrastructure automation, operational observability&lt;/td&gt;
&lt;td&gt;"How does this handle cloud-native deployment and operational concerns?"&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The command does not throw all ten at every document. A focus flag picks a smaller panel suited to&lt;br&gt;
the document's shape:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Focus&lt;/th&gt;
&lt;th&gt;Panel (lead first)&lt;/th&gt;
&lt;th&gt;For&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;requirements&lt;/td&gt;
&lt;td&gt;Wiegers, Adzic, Cockburn&lt;/td&gt;
&lt;td&gt;Constraints and requirement lists&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;architecture&lt;/td&gt;
&lt;td&gt;Fowler, Newman, Hohpe, Nygard&lt;/td&gt;
&lt;td&gt;System-design and interface documents&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;testing&lt;/td&gt;
&lt;td&gt;Crispin, Gregory, Adzic&lt;/td&gt;
&lt;td&gt;Test strategy, acceptance-criteria coverage&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;compliance&lt;/td&gt;
&lt;td&gt;Wiegers, Nygard, Hightower&lt;/td&gt;
&lt;td&gt;Security, audit, operational-risk documents&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Native invocation, straight from the framework, takes a mode, an expert list, a focus area and a&lt;br&gt;
format. On this setup it runs differently: as a promoted Claude Code skill, called directly rather&lt;br&gt;
than through the framework:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Skill({ skill: "spec-panel", args: "@&amp;lt;path-to-file&amp;gt; --mode critique --focus requirements --format standard" })
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The skill hands back the expert-panel prompt. The calling session then reads the actual target file&lt;br&gt;
and performs the critique itself, with context on the file's intent an outside reviewer would never&lt;br&gt;
have.&lt;/p&gt;

&lt;h2&gt;
  
  
  Proving it before trusting it
&lt;/h2&gt;

&lt;p&gt;A prompt file assembling ten famous names is easy to admire and easy to fool yourself about. Before&lt;br&gt;
this one went anywhere beyond the project that pulled it out, its first two real findings were&lt;br&gt;
sent, unprompted, to the actual owner of a document it had never seen — a cross-project routing&lt;br&gt;
policy belonging to a different project on this same setup — an owner with no reason to accept&lt;br&gt;
anything from a tool it had never asked for.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"immediately" unmeasurable; no story for a nudge whose target session never reopens&lt;/p&gt;

&lt;p&gt;undefined trigger words ("long"/"multi-step"/"low-interaction"); no positive-compliance example; prior fix not tied back to existing dispatch machinery&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Both were accepted and implemented independently. That was the bar spec-panel had to clear before&lt;br&gt;
it became a shared command available to every project on the setup. Not "this sounds like good&lt;br&gt;
advice." The document's actual owner read it and changed the rule.&lt;/p&gt;

&lt;h2&gt;
  
  
  The receipts
&lt;/h2&gt;

&lt;p&gt;&lt;em&gt;That is a snapshot of a running log, taken for this piece, not a constant.&lt;/em&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Document type&lt;/th&gt;
&lt;th&gt;What was found&lt;/th&gt;
&lt;th&gt;Fixed?&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;A cross-project dispatch and routing policy document&lt;/td&gt;
&lt;td&gt;"queued send_message result never stated as success vs. pending"&lt;/td&gt;
&lt;td&gt;1/1&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;The same policy document, self-reviewed later by its own owning project&lt;/td&gt;
&lt;td&gt;"misroute schema self-contradiction; concurrent-append atomicity assumed, never stated; no catastrophic-corruption recovery stance; decided_by audit loop was write-only; Codex graduation bar undefined; deep-research compliance check had no numeric floor"&lt;/td&gt;
&lt;td&gt;6/6&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;A trading-analytics project's own constraints file&lt;/td&gt;
&lt;td&gt;"stale duplicate-SELL-gap claim (fixed in code, doc never updated); Current-Release section stale (178 vs actual 180 tests, 3 commits unreflected); ambiguous no-subject constraint clause"&lt;/td&gt;
&lt;td&gt;3/3&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;A personal finance tracker's project handoff document&lt;/td&gt;
&lt;td&gt;Seven issues found, four fixed: a stale test count (claimed 121, actual 143), a false "no test file" gap claim for a module that actually had 22 real passing tests undocumented, the same stale count duplicated across two other files, and a stale next-step note for work already done. The other three (a wrong section cross-reference, a minor line-anchor drift, missing staleness signalling on regenerated counts) were flagged and deferred, not fixed&lt;/td&gt;
&lt;td&gt;4/7&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;One module of a personal dashboard suite's own constraints file&lt;/td&gt;
&lt;td&gt;"self-contradicting/stale pin claim (line 15 said Current Release v1.17, the module-status section 29 lines later still said pinned 1.9, live 1.16); consistencyUrl's failure-mode degradation undocumented despite existing in code, asymmetric with the documented liveUrl behavior"&lt;/td&gt;
&lt;td&gt;2/2&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;The parent hub of that same dashboard suite, reviewed independently the same day&lt;/td&gt;
&lt;td&gt;"Current Release's per-module version prose had already gone stale the same day it was written (said Studio v0.3.0, live manifest already 0.4.0); resolved session narrative duplicating another file; an undefined-trigger clause with no actor or condition named"&lt;/td&gt;
&lt;td&gt;3/3&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;This setup's own global rulebook, the file every project reads on session start&lt;/td&gt;
&lt;td&gt;"duplicated INBOX-delivery procedure had drifted from its source (stale 'immediately,' missing the queued-success clause, missing the sender-slug filename shape); the Homes convention violated by full duplication instead of a pointer"&lt;/td&gt;
&lt;td&gt;3/5&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;A design-token reference document&lt;/td&gt;
&lt;td&gt;Checked nine canonical tokens plus heading size, badge and button geometry, and a documented override against the live CSS. Every value matched. No findings&lt;/td&gt;
&lt;td&gt;0/0&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Two of the rows are worth sitting with regardless of what the count reads on any given day.&lt;/p&gt;

&lt;p&gt;The dashboard suite pair, a parent hub and one of its own modules, were reviewed independently by&lt;br&gt;
two different sessions on the same calendar day, neither aware of the other's result. Both turned up&lt;br&gt;
the same defect: a live version number, typed into prose, already stale next to the one place that&lt;br&gt;
actually tracked it.&lt;/p&gt;

&lt;p&gt;The global-rulebook row is stranger still. The bug was in the global rulebook's own copy of the&lt;br&gt;
cross-project delivery procedure, the mechanism that lets one project hand a proposal to another. It&lt;br&gt;
had been duplicated from the routing project's own document instead of pointing at it, and had&lt;br&gt;
drifted from that source twice because nothing forced the copy to stay in sync. The fix wasn't a&lt;br&gt;
third rewrite. It was deleting the copy and leaving a pointer, so it couldn't drift again.&lt;/p&gt;

&lt;h2&gt;
  
  
  What it actually taught, past "the tool works"
&lt;/h2&gt;

&lt;p&gt;Not every vague-sounding phrase is a defect. A document meant to work identically across many&lt;br&gt;
unrelated contexts sometimes needs things left underspecified on purpose; pin them down and every&lt;br&gt;
context except the one you were thinking about breaks. A second look rejected two of the findings&lt;br&gt;
that had flagged "unmeasurable" language, for exactly this reason.&lt;/p&gt;

&lt;p&gt;A document thorough about failure modes is usually silent about the case where everything goes&lt;br&gt;
right. Every document reviewed so far described what breaks in detail and showed no worked example&lt;br&gt;
of the correct path end to end.&lt;/p&gt;

&lt;p&gt;A proposed fix has to be checked against what actually reads the document, not its own wording. One&lt;br&gt;
fix assumed a downstream tool enforced a line-count limit. Reading the real parser that consumed the&lt;br&gt;
document found the limit was never enforced at all. Only exact section headings and bullet markers&lt;br&gt;
were. This setup rewrote the fix around the real mechanism instead of the plausible-sounding&lt;br&gt;
assumption.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's still open
&lt;/h2&gt;

&lt;p&gt;There is no cost gate and no volume limit on spec-panel itself. Coverage depends entirely on someone&lt;br&gt;
remembering to point it at something. Nobody tracks that automatically, and nothing forces a project&lt;br&gt;
to run it twice on the same document to catch drift. The numbers above are already out of date by&lt;br&gt;
the time anyone reads them. That is how a running log works, not a flaw in it.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://thekilted.dev/no-reason-to-be-kind/" rel="noopener noreferrer"&gt;thekilted.dev/no-reason-to-be-kind&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>softwareengineering</category>
      <category>buildinpublic</category>
      <category>devlog</category>
      <category>aitools</category>
    </item>
    <item>
      <title>Nothing to go stale</title>
      <dc:creator>the kilted dev</dc:creator>
      <pubDate>Sat, 07 Nov 2026 08:49:28 +0000</pubDate>
      <link>https://dev.to/thekilteddev/nothing-to-go-stale-16o8</link>
      <guid>https://dev.to/thekilteddev/nothing-to-go-stale-16o8</guid>
      <description>&lt;div&gt;
    &lt;iframe src="https://www.youtube.com/embed/Wj4-bYSqPbo" width="315" height="560"&gt;
    &lt;/iframe&gt;
  &lt;/div&gt;


&lt;p&gt;One GPU, one machine, and for now exactly one tool that needs it: a local model doing GPU-bound&lt;br&gt;
work a couple of times a week for one project that calls it. Small enough that nothing had broken&lt;br&gt;
yet. Also the moment a design decision is cheapest to get right, before real usage patterns build&lt;br&gt;
up around whatever gets chosen first.&lt;/p&gt;

&lt;p&gt;The proposal that came my way was the standard answer to "two things might want the same resource&lt;br&gt;
at once": a lock file. Before using the GPU, claim it by creating a marker. Before finishing, remove&lt;br&gt;
the marker. Anything that shows up while the marker exists waits its turn. It's a well-understood&lt;br&gt;
pattern, and the version proposed was already a careful one: atomic creation so two claims can't&lt;br&gt;
race each other, enough content in the file to tell a genuinely stale lock from a live one.&lt;/p&gt;

&lt;h2&gt;
  
  
  What a lock file is actually for
&lt;/h2&gt;

&lt;p&gt;I looked closely at why a lock needs to be careful in the first place: it isn't protecting against&lt;br&gt;
the resource being busy. It's protecting against the lock itself lying. Every piece of a well-built&lt;br&gt;
lock's design — atomic creation, a check for whether the lock has gone stale, cleanup on every exit&lt;br&gt;
— exists to defend against failure modes the lock introduces just by existing. A resource that was&lt;br&gt;
never contended in the first place doesn't need any of that. The contention was never the hard&lt;br&gt;
part. The bookkeeping was.&lt;/p&gt;

&lt;h2&gt;
  
  
  Don't keep a record, ask
&lt;/h2&gt;

&lt;p&gt;The hardware itself already knows exactly what's using it, right now, with no possibility of going&lt;br&gt;
stale, because it isn't a record of a past claim. It's the current state, queried live. A single&lt;br&gt;
command asks the driver directly: what's running, how much memory is it holding. No file to&lt;br&gt;
create, none that can outlive the process that made it, no PID to check against a process table&lt;br&gt;
that might have recycled it by now.&lt;/p&gt;

&lt;p&gt;And it fits the actual failure this machine has had: not two processes racing to grab the GPU at&lt;br&gt;
the same instant, but one process hanging without dying and quietly sitting on memory the next job&lt;br&gt;
needs. A lock file wouldn't catch that at all. A hung-but-alive process holds its lock exactly as&lt;br&gt;
validly as a healthy one. Asking the hardware catches it immediately, because the memory is either&lt;br&gt;
there or it isn't, whatever any marker file claims.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What a lock file has to get right:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create the marker atomically, so two claims can't race&lt;/li&gt;
&lt;li&gt;Remove it again, on every path out&lt;/li&gt;
&lt;li&gt;A holder that died without removing it&lt;/li&gt;
&lt;li&gt;A process ID the operating system has already reused&lt;/li&gt;
&lt;li&gt;A holder that hangs without dying, and keeps the lock&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;What a live query has to get right:&lt;/strong&gt; nothing. There is no stored claim, so there is nothing that&lt;br&gt;
can disagree with the hardware.&lt;/p&gt;

&lt;p&gt;Four of the five are obligations the lock creates for itself. The fifth, creating the marker&lt;br&gt;
atomically, guards a simultaneous race, which is not the failure this machine has actually had.&lt;/p&gt;

&lt;p&gt;The one thing a lock file offers that a live query doesn't — a clean error message naming who's&lt;br&gt;
holding the resource — is available from that same query. The command that shows what's running&lt;br&gt;
also shows which process ID owns it.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Zero staleness handling needed, because there's no state to go stale. Not a cleverer lock, no lock at all.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  A second cut, caught by asking someone to disagree
&lt;/h2&gt;

&lt;p&gt;A related piece of the same proposal suggested retry logic: if the resource is busy, wait and try&lt;br&gt;
again automatically. Reasonable-sounding, and it was cut too — by an independent review pass&lt;br&gt;
commissioned alongside the decision itself, brought in to look for problems rather than confirm&lt;br&gt;
the plan.&lt;/p&gt;

&lt;p&gt;An unattended process retrying its way onto shared hardware is precisely what this project's own&lt;br&gt;
rule against unattended execution already exists to prevent. Elsewhere in the same document, the&lt;br&gt;
proposal that suggested the retry logic had made that exact argument in a different context.&lt;br&gt;
Nobody had done anything dishonest. It's an easy inconsistency to write past when you're the one&lt;br&gt;
building the argument in the first place. The retry logic and the no-autonomous-execution&lt;br&gt;
principle were reasoned about separately, minutes apart, and never checked against each other&lt;br&gt;
until someone whose only job was to do exactly that.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What the proposal asked for:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;If the hardware is busy, wait and try again&lt;/li&gt;
&lt;li&gt;Automatically, unattended, with nobody watching&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;What the same document ruled out:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Anything that can fire on its own&lt;/li&gt;
&lt;li&gt;Anything that runs with no person present to catch it&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;One document, two conclusions, minutes apart. Side by side they are incompatible; read in the order&lt;br&gt;
they were written, neither one looks wrong.&lt;/p&gt;

&lt;p&gt;Fail fast instead. If the resource is busy, say so and stop. A human decides when to try again.&lt;/p&gt;

&lt;h2&gt;
  
  
  What made the lazy answer the right one
&lt;/h2&gt;

&lt;p&gt;None of this came from my distrust of locks in general, or a rule that says avoid new machinery. It&lt;br&gt;
came from asking what problem the proposed fix was solving, and finding that its complexity existed&lt;br&gt;
only to manage its own side effects. The resource was never the source of the risk. The simplest&lt;br&gt;
version of the design didn't win by being simpler. It won because it was more correct, for the&lt;br&gt;
failure that had actually happened, and had nothing left over to go wrong.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://thekilted.dev/nothing-to-go-stale/" rel="noopener noreferrer"&gt;thekilted.dev/nothing-to-go-stale&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>softwareengineering</category>
      <category>systemdesign</category>
      <category>debugging</category>
      <category>buildinpublic</category>
    </item>
    <item>
      <title>The review that caught itself</title>
      <dc:creator>the kilted dev</dc:creator>
      <pubDate>Sat, 31 Oct 2026 07:54:50 +0000</pubDate>
      <link>https://dev.to/thekilteddev/the-review-that-caught-itself-1p0n</link>
      <guid>https://dev.to/thekilteddev/the-review-that-caught-itself-1p0n</guid>
      <description>&lt;div&gt;
    &lt;iframe src="https://www.youtube.com/embed/bt_CALJF4jQ" width="315" height="560"&gt;
    &lt;/iframe&gt;
  &lt;/div&gt;


&lt;p&gt;Field notes on a review process. The external blog post at the centre of this, its author, and the&lt;br&gt;
project that relayed it are all deliberately unnamed — the piece is about the reasoning, not about&lt;br&gt;
anyone's work in particular.&lt;/p&gt;

&lt;h2&gt;
  
  
  The idea that survived
&lt;/h2&gt;

&lt;p&gt;A sibling project passed along a blog post about a different team's local-agent harness: sharp,&lt;br&gt;
well-argued, built around one specific rule. Don't rely on an instruction the agent has to remember&lt;br&gt;
to follow. Build the constraint into the tool so it physically can't be ignored. A gate, not a rule.&lt;/p&gt;

&lt;p&gt;That part held up completely, and for a good reason — it wasn't new here. This project had already&lt;br&gt;
been enforcing the same kind of constraint by hand: a written rule about defining a shared record's&lt;br&gt;
fields before anything used them, which kept getting silently ignored by whatever was supposed to&lt;br&gt;
follow it. The response stopped being "write the rule more clearly" and started being "make it&lt;br&gt;
structurally impossible to skip." What eventually held was a validator that refused the write.&lt;/p&gt;

&lt;p&gt;Two teams reaching the identical fix independently is stronger evidence than either team's&lt;br&gt;
reasoning alone.&lt;/p&gt;

&lt;h2&gt;
  
  
  The claim that didn't
&lt;/h2&gt;

&lt;p&gt;The draft that came out of the brainstorm made a stronger claim than that. It said the same&lt;br&gt;
gate-not-a-rule fix had now shown up three independent times, treating that as a threshold crossed.&lt;/p&gt;

&lt;p&gt;It hadn't.&lt;/p&gt;

&lt;p&gt;One of the three cited instances was the same internal case that had made the principle ring true&lt;br&gt;
in the first place. A real problem — and still not an agent ignoring an instruction, which is what&lt;br&gt;
the count was counting. Right case, wrong bucket. The other two both arrived through the same&lt;br&gt;
single relay, from a source that was never independently checked. Three confident-sounding data&lt;br&gt;
points, and on inspection, one didn't belong and the other two were really one.&lt;/p&gt;

&lt;p&gt;That correction came from an independent review, not from anyone re-reading their own work more&lt;br&gt;
carefully. It's the specific thing that kind of review exists to catch: a claim that sounds&lt;br&gt;
verified because it was written among evidence, when the evidence was one piece of secondhand&lt;br&gt;
testimony, counted twice.&lt;/p&gt;

&lt;h2&gt;
  
  
  The quieter catch
&lt;/h2&gt;

&lt;p&gt;Buried in the relay was a line characterising a design's human-approval step as "a stopgap, not a&lt;br&gt;
deliberate choice" — and the draft presented that line as something the original source had said.&lt;br&gt;
The review checked, and it hadn't. That framing was the relaying project's own reading of the&lt;br&gt;
material, not a claim the original author made. A fair reading, maybe, but a different kind of&lt;br&gt;
claim than "the source says this", and the draft had quietly upgraded one into the other.&lt;/p&gt;

&lt;p&gt;No one had lied. No one had checked either — the review was the first pass that did.&lt;/p&gt;

&lt;h2&gt;
  
  
  What was actually adopted
&lt;/h2&gt;

&lt;p&gt;One principle, promoted to policy on its own merits, with the overclaimed count corrected. One&lt;br&gt;
design pattern, confirmed as already covered by an existing rule — whoever built something never&lt;br&gt;
gets to be the only one who says it works — and not built. Two permanent guardrails went into the&lt;br&gt;
record anyway, in case it ever is.&lt;/p&gt;

&lt;p&gt;Nothing shipped that hadn't survived the review. What I keep sitting with is how easily the&lt;br&gt;
overclaimed version would have shipped without it. Not because the underlying idea was wrong, but&lt;br&gt;
because a genuinely good idea makes a shaky supporting claim easy to wave through as attached&lt;br&gt;
evidence instead of noticing it needed its own check.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://thekilted.dev/caught-itself/" rel="noopener noreferrer"&gt;thekilted.dev/caught-itself&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>codereview</category>
      <category>evidence</category>
      <category>softwareengineering</category>
      <category>buildinpublic</category>
    </item>
    <item>
      <title>Nineteen calls, every time</title>
      <dc:creator>the kilted dev</dc:creator>
      <pubDate>Sat, 24 Oct 2026 07:40:01 +0000</pubDate>
      <link>https://dev.to/thekilteddev/nineteen-calls-every-time-1o4b</link>
      <guid>https://dev.to/thekilteddev/nineteen-calls-every-time-1o4b</guid>
      <description>&lt;div&gt;
    &lt;iframe src="https://www.youtube.com/embed/F8dzQb2G-Oo" width="315" height="560"&gt;
    &lt;/iframe&gt;
  &lt;/div&gt;


&lt;p&gt;Claude's own desktop app kept dying outright, the whole window gone, no warning. Not a hang, not a&lt;br&gt;
freeze that eventually recovers: the process behind the screen simply stopped existing. It happened&lt;br&gt;
five times in one day alone, on a Lenovo Legion 5 laptop. Each one logged the identical signature:&lt;br&gt;
the GPU process reported gone, reason crashed, exit code 101457950, every single time.&lt;/p&gt;

&lt;p&gt;I ruled out the obvious suspects first, one at a time, and each one cleared.&lt;/p&gt;

&lt;p&gt;Memory looked fine going into the crash: system RAM had over ten gigabytes free at the moment&lt;br&gt;
checked, nowhere near exhausted. The graphics driver never logged a reset around any crash checked&lt;br&gt;
for one, no driver-level event in the system log at all. Nothing was left over from a&lt;br&gt;
previous crash either: once the app went down, the only thing still running afterward was an&lt;br&gt;
unrelated command-line helper, so there was no stale process holding a lock that could explain the&lt;br&gt;
next crash starting from a bad state. Three clean suspects, three dead ends.&lt;/p&gt;

&lt;h2&gt;
  
  
  The pattern that was hiding in a different log entirely
&lt;/h2&gt;

&lt;p&gt;The actual cause turned up somewhere nobody was looking directly for it: a completely separate log&lt;br&gt;
file, tracking browser-level activity rather than the app's own process events. A specific WebGL&lt;br&gt;
call — &lt;code&gt;getInternalformatParameter&lt;/code&gt;, the kind a web page makes to ask the graphics driver about&lt;br&gt;
supported texture formats — showed up in a tight burst right before every crash. Not once or twice. Every single time, across five&lt;br&gt;
separately timed occurrences spanning hours, that burst was exactly the same size: nineteen calls.&lt;br&gt;
Never eighteen. Never twenty. A fixed number repeating exactly, five times, is not what a random&lt;br&gt;
failure looks like. It's what a fixed sequence running to completion looks like, every time it&lt;br&gt;
runs at all.&lt;/p&gt;

&lt;p&gt;The trigger was a browser preview pane inside the app, opened by whatever the user was doing at the&lt;br&gt;
time, loading a page that happened to run a script probing WebGL capabilities as part of its own&lt;br&gt;
fingerprinting or feature detection. Each crash landed five to six seconds after the preview pane&lt;br&gt;
had opened. The nineteen-call burst sat right in that gap, every time.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Start&lt;/strong&gt; — the browser preview pane opens.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;In the gap&lt;/strong&gt; — a page inside it runs nineteen WebGL calls.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;5-6s later&lt;/strong&gt; — the GPU process is gone.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The same three steps behind all five crashes in one day. The nineteen calls sat in the gap between&lt;br&gt;
the pane opening and the process dying, every time.&lt;/p&gt;

&lt;h2&gt;
  
  
  Opening the pane wasn't enough by itself
&lt;/h2&gt;

&lt;p&gt;One earlier preview-pane open that same day had no burst afterward, and no crash. That's the detail&lt;br&gt;
that rules out "the preview pane itself is the problem." The pane can open cleanly all day. What&lt;br&gt;
kills the process is specifically a loaded page inside it running that exact probe sequence to&lt;br&gt;
completion, not the act of opening the pane at all.&lt;/p&gt;

&lt;p&gt;A separate warning line, about a GPU power-preference option being ignored on this platform, showed&lt;br&gt;
up earlier that same morning with nothing bad following it: checked five seconds either side, no&lt;br&gt;
burst, no crash. That same warning also appears at the very top of every one of the actual crash&lt;br&gt;
sequences, immediately before the nineteen calls start. So the warning by itself isn't the trigger.&lt;br&gt;
It's a harmless line that happens to sit right before the real trigger, whenever the real trigger&lt;br&gt;
runs at all, which made it worth ruling out on its own rather than assuming it was just noise.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Suspect&lt;/th&gt;
&lt;th&gt;What the check found&lt;/th&gt;
&lt;th&gt;Verdict&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Memory pressure&lt;/td&gt;
&lt;td&gt;Over ten gigabytes of system RAM still free at the moment checked&lt;/td&gt;
&lt;td&gt;Ruled out&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;A graphics-driver reset&lt;/td&gt;
&lt;td&gt;No driver-level event in the system log around any crash checked for one&lt;/td&gt;
&lt;td&gt;Ruled out&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;A stale process from the last crash&lt;/td&gt;
&lt;td&gt;Only an unrelated command-line helper still running afterward&lt;/td&gt;
&lt;td&gt;Ruled out&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Opening the preview pane, on its own&lt;/td&gt;
&lt;td&gt;One open earlier the same day, no burst after it and no crash&lt;/td&gt;
&lt;td&gt;Ruled out&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;A GPU power-preference warning&lt;/td&gt;
&lt;td&gt;Checked five seconds either side, no burst and no crash following it&lt;/td&gt;
&lt;td&gt;Ruled out&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;A loaded page running the probe to completion&lt;/td&gt;
&lt;td&gt;A burst of exactly nineteen calls in the gap before every one of the five crashes&lt;/td&gt;
&lt;td&gt;Real cause&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  A sixth possible crash, found and deliberately left uncounted
&lt;/h2&gt;

&lt;p&gt;Going back further in the logs turned up one more candidate burst, eight days before the day with&lt;br&gt;
five crashes, and it doesn't get counted. Here's why. The burst is there, the right size, in the&lt;br&gt;
right log. What isn't there is the matching crash line. The specific stretch of log covering that&lt;br&gt;
exact window had already rotated out of every log file still on disk by the time anyone went&lt;br&gt;
looking. What's on disk instead is a fresh app launch about nine minutes after the burst, with the&lt;br&gt;
previous launch recorded two days earlier, meaning something ended that long-running session before&lt;br&gt;
the new one started, just not on camera. A restart nine minutes after an unexplained burst, with&lt;br&gt;
nothing describing how the previous session actually ended, is consistent with the same crash. It&lt;br&gt;
is not proof of it. Six of the bursts line up with a confirmed crash: one five days earlier, and&lt;br&gt;
all five from the day of the five crashes. The unconfirmed one from further back stays unconfirmed,&lt;br&gt;
named as a maybe rather than quietly rounded into the count. If it belongs in the total,&lt;br&gt;
that's a call for whoever owns the running tally next, made with the gap in the evidence attached,&lt;br&gt;
not asserted on the strength of a nine-minute coincidence alone.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Occurrence&lt;/th&gt;
&lt;th&gt;19-call burst&lt;/th&gt;
&lt;th&gt;Crash on record&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;The five in one day&lt;/td&gt;
&lt;td&gt;found&lt;/td&gt;
&lt;td&gt;found&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Five days earlier&lt;/td&gt;
&lt;td&gt;found&lt;/td&gt;
&lt;td&gt;found&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Eight days earlier&lt;/td&gt;
&lt;td&gt;found&lt;/td&gt;
&lt;td&gt;could not be established&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Seven bursts in the logs, six of them beside a crash on the record. The seventh is left out of the&lt;br&gt;
count rather than rounded into it.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's left open
&lt;/h2&gt;

&lt;p&gt;No crash-diagnostic file was produced by any of the five crashes: the folder where the app would&lt;br&gt;
normally leave one after a hard failure stayed empty every time. The bug is filed upstream as&lt;br&gt;
&lt;a href="https://github.com/anthropics/claude-code/issues/80444" rel="noopener noreferrer"&gt;anthropics/claude-code#80444&lt;/a&gt;, alongside&lt;br&gt;
around ten duplicate reports, reproduced across NVIDIA, AMD, and Intel graphics on both Windows 10&lt;br&gt;
and 11, so it isn't specific to this one laptop. All of them are still open. I put a comment on&lt;br&gt;
that issue with this machine's own findings, and the thread is still getting daily activity from&lt;br&gt;
other people hitting the same crash. In the meantime the only mitigation that actually works is not&lt;br&gt;
opening that specific browser preview feature at all, and driving anything that needs a real&lt;br&gt;
browser through a separate, standalone tool instead.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;None of this was hard to check, once the search moved from guessing at causes to reading the log&lt;br&gt;
that actually recorded what happened.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The memory number, the driver log, the leftover-process check: all fast, all clean, all wrong turns&lt;br&gt;
that had to be ruled out anyway before the real pattern, sitting in a log nobody had thought to grep&lt;br&gt;
yet, showed up in exactly the same shape five times in a row.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://thekilted.dev/nineteen-calls-every-time/" rel="noopener noreferrer"&gt;thekilted.dev/nineteen-calls-every-time&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>debugging</category>
      <category>gpu</category>
      <category>softwareengineering</category>
      <category>buildinpublic</category>
    </item>
    <item>
      <title>Not the integrated GPU</title>
      <dc:creator>the kilted dev</dc:creator>
      <pubDate>Sat, 17 Oct 2026 07:55:53 +0000</pubDate>
      <link>https://dev.to/thekilteddev/not-the-integrated-gpu-1b13</link>
      <guid>https://dev.to/thekilteddev/not-the-integrated-gpu-1b13</guid>
      <description>&lt;div&gt;
    &lt;iframe src="https://www.youtube.com/embed/nU3qaBlULGc" width="315" height="560"&gt;
    &lt;/iframe&gt;
  &lt;/div&gt;


&lt;p&gt;Field notes on a laptop display-topology migration, still mid-journey.&lt;/p&gt;

&lt;h2&gt;
  
  
  Two sockets, one controller
&lt;/h2&gt;

&lt;p&gt;Three monitors, one laptop, and one USB dock old enough to be a bottleneck. Two of the three&lt;br&gt;
monitors ran through it: a 4K panel and an ultrawide, both sharing one USB link with the keyboard,&lt;br&gt;
the mouse, and Ethernet. The third monitor, a second 4K panel, was already wired natively straight&lt;br&gt;
to the discrete GPU over HDMI, no dock involved.&lt;/p&gt;

&lt;p&gt;The laptop has two USB-C sockets, and the working assumption going in was that a monitor plugged&lt;br&gt;
into either one would land on the integrated graphics, the way a lot of thin-and-light laptops&lt;br&gt;
route USB-C video. The two ports look identical. They aren't quite: one carries power delivery up&lt;br&gt;
to 100W and DisplayPort 2.1, the other tops out at DisplayPort 1.4 with no power delivery at all.&lt;br&gt;
Both are wired to the same USB controller underneath, the only one this laptop has. A different&lt;br&gt;
configuration of the same chassis swaps one of those ports for Thunderbolt; this one doesn't, and&lt;br&gt;
that was confirmed by checking the controller list directly rather than trusting the spec sheet for&lt;br&gt;
this exact model.&lt;/p&gt;

&lt;h2&gt;
  
  
  The port routes to the discrete GPU, not the integrated one
&lt;/h2&gt;

&lt;p&gt;Moving the ultrawide monitor from the old dock onto the power-delivery USB-C port — native&lt;br&gt;
DisplayPort Alt Mode, the mode that carries real DisplayPort video directly over a USB-C connector,&lt;br&gt;
no dock in between — settled the assumption by measurement instead of guesswork. The monitor came&lt;br&gt;
up attached to the discrete GPU. Not the integrated graphics chip doing double duty on the internal&lt;br&gt;
panel and the USB-C port both, which was the original assumption. A separate, dedicated card, the&lt;br&gt;
same one already driving one of the 4K monitors over HDMI.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Display&lt;/th&gt;
&lt;th&gt;Was driven by&lt;/th&gt;
&lt;th&gt;Now driven by&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Internal panel (2560×1600 · 165Hz)&lt;/td&gt;
&lt;td&gt;integrated GPU&lt;/td&gt;
&lt;td&gt;integrated GPU&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;4K panel, HDMI (3840×2160 · 60Hz)&lt;/td&gt;
&lt;td&gt;discrete GPU&lt;/td&gt;
&lt;td&gt;discrete GPU&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Ultrawide (3440×1440 · 60Hz → 100Hz)&lt;/td&gt;
&lt;td&gt;the dock&lt;/td&gt;
&lt;td&gt;discrete GPU&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;4K panel, dock (3840×2160 · 60Hz)&lt;/td&gt;
&lt;td&gt;the dock&lt;/td&gt;
&lt;td&gt;the dock (cable ordered)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Four displays across three adapters, read out of &lt;code&gt;dxdiag&lt;/code&gt; before and after the first move. Only the&lt;br&gt;
ultrawide changed hands. The second 4K panel is still on the dock, waiting on a cable.&lt;/p&gt;

&lt;p&gt;The other USB-C port hasn't been tested the same way yet. The reasonable guess is that it behaves&lt;br&gt;
the same, since both ports sit on the same controller, but a guess is exactly the thing this whole&lt;br&gt;
exercise exists to replace with a measurement, so it stays a guess until it's checked.&lt;/p&gt;

&lt;h2&gt;
  
  
  Faster the moment the dock was out of the path
&lt;/h2&gt;

&lt;p&gt;With the ultrawide on its own native connection, &lt;code&gt;dxdiag&lt;/code&gt; showed it running at 3440×1440. The old&lt;br&gt;
dock connection had topped out at 60Hz for that monitor, full stop. There was no higher option to&lt;br&gt;
select. The panel itself supports 100Hz; the dock's video path never exposed anything past 60,&lt;br&gt;
because it wasn't sending real DisplayPort signal at all — it was compressing the whole desktop into&lt;br&gt;
a video stream and shipping that over USB.&lt;/p&gt;

&lt;p&gt;The refresh rate didn't jump to 100Hz on its own, though. Straight after the re-cable, the display&lt;br&gt;
still reported 59.97Hz, because Windows carries a monitor's previous setting forward across a&lt;br&gt;
different physical connection rather than picking the best one available. The "Choose a refresh&lt;br&gt;
rate" dropdown listed nine options, four of them marked with an asterisk meaning the adapter&lt;br&gt;
synthesised them rather than the monitor actually supporting them:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Refresh rate&lt;/th&gt;
&lt;th&gt;Note&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;99.90 Hz&lt;/td&gt;
&lt;td&gt;unmarked&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;75.03 Hz&lt;/td&gt;
&lt;td&gt;adapter-synthesised&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;72.19 Hz&lt;/td&gt;
&lt;td&gt;adapter-synthesised&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;70.07 Hz&lt;/td&gt;
&lt;td&gt;adapter-synthesised&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;60 Hz&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;59.97 Hz&lt;/td&gt;
&lt;td&gt;selected&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;59.94 Hz&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;56.25 Hz&lt;/td&gt;
&lt;td&gt;adapter-synthesised&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;50 Hz&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Picking the unmarked 99.90Hz by hand got a 100Hz reading in &lt;code&gt;dxdiag&lt;/code&gt; afterward.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;A cable upgrade doesn't come with an automatic refresh-rate upgrade attached. Somebody has to go&lt;br&gt;
into the settings and pick it.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  A tool that reported the wrong monitor entirely
&lt;/h2&gt;

&lt;p&gt;One check along the way turned up something worth flagging on its own, separate from the dock:&lt;br&gt;
&lt;code&gt;Win32_VideoController&lt;/code&gt;, a common way of asking Windows what resolution and refresh rate a graphics&lt;br&gt;
adapter is currently running, gave a confidently wrong answer in this exact multi-monitor setup. It&lt;br&gt;
reported the&lt;br&gt;
integrated graphics chip as running the ultrawide's resolution at 60Hz. The integrated chip was&lt;br&gt;
never connected to that monitor at all. It was driving the laptop's own internal screen, at a&lt;br&gt;
completely different resolution and refresh rate. &lt;code&gt;dxdiag&lt;/code&gt;, read directly, had the real picture:&lt;br&gt;
internal panel on the integrated chip, ultrawide hanging off the old dock. The first tool wasn't&lt;br&gt;
lying about a number — it was reporting the wrong adapter's numbers as if they belonged to a monitor&lt;br&gt;
they'd never touched.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Tool&lt;/th&gt;
&lt;th&gt;Reported&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;Win32_VideoController&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Integrated graphics, 3440×1440 at 60Hz — the ultrawide's mode, on an adapter that was never wired to it&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;dxdiag&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Integrated graphics, 2560×1600 at 165Hz — the laptop's own internal panel, which is what it was actually driving&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The same adapter, read two ways, on the same machine on the same day. I'd check with a second tool&lt;br&gt;
before trusting a report like that in any setup with more than one screen.&lt;/p&gt;

&lt;h2&gt;
  
  
  The bandwidth math the dock was quietly doing
&lt;/h2&gt;

&lt;p&gt;The old dock's USB link carries something like 4 gigabits a second, shared across both monitors, the&lt;br&gt;
keyboard and mouse, and the network connection. A single 4K panel at 60Hz, uncompressed, needs&lt;br&gt;
roughly 12.8 gigabits a second on its own. Two monitors, both routed through that one dock, meant&lt;br&gt;
somewhere around 25 gigabits of raw pixel data getting squeezed into a 4-gigabit pipe, continuously,&lt;br&gt;
the entire time both screens were on. Something has to give, and what gave was a real-time&lt;br&gt;
compression pass running in software the whole time, on hardware never asked whether it minded.&lt;/p&gt;

&lt;p&gt;Native DisplayPort Alt Mode over USB-C, by contrast, has room to spare: the standard this laptop's&lt;br&gt;
faster port supports moves tens of gigabits a second, more than enough for one monitor at its native&lt;br&gt;
resolution and refresh rate with nothing left to compress. Once the ultrawide moved off the dock,&lt;br&gt;
its own share of that math simply stopped being a problem.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where this actually stands
&lt;/h2&gt;

&lt;p&gt;One monitor is done: natively connected, correctly identified as running off the discrete GPU, and&lt;br&gt;
finally at the refresh rate it was always capable of. A cable for the second monitor, DisplayPort&lt;br&gt;
this time rather than the general-purpose USB-C to USB-C cable currently in use, has been ordered&lt;br&gt;
but not yet installed. Once it lands, the old dock drops out of the video path entirely and keeps&lt;br&gt;
one job: charging and networking, which is what a general-purpose USB link is good at.&lt;/p&gt;

&lt;p&gt;Nothing here was fixed by buying better hardware. The laptop, the monitors, and the faster port were&lt;br&gt;
all already sitting there. The fix was checking which port actually did what, instead of assuming&lt;br&gt;
the label on the box.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://thekilted.dev/not-the-integrated-gpu/" rel="noopener noreferrer"&gt;thekilted.dev/not-the-integrated-gpu&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>hardware</category>
      <category>displayport</category>
      <category>usbc</category>
      <category>buildinpublic</category>
    </item>
    <item>
      <title>Blocked, not rejected</title>
      <dc:creator>the kilted dev</dc:creator>
      <pubDate>Sun, 11 Oct 2026 08:29:02 +0000</pubDate>
      <link>https://dev.to/thekilteddev/blocked-not-rejected-1bbn</link>
      <guid>https://dev.to/thekilteddev/blocked-not-rejected-1bbn</guid>
      <description>&lt;div&gt;
    &lt;iframe src="https://www.youtube.com/embed/QzpmuLujYbk" width="315" height="560"&gt;
    &lt;/iframe&gt;
  &lt;/div&gt;


&lt;p&gt;The most capable-looking command in a fifty-seven-item tool catalogue turned out to be five&lt;br&gt;
function calls to a server this setup doesn't run. No trial was run, because narrating what a&lt;br&gt;
missing server would do isn't a test. The verdict needed a name of its own, and blocked fit.&lt;/p&gt;

&lt;p&gt;SuperClaude is a configuration layer for Claude Code, installed as an add-on rather than built in:&lt;br&gt;
slash commands, agents and behavioural modes, fifty-seven items in the catalogue in total. One of&lt;br&gt;
them read as the single most capable thing in it.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;pm-agent&lt;/code&gt;, invoked as &lt;code&gt;/sc:pm&lt;/code&gt;, read on paper like a full session-management layer. Cross-session&lt;br&gt;
memory that survives between conversations. Checkpointing every thirty minutes. Self-evaluation, so&lt;br&gt;
the agent could ask itself whether it was actually done before reporting done. The kind of feature&lt;br&gt;
list that makes a reader comparing AI coding tools stop and read it twice.&lt;/p&gt;

&lt;h2&gt;
  
  
  The check
&lt;/h2&gt;

&lt;p&gt;The catalogue's own summary of &lt;code&gt;/sc:pm&lt;/code&gt; never says how any of that actually works. Reading the full&lt;br&gt;
source (&lt;code&gt;agents/pm-agent.md&lt;/code&gt; and &lt;code&gt;commands/pm.md&lt;/code&gt; in the SuperClaude repository) does.&lt;/p&gt;

&lt;p&gt;Every one of those mechanisms turned out to be a literal call to a function on a Serena server.&lt;br&gt;
Serena is an MCP (Model Context Protocol) server, a separate program that Claude Code connects to&lt;br&gt;
for extra tools. The calls are &lt;code&gt;list_memories()&lt;/code&gt;, &lt;code&gt;read_memory()&lt;/code&gt;, &lt;code&gt;write_memory()&lt;/code&gt;,&lt;br&gt;
&lt;code&gt;think_about_task_adherence()&lt;/code&gt;, &lt;code&gt;think_about_whether_you_are_done()&lt;/code&gt;. Cross-session memory was a&lt;br&gt;
named function call to a server. So was self-evaluation: another named call to the same server.&lt;br&gt;
None of those functions exist without a Serena MCP server actually connected, and at the time of&lt;br&gt;
the review this setup's &lt;code&gt;.mcp.json&lt;/code&gt; defined no servers at all. None, checked directly in the file&lt;br&gt;
rather than assumed.&lt;/p&gt;

&lt;p&gt;The dependency did not stop there. For full behaviour, &lt;code&gt;/sc:pm&lt;/code&gt; also wanted seven more MCP&lt;br&gt;
servers (eight, all told, all absent) loaded dynamically through a third-party Docker gateway,&lt;br&gt;
&lt;code&gt;airis-mcp-gateway&lt;/code&gt;. Reading more of the command's own source only lengthened the list of things&lt;br&gt;
that would need to&lt;br&gt;
exist first, never shortened it.&lt;/p&gt;

&lt;p&gt;To run the same check on any tool, search its command files for calls to functions that need a&lt;br&gt;
connected server, then compare that list with your own MCP configuration.&lt;/p&gt;

&lt;p&gt;Source: &lt;a href="https://github.com/SuperClaude-Org/SuperClaude_Framework" rel="noopener noreferrer"&gt;github.com/SuperClaude-Org/SuperClaude_Framework&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  A repeat
&lt;/h2&gt;

&lt;p&gt;The shape had shown up in the framework before. An earlier command, &lt;code&gt;/reflect&lt;/code&gt;,&lt;br&gt;
had already been excluded from an earlier pass for the identical reason. Its own file states&lt;br&gt;
plainly, in its own "Will Not" section:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Operate without proper Serena MCP integration and reflection tool access.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Same disqualifying issue, same missing server, a different command. Once is a fact about one&lt;br&gt;
command. Twice is a fact about the framework's own design pattern: describe a capability in the&lt;br&gt;
documentation, implement it as a call to infrastructure the reader is never told they need.&lt;/p&gt;

&lt;h2&gt;
  
  
  A second objection
&lt;/h2&gt;

&lt;p&gt;Set the missing server aside, and there was still a second, unrelated problem. The command's own&lt;br&gt;
file declared itself the default operating foundation:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The DEFAULT operating foundation that runs automatically at every session start... the default&lt;br&gt;
entry point for all interactions.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Auto-delegating every request to sub-agents before a human ever saw it. That was a takeover of a&lt;br&gt;
workflow already in place, duplicating this setup's own working four-file lifecycle (&lt;code&gt;NOTES.md&lt;/code&gt;,&lt;br&gt;
&lt;code&gt;MEMORY.md&lt;/code&gt;, &lt;code&gt;CLAUDE.md&lt;/code&gt;, &lt;code&gt;DECISIONS.md&lt;/code&gt;).&lt;/p&gt;

&lt;p&gt;A different project in the same workspace had already declined the exact same shape for the&lt;br&gt;
framework's Deep Research mode: an ungated feature that wanted to become the default way every&lt;br&gt;
session behaved, rather than a tool invoked on request. This setup read that rule, then reached the&lt;br&gt;
same objection on pm-agent and checked it against that record. The missing server was the&lt;br&gt;
independent finding; the second objection leaned on that earlier record.&lt;/p&gt;

&lt;h2&gt;
  
  
  The verdict
&lt;/h2&gt;

&lt;p&gt;No trial was run. On paper the command looked capable, but a trial without the missing server&lt;br&gt;
would only narrate what &lt;code&gt;write_memory()&lt;/code&gt; would do, with nothing real underneath the narration.&lt;/p&gt;

&lt;p&gt;A trial without the server would be a plausible performance of a test.&lt;/p&gt;

&lt;p&gt;This setup keeps a standing rule for exactly that failure mode: trust the artifact over the summary.&lt;br&gt;
Reading &lt;code&gt;pm-agent&lt;/code&gt;'s actual source instead of its one-line catalogue description is what caught the gap&lt;br&gt;
before a fake trial could run.&lt;/p&gt;

&lt;p&gt;So the verdict on record was not rejected. It was blocked.&lt;/p&gt;

&lt;p&gt;A blocked verdict names the specific missing thing and stays open to being wrong about it. If a&lt;br&gt;
Serena MCP server is ever installed here for an unrelated reason, this is worth a second look.&lt;br&gt;
The session-takeover design would still need weighing on its own merits. A smaller, scoped-down&lt;br&gt;
version of the trial was floated too and turned down; that was the project owner's call, and no&lt;br&gt;
second missing dependency lay behind it. A rejected verdict would have closed that door for good.&lt;br&gt;
This one stayed open on purpose.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://thekilted.dev/blocked-not-rejected/" rel="noopener noreferrer"&gt;thekilted.dev/blocked-not-rejected&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>tooling</category>
      <category>aiagents</category>
      <category>claudecode</category>
      <category>buildinpublic</category>
    </item>
    <item>
      <title>A Claude Code Stop hook that makes Claude show the full file path</title>
      <dc:creator>the kilted dev</dc:creator>
      <pubDate>Wed, 07 Oct 2026 06:58:47 +0000</pubDate>
      <link>https://dev.to/thekilteddev/a-claude-code-stop-hook-that-makes-claude-show-the-full-file-path-4lk3</link>
      <guid>https://dev.to/thekilteddev/a-claude-code-stop-hook-that-makes-claude-show-the-full-file-path-4lk3</guid>
      <description>&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/LD_rZm5MwWs" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;Claude Code answered &lt;code&gt;Run the tests with scripts\check.py.&lt;/code&gt; I needed &lt;code&gt;C:\proj\scripts\check.py&lt;/code&gt;. (I staged that exchange: I asked for the short form so the hook had something to catch.)&lt;/p&gt;

&lt;p&gt;A single path is easy to work out. A list is harder. In the folder for one video episode, Claude listed six files by short name and I could not tell where any of them were.&lt;/p&gt;

&lt;p&gt;I had already put a line in &lt;code&gt;CLAUDE.md&lt;/code&gt;, the file where you write standing instructions for Claude:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Always give absolute paths, never relative ones.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Claude kept slipping. So I wrote a Stop hook that checks every reply and sends it back when it names a file by a relative path. The code is in the repo &lt;a href="https://github.com/thekilteddev/claude-code-stop-hook-full-path" rel="noopener noreferrer"&gt;claude-code-stop-hook-full-path&lt;/a&gt;, and the video is linked at the end. It runs on Windows and Linux. I have not tried it on macOS.&lt;/p&gt;

&lt;h2&gt;
  
  
  What it does
&lt;/h2&gt;

&lt;p&gt;On Windows, Claude answers &lt;code&gt;Run the tests with scripts\check.py.&lt;/code&gt; The hook blocks the reply, and Claude answers again: &lt;code&gt;Run the tests with C:\proj\scripts\check.py.&lt;/code&gt; That was Claude Code 2.1.284 on Haiku 4.5, in a project at &lt;code&gt;C:\proj&lt;/code&gt;. The Windows part of the video uses my own hook. The one in the repo is a shorter stand-in with a different message, and it does the same job.&lt;/p&gt;

&lt;p&gt;On Linux, the stand-in hook ran in a &lt;code&gt;node:22-slim&lt;/code&gt; container with Claude Code 2.1.286 and a project at &lt;code&gt;/home/dev/proj&lt;/code&gt;. Claude listed six files by short path. The hook replied &lt;code&gt;Full paths only. Your reply has short paths:&lt;/code&gt; and Claude answered again with the full paths:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;episode/script.md     -&amp;gt;  /home/dev/proj/episode/script.md
episode/clip-01.mp4   -&amp;gt;  /home/dev/proj/episode/clip-01.mp4
episode/captions.srt  -&amp;gt;  /home/dev/proj/episode/captions.srt
episode/clip-02.mp4   -&amp;gt;  /home/dev/proj/episode/clip-02.mp4
episode/notes.md      -&amp;gt;  /home/dev/proj/episode/notes.md
episode/cover.png     -&amp;gt;  /home/dev/proj/episode/cover.png
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  What a Stop hook receives and what it can send back
&lt;/h2&gt;

&lt;p&gt;A Stop hook is a command Claude Code runs each time Claude finishes a reply. It gets one JSON object on stdin. Two of its fields matter here. &lt;code&gt;last_assistant_message&lt;/code&gt; is the text of the final reply. &lt;code&gt;stop_hook_active&lt;/code&gt; is &lt;code&gt;true&lt;/code&gt; when Claude Code is already continuing because of a stop hook.&lt;/p&gt;

&lt;p&gt;The hook answers on stdout. Printing &lt;code&gt;{"decision": "block", "reason": "..."}&lt;/code&gt; keeps Claude from stopping, and &lt;code&gt;reason&lt;/code&gt; tells it why it should continue. Printing nothing lets the reply stand. The &lt;a href="https://code.claude.com/docs/en/hooks" rel="noopener noreferrer"&gt;hooks reference&lt;/a&gt; lists exit code 2 with the message on stderr as another way to block. This hook uses the JSON form.&lt;/p&gt;

&lt;p&gt;Claude Code allows eight stop-hook continuations in a row before it overrides the next block and ends the turn. The hook checks &lt;code&gt;stop_hook_active&lt;/code&gt; anyway: if the rewrite still has a short path, it lets the reply through instead of blocking again.&lt;/p&gt;

&lt;h2&gt;
  
  
  The hook
&lt;/h2&gt;

&lt;p&gt;This is the repo's stand-in hook, the one that ran in the Linux container. It is 89 lines of Python with no dependencies.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;#!/usr/bin/env python3
&lt;/span&gt;&lt;span class="sh"&gt;"""&lt;/span&gt;&lt;span class="s"&gt;Claude Code Stop hook: when the last reply names a file by a short path, block it and ask for the full path.

Written for Windows, macOS and Linux; tested on Windows and Linux. Reads the Stop-hook JSON payload on stdin and prints
{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;decision&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;: &lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;block&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;, &lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;reason&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;: ...} when a reply has a short path, nothing otherwise.
Only paths inside backticks that end in a file extension are checked. A directory without an
extension, or a path outside backticks, is not flagged.
Run `python stop_hook_full_path.py --selftest` to check the cases below.
&lt;/span&gt;&lt;span class="sh"&gt;"""&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;json&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;re&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;sys&lt;/span&gt;

&lt;span class="n"&gt;TICKS&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;re&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;compile&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;r&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;`([^`\n]{1,200})`&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="c1"&gt;# absolute on Windows (C:\ or C:/), POSIX or UNC (leading / or \), home (~), or a URL
&lt;/span&gt;&lt;span class="n"&gt;ABSOLUTE&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;re&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;compile&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;r&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;^(?:[A-Za-z]:[\\/]|[\\/]|~|[a-zA-Z][a-zA-Z0-9+.\-]*://)&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;SEGMENT&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;re&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;compile&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;r&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;^[\w.\-{}, ]+$&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  &lt;span class="c1"&gt;# braces and commas allowed: src/{a,b}.ts is one short path
&lt;/span&gt;&lt;span class="n"&gt;EXTENSION&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;re&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;compile&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;r&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;\.[A-Za-z0-9]{1,6}$&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;


&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;short_paths&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;text&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;found&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[]&lt;/span&gt;
    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;token&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;TICKS&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;findall&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;text&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="n"&gt;token&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;token&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;strip&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;ABSOLUTE&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;match&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;token&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="ow"&gt;or&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="n"&gt;re&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;search&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;r&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;[\\/]&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;token&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="ow"&gt;or&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="n"&gt;EXTENSION&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;search&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;token&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
            &lt;span class="k"&gt;continue&lt;/span&gt;
        &lt;span class="n"&gt;parts&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;p&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;re&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;split&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;r&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;[\\/]&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;token&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="nf"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;parts&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt; &lt;span class="ow"&gt;and&lt;/span&gt; &lt;span class="nf"&gt;all&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;SEGMENT&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;match&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;p&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;parts&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
            &lt;span class="n"&gt;found&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;append&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;token&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;found&lt;/span&gt;


&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;decision&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;payload&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;payload&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;stop_hook_active&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="bp"&gt;None&lt;/span&gt;  &lt;span class="c1"&gt;# already blocked once: let Claude stop rather than loop
&lt;/span&gt;    &lt;span class="n"&gt;bad&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;short_paths&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;payload&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;last_assistant_message&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="ow"&gt;or&lt;/span&gt; &lt;span class="sh"&gt;""&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="n"&gt;bad&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="bp"&gt;None&lt;/span&gt;
    &lt;span class="n"&gt;shown&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;, &lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;join&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;`&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;`&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;p&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;bad&lt;/span&gt;&lt;span class="p"&gt;[:&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt; (+&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nf"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;bad&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt; more)&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="nf"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;bad&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="sh"&gt;""&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;decision&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;block&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;reason&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Full paths only. Your reply has short paths: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;shown&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;. Rewrite them as absolute paths.&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;


&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;load&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;raw&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="c1"&gt;# Strip EVERY leading byte order mark: a UTF-8 pipe from Windows PowerShell can send two,
&lt;/span&gt;    &lt;span class="c1"&gt;# and the "utf-8-sig" codec removes only one.
&lt;/span&gt;    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;json&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;loads&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;raw&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;decode&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;utf-8&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;lstrip&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="se"&gt;\ufeff&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;


&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;selftest&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
    &lt;span class="n"&gt;cases&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
        &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;`episode/clip-01.mp4`&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
        &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;`/home/dev/proj/episode/clip-01.mp4`&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="bp"&gt;False&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
        &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;`/Users/dev/proj/episode/clip-01.mp4`&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="bp"&gt;False&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
        &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;`C:&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s"&gt;proj&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s"&gt;episode&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s"&gt;clip-01.mp4`&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="bp"&gt;False&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
        &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;`episode&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s"&gt;clip-01.mp4`&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
        &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;`src/{a,b}.ts`&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
        &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Press `q`, then open `src/a.ts` and `src/b.ts`.&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;  &lt;span class="c1"&gt;# a one-character code span must not break the pairing
&lt;/span&gt;        &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;`./src/app.ts`&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
        &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;`~/proj/app.ts`&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="bp"&gt;False&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
        &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;`clip-01.mp4`&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="bp"&gt;False&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
        &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;`anthropics/claude-code`&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="bp"&gt;False&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
        &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;no backticks: episode/clip-01.mp4&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="bp"&gt;False&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;text&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;want&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;cases&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;got&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;bool&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;short_paths&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;text&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
        &lt;span class="k"&gt;assert&lt;/span&gt; &lt;span class="n"&gt;got&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="n"&gt;want&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;text&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;got&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;want&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;body&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sa"&gt;b&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;last_assistant_message&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;: &lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;`episode/a.md`&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;
    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;prefix&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;b&lt;/span&gt;&lt;span class="sh"&gt;""&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sa"&gt;b&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="se"&gt;\xef\xbb\xbf&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sa"&gt;b&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="se"&gt;\xef\xbb\xbf\xef\xbb\xbf&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;  &lt;span class="c1"&gt;# none, one BOM, two BOMs
&lt;/span&gt;        &lt;span class="k"&gt;assert&lt;/span&gt; &lt;span class="nf"&gt;decision&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;load&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;prefix&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;body&lt;/span&gt;&lt;span class="p"&gt;)),&lt;/span&gt; &lt;span class="n"&gt;prefix&lt;/span&gt;
    &lt;span class="k"&gt;assert&lt;/span&gt; &lt;span class="nf"&gt;decision&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;stop_hook_active&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;last_assistant_message&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;`a/b.ts`&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;})&lt;/span&gt; &lt;span class="ow"&gt;is&lt;/span&gt; &lt;span class="bp"&gt;None&lt;/span&gt;
    &lt;span class="n"&gt;six&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt; &lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;join&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;`episode/f&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;.md`&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="nf"&gt;range&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;6&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
    &lt;span class="k"&gt;assert&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;(+4 more)&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="nf"&gt;decision&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;last_assistant_message&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;six&lt;/span&gt;&lt;span class="p"&gt;})[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;reason&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;all self-tests passed&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;


&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;--selftest&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;sys&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;argv&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;selftest&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="k"&gt;try&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;out&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;decision&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;load&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;sys&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;stdin&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nb"&gt;buffer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;read&lt;/span&gt;&lt;span class="p"&gt;()))&lt;/span&gt;
    &lt;span class="k"&gt;except&lt;/span&gt; &lt;span class="n"&gt;json&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;JSONDecodeError&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;out&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;json&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;dumps&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;out&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;


&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;__name__&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;__main__&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It flags a path only when it sits inside backticks, contains a &lt;code&gt;/&lt;/code&gt; or a &lt;code&gt;\&lt;/code&gt;, and ends in a file extension. Anything already absolute is skipped: &lt;code&gt;C:\&lt;/code&gt; or &lt;code&gt;C:/&lt;/code&gt;, a leading &lt;code&gt;/&lt;/code&gt; or &lt;code&gt;\&lt;/code&gt;, &lt;code&gt;~&lt;/code&gt;, or a URL. These are the self-test's own cases:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Reply contains&lt;/th&gt;
&lt;th&gt;Result&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;episode/clip-01.mp4&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;flagged&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;episode\clip-01.mp4&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;flagged&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;./src/app.ts&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;flagged&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;src/{a,b}.ts&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;flagged&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;/home/dev/proj/episode/clip-01.mp4&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;left alone: absolute&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;C:\proj\episode\clip-01.mp4&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;left alone: absolute&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;~/proj/app.ts&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;left alone: absolute (home)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;clip-01.mp4&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;left alone: a bare file name&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;anthropics/claude-code&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;left alone: missing extension&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;episode/clip-01.mp4 without backticks&lt;/td&gt;
&lt;td&gt;left alone: outside backticks&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The message is built in &lt;code&gt;decision()&lt;/code&gt;. It names the first two short paths and counts the rest as &lt;code&gt;(+N more)&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;python stop_hook_full_path.py --selftest&lt;/code&gt; runs the built-in cases and prints &lt;code&gt;all self-tests passed&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Adding it to Claude Code
&lt;/h2&gt;

&lt;p&gt;Hooks go in a Claude Code settings file. Which one depends on how far the hook should reach:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;File&lt;/th&gt;
&lt;th&gt;Applies to&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;~/.claude/settings.json&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;every project on your machine&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;.claude/settings.local.json&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;one project, and is meant to stay out of git&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;.claude/settings.json&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;everyone who uses the repository, so use it only if the script is in the repository too&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;If the file already has a &lt;code&gt;hooks&lt;/code&gt; object, merge the &lt;code&gt;Stop&lt;/code&gt; entry into it. On Windows:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"hooks"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"Stop"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"hooks"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
          &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
            &lt;/span&gt;&lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"command"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
            &lt;/span&gt;&lt;span class="nl"&gt;"command"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"python &lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s2"&gt;C:/Users/you/hooks/stop_hook_full_path.py&lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
            &lt;/span&gt;&lt;span class="nl"&gt;"timeout"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;15&lt;/span&gt;&lt;span class="w"&gt;
          &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;On Linux:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"hooks"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"Stop"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"hooks"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
          &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
            &lt;/span&gt;&lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"command"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
            &lt;/span&gt;&lt;span class="nl"&gt;"command"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"python3 /home/you/hooks/stop_hook_full_path.py"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
            &lt;/span&gt;&lt;span class="nl"&gt;"timeout"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;15&lt;/span&gt;&lt;span class="w"&gt;
          &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Both paths are examples. Use the absolute path to wherever you saved the file, and make sure &lt;code&gt;python&lt;/code&gt; (or &lt;code&gt;python3&lt;/code&gt;) is on the &lt;code&gt;PATH&lt;/code&gt; of the shell Claude Code runs it in. On Windows that is Git Bash, or PowerShell if Git Bash is not installed. &lt;code&gt;timeout&lt;/code&gt; is in seconds. Type &lt;code&gt;/hooks&lt;/code&gt; in Claude Code to see the hook listed. The hooks reference says edits to settings files are normally picked up automatically.&lt;/p&gt;

&lt;h2&gt;
  
  
  Mistake 1: a byte order mark made the hook exit without an error
&lt;/h2&gt;

&lt;p&gt;The check at that point was a short script. It already used &lt;code&gt;decision&lt;/code&gt; and &lt;code&gt;reason&lt;/code&gt;, because the field mistake below came first:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;json&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;re&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;sys&lt;/span&gt;

&lt;span class="n"&gt;raw&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;sys&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;stdin&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;read&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="k"&gt;try&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;data&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;json&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;loads&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;raw&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;except&lt;/span&gt; &lt;span class="nb"&gt;Exception&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;sys&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;exit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;msg&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;last_assistant_message&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="n"&gt;bad&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;re&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;findall&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;r&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;`((?![A-Za-z]:)[\w.-]+\\[^`]+)`&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;msg&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;bad&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;json&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;dumps&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;decision&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;block&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                      &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;reason&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Use absolute paths, not: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;bad&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;}))&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Fed the same payload from two shells, it behaved two ways in the video. In Bash, &lt;code&gt;python check_rules_v1.py &amp;lt; payload.json&lt;/code&gt; printed the block decision. In Windows PowerShell 5.1, &lt;code&gt;Get-Content payload.json | python check_rules_v1.py&lt;/code&gt; printed nothing and reported no error. That depends on the console: on a default console with input code page 850, I got the block decision from the same command. The two settings that decide it are below. &lt;code&gt;check_rules_v1.py&lt;/code&gt;, &lt;code&gt;peek.py&lt;/code&gt; (used below) and &lt;code&gt;payload.json&lt;/code&gt;, the sample hook input, are in the repo's &lt;code&gt;demo-bom&lt;/code&gt; folder.&lt;/p&gt;

&lt;p&gt;The cause is in the first bytes Python reads. A byte order mark is the three bytes &lt;code&gt;EF BB BF&lt;/code&gt; that some tools put at the very start of UTF-8 text, and &lt;code&gt;json.loads&lt;/code&gt; raises on one. When PowerShell pipes &lt;code&gt;payload.json&lt;/code&gt; to Python it can add one. My &lt;code&gt;except Exception: sys.exit(0)&lt;/code&gt; swallowed the error, so the hook exited quietly and blocked nothing. That looks the same as a hook with nothing to flag.&lt;/p&gt;

&lt;p&gt;The fix reads bytes, decodes them as UTF-8, and strips every leading mark before parsing. It strips every mark, not one, because the pipe can add two (the list below shows when):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;raw&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;sys&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;stdin&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nb"&gt;buffer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;read&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;decode&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;utf-8&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;lstrip&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="se"&gt;\ufeff&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Two settings decide how many marks Python receives. &lt;code&gt;$OutputEncoding&lt;/code&gt; is the encoding PowerShell uses when it pipes data into a program. The console's input code page is the numbered character set a Windows console uses for the text it reads and writes. A second script, &lt;code&gt;peek.py&lt;/code&gt;, prints the first bytes Python receives as hex, and &lt;code&gt;7B 22&lt;/code&gt; is &lt;code&gt;{"&lt;/code&gt;, the start of the file. With both settings on UTF-8, Python received &lt;code&gt;EF BB BF EF BB BF 7B 22 68&lt;/code&gt;: two marks, and the check printed nothing.&lt;/p&gt;

&lt;p&gt;First nine bytes Python receives, by console input code page and &lt;code&gt;$OutputEncoding&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;850   / default   7B 22 68 6F 6F 6B 5F 65 76   v1 blocks
850   / UTF-8     EF BB BF 7B 22 68 6F 6F 6B   v1 silent (one byte order mark)
65001 / default   EF BB BF 7B 22 68 6F 6F 6B   v1 silent (one byte order mark)
65001 / UTF-8     EF BB BF EF BB BF 7B 22 68   v1 silent (two byte order marks)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Measured with &lt;code&gt;Get-Content payload.json | python peek.py&lt;/code&gt;. &lt;code&gt;EF BB BF&lt;/code&gt; is a UTF-8 byte order mark. &lt;code&gt;7B 22&lt;/code&gt; is &lt;code&gt;{"&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;I measured this in non-interactive &lt;code&gt;powershell.exe -NoProfile -File&lt;/code&gt; runs on Windows PowerShell 5.1, setting &lt;code&gt;[Console]::InputEncoding&lt;/code&gt; inside the script. I did not test PowerShell 7. Run &lt;code&gt;peek.py&lt;/code&gt; against your own pipe before you trust a hook there.&lt;/p&gt;

&lt;p&gt;I tested this by feeding the hook from PowerShell myself. I have not measured what Claude Code itself writes to a hook's stdin, so the hook strips the mark either way.&lt;/p&gt;

&lt;p&gt;Reading text with &lt;code&gt;sys.stdin.read()&lt;/code&gt; is not enough on Windows. &lt;code&gt;PYTHONIOENCODING&lt;/code&gt; is an environment variable that overrides the encoding Python uses for stdin and stdout. When it is not set, Python 3.11 decodes a pipe with the system code page (cp1252 on my machine), and there the mark arrives as three other characters, so &lt;code&gt;lstrip&lt;/code&gt; finds nothing. Setting &lt;code&gt;PYTHONUTF8=1&lt;/code&gt;, Python's UTF-8 mode, changes that as well.&lt;/p&gt;

&lt;p&gt;I had that wrong at first. The demo's first fix used &lt;code&gt;sys.stdin.read()&lt;/code&gt;. It passed in a session where &lt;code&gt;PYTHONIOENCODING&lt;/code&gt; was set to UTF-8 and failed in a clean one. The repo hook reads bytes the same way, but its first copy used Python's &lt;code&gt;utf-8-sig&lt;/code&gt; codec, which removes one mark, so the two-mark case still failed the same silent way. The self-test now sends none, one and two.&lt;/p&gt;

&lt;h2&gt;
  
  
  Mistake 2: the field name
&lt;/h2&gt;

&lt;p&gt;Before that, my very first version printed &lt;code&gt;systemMessage&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{"systemMessage": "Use absolute paths, not: scripts\\check.py"}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The hooks reference describes &lt;code&gt;systemMessage&lt;/code&gt; as a warning message shown to the user. Claude did not react to it, so nothing changed. The change that worked was two lines:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight diff"&gt;&lt;code&gt;&lt;span class="gd"&gt;-    print(json.dumps({"systemMessage":
-                      f"Use absolute paths, not: {bad[0]}"}))
&lt;/span&gt;&lt;span class="gi"&gt;+    print(json.dumps({"decision": "block",
+                      "reason": f"Use absolute paths, not: {bad[0]}"}))
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I did not keep that first version. The diff is a reconstruction of it, made for the video.&lt;/p&gt;

&lt;h2&gt;
  
  
  Mistake 3: a check that rejected braces
&lt;/h2&gt;

&lt;p&gt;One reply used brace shorthand: &lt;code&gt;social\clip-0{1,2}-9x16.mp4&lt;/code&gt; means &lt;code&gt;social\clip-01-9x16.mp4&lt;/code&gt; and &lt;code&gt;social\clip-02-9x16.mp4&lt;/code&gt; in one name. My old pattern for a path segment covered letters, digits, dots and dashes. I did not keep it, so this one-line check does the same job, and a brace matches none of it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;python -c "import re; print(re.match(r'^[\w.\-]+$', 'clip-0{1,2}-9x16.mp4'))"
None
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The name failed the pattern, so the check ignored the reply. The pattern in the repo's hook allows braces and commas, &lt;code&gt;^[\w.\-{}, ]+$&lt;/code&gt;, and the self-test includes &lt;code&gt;src/{a,b}.ts&lt;/code&gt;. In my own hook, &lt;code&gt;looks_like_relative_path&lt;/code&gt; returned &lt;code&gt;True&lt;/code&gt; for the same name after the change.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where it stops
&lt;/h2&gt;

&lt;p&gt;It reads the last reply only. It sees paths inside backticks and nothing else, so a path Claude writes without backticks gets through. A path with a line number, &lt;code&gt;src/app.ts:12&lt;/code&gt;, is not flagged. A code span such as &lt;code&gt;python/3.11&lt;/code&gt; is flagged although it is not a path. It has run on one Windows machine and in one Linux container, and not on macOS. The byte order mark behaviour above is what I measured on that one machine.&lt;/p&gt;

&lt;h2&gt;
  
  
  The code and the video
&lt;/h2&gt;

&lt;p&gt;The hook, its self-test, both byte order mark scripts and the Linux demo are in &lt;a href="https://github.com/thekilteddev/claude-code-stop-hook-full-path" rel="noopener noreferrer"&gt;claude-code-stop-hook-full-path&lt;/a&gt;, under the MIT licence. The video walks through the same hook: &lt;a href="https://youtu.be/LD_rZm5MwWs" rel="noopener noreferrer"&gt;https://youtu.be/LD_rZm5MwWs&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;This is an independent project, not affiliated with or endorsed by Anthropic.&lt;/p&gt;

</description>
      <category>claudecode</category>
      <category>hooks</category>
      <category>python</category>
      <category>windows</category>
    </item>
    <item>
      <title>The verification tax</title>
      <dc:creator>the kilted dev</dc:creator>
      <pubDate>Sat, 03 Oct 2026 12:28:00 +0000</pubDate>
      <link>https://dev.to/thekilteddev/the-verification-tax-kn2</link>
      <guid>https://dev.to/thekilteddev/the-verification-tax-kn2</guid>
      <description>&lt;div&gt;
    &lt;iframe src="https://www.youtube.com/embed/O5cFv2Qn59U" width="315" height="560"&gt;
    &lt;/iframe&gt;
  &lt;/div&gt;


&lt;p&gt;A session narrating its own work inline, no delegation, spent 78% of its context window across&lt;br&gt;
two long stretches with almost no back-and-forth from whoever had asked for it. A separate&lt;br&gt;
session, same shape, burned over a million tokens in one pass. Neither had done anything wrong.&lt;br&gt;
Both had already made the right call on which model to use. They just ran the work themselves&lt;br&gt;
instead of handing it off, and talked through every step on the way.&lt;/p&gt;

&lt;p&gt;The fix looked obvious once it had a name: a task can be the right tier and still be the wrong&lt;br&gt;
thing to run inline. Long, low-interaction work burns the same resource, the controlling&lt;br&gt;
session's own context window, no matter which model is doing it or what that model costs.&lt;br&gt;
Background it. Default to a brief checkpoint instead of a running commentary. Cheap rule, easy to&lt;br&gt;
state, and it should have been the end of it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Testing it on something real
&lt;/h2&gt;

&lt;p&gt;The next real chance to watch the rule work was an actual five-task build: a search feature&lt;br&gt;
threaded through several existing functions, tested live in a browser as each piece landed. Every&lt;br&gt;
task went to a subagent with a full brief and a strict report contract: done, done with concerns,&lt;br&gt;
blocked, pick one, or put the detail in a file rather than the reply. Exactly what the rule asked&lt;br&gt;
for. Implementation never ran inline.&lt;/p&gt;

&lt;p&gt;The controlling session's own context climbed anyway. Not dramatically, four points over about&lt;br&gt;
three hours, but steadily, the whole time, driven by the same thing the rule was written to stop:&lt;br&gt;
long stretches of low-interaction activity, just moved to a different part of the job.&lt;/p&gt;

&lt;h2&gt;
  
  
  What moved into the gap
&lt;/h2&gt;

&lt;p&gt;Dispatching the implementation only covers what happens inside the dispatch. It does nothing for&lt;br&gt;
two costs that stay with the controller regardless of how well the dispatch is written.&lt;/p&gt;

&lt;p&gt;One is the brief itself. A good dispatch spec spells out its constraints, the known gotchas, the&lt;br&gt;
exact test sequences, on purpose, so the thing doing the work doesn't have to guess. That text&lt;br&gt;
gets paid for twice: once to write, once for the controller to carry in its own history after&lt;br&gt;
sending it.&lt;/p&gt;

&lt;p&gt;The other is the check afterward. The controlling session read every report against the actual&lt;br&gt;
diff, and independently re-tested several claims rather than taking them on trust. None of that&lt;br&gt;
was delegated. It moved from doing the work to checking it, a category of cost the original rule&lt;br&gt;
never named.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Phase&lt;/th&gt;
&lt;th&gt;What it costs&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;The brief&lt;/td&gt;
&lt;td&gt;Constraints, known gotchas, exact test sequences. The controller writes it, then carries it for the rest of the run.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;The work&lt;/td&gt;
&lt;td&gt;One subagent per task, each with a window of its own. The only phase the rule ever reached.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;The check&lt;/td&gt;
&lt;td&gt;Every report read against the diff, several claims re-run. All of it back on the controller.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Three phases in the build. Only the middle one ever left the controlling session.&lt;/p&gt;

&lt;h2&gt;
  
  
  The check wasn't wasted
&lt;/h2&gt;

&lt;p&gt;If the fix had been "verify less," the numbers would look better and the build would be worse. The&lt;br&gt;
verification pass caught three real problems in that one run. Twice, a report said something&lt;br&gt;
hadn't worked when the code was fine and the test had failed for an unrelated reason. Once, a&lt;br&gt;
report went quiet about a step it had skipped rather than saying so. None of the three was an&lt;br&gt;
actual defect in the code. Someone caught all three only by checking instead of trusting the&lt;br&gt;
report, and every one of them came out of work done by a cheaper, less careful process than the&lt;br&gt;
one doing the checking.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;That's the tax nobody had priced yet: route the doing to something cheaper, and the checking gets more necessary, not less.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;And the checking is exactly the kind of long, low-interaction work the rule already knew how to&lt;br&gt;
handle. Nobody had told it to.&lt;/p&gt;

&lt;h2&gt;
  
  
  A quieter comparison, running at the same time
&lt;/h2&gt;

&lt;p&gt;Two other sessions were doing unrelated work in the same window, and both had something the build&lt;br&gt;
above didn't have: a real stopping point built into the task itself, an approval gate in one case,&lt;br&gt;
a direct question from whoever had started the session in the other. Neither ran anywhere near as&lt;br&gt;
long unsupervised.&lt;/p&gt;

&lt;p&gt;Both still climbed. Less than the fully autonomous build, meaningfully less, but nowhere near the&lt;br&gt;
order of magnitude a "no human in the loop" story would predict. A handful of points of the same&lt;br&gt;
resource, spent the same way, just less of it. Whatever drives the growth isn't only whether a&lt;br&gt;
person was watching. It looks closer to how much a session writes and reads on its own, per turn,&lt;br&gt;
regardless of who's nominally there.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Session&lt;/th&gt;
&lt;th&gt;Share of context held by message history&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Autonomous build&lt;/td&gt;
&lt;td&gt;39.2% (climbed from 35.3%)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Gated, direct question&lt;/td&gt;
&lt;td&gt;30.1%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Gated, approval&lt;/td&gt;
&lt;td&gt;26.4%&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  What changed, and what didn't
&lt;/h2&gt;

&lt;p&gt;The rule that said background long inline work now covers long inline checking too: re-reading a&lt;br&gt;
report, or re-running a live test to confirm a claim independently. Same resource, same fix, just&lt;br&gt;
applied to a phase the rule hadn't reached yet.&lt;/p&gt;

&lt;p&gt;It doesn't make the checking optional. The three catches in the test run are the argument against&lt;br&gt;
that shortcut, not for it. The actual fix isn't spending less attention on verification. It's&lt;br&gt;
spending that attention somewhere that doesn't cost the one session that has to stay coherent for&lt;br&gt;
the whole build.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://thekilted.dev/the-verification-tax/" rel="noopener noreferrer"&gt;thekilted.dev/the-verification-tax&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>orchestration</category>
      <category>aiagents</category>
      <category>softwareengineering</category>
      <category>buildinpublic</category>
    </item>
    <item>
      <title>Still carrying the diagnosis</title>
      <dc:creator>the kilted dev</dc:creator>
      <pubDate>Tue, 29 Sep 2026 06:39:24 +0000</pubDate>
      <link>https://dev.to/thekilteddev/still-carrying-the-diagnosis-4g96</link>
      <guid>https://dev.to/thekilteddev/still-carrying-the-diagnosis-4g96</guid>
      <description>&lt;div&gt;
    &lt;iframe src="https://www.youtube.com/embed/BfM44aK6uCQ" width="315" height="560"&gt;
    &lt;/iframe&gt;
  &lt;/div&gt;


&lt;p&gt;Field notes from a local-model pipeline. A coding harness that had already proved itself went&lt;br&gt;
silent for an hour, and its replacement shipped the same session. The write-up explaining why&lt;br&gt;
needed a correction of its own.&lt;/p&gt;

&lt;p&gt;The plan was to have a local model write six Python modules of a real application, one at a time,&lt;br&gt;
each one gated on a test suite it had to make pass. The harness for that job was already chosen,&lt;br&gt;
already benchmarked, and already recorded as working.&lt;/p&gt;

&lt;p&gt;It produced nothing. Not bad code, no code. Zero files, for about an hour.&lt;/p&gt;

&lt;p&gt;What happened next is worth reading less for the fix, which took a session, than for what happened&lt;br&gt;
to the explanation afterward. The root cause was written down and spread into five documents, then&lt;br&gt;
disproved four days later by a controlled retest run from a different project. And the correction&lt;br&gt;
that replaced it, checked now against a benchmark run two weeks earlier, does not hold up against&lt;br&gt;
that evidence either.&lt;/p&gt;

&lt;h2&gt;
  
  
  The benchmark behind it
&lt;/h2&gt;

&lt;p&gt;The tool was &lt;code&gt;little-coder&lt;/code&gt;, a small command-line coding agent tuned for small models, a thin&lt;br&gt;
wrapper over the &lt;code&gt;pi&lt;/code&gt; agent framework, installed from npm, pointed at a local model server.&lt;/p&gt;

&lt;p&gt;It hadn't been picked casually. On 4 July it ran a build-a-word-search-game benchmark on this&lt;br&gt;
machine and scored 8 out of 8, with a build time of 2.1 minutes, including a follow-up fix that&lt;br&gt;
didn't regress anything already working. Three files written to disk by the model's own write&lt;br&gt;
tool. Criterion one of that benchmark is literally "3 files saved to disk," and it passed.&lt;/p&gt;

&lt;p&gt;That run used &lt;code&gt;little-coder&lt;/code&gt; v1.9.11 against a 30-billion-parameter mixture-of-experts coding&lt;br&gt;
model, locally aliased &lt;code&gt;qwen3-coder-30b&lt;/code&gt;. That pairing matters later.&lt;/p&gt;

&lt;p&gt;The session built a launcher script around the winning recipe so no future session would have to&lt;br&gt;
rediscover the setup, including a prompt rule found the hard way: the word "tool" can't appear&lt;br&gt;
anywhere in the prompt, because even "command-line tool" trips a formatting failure in the model's&lt;br&gt;
output. That's the level of tuning already banked before any of this started.&lt;/p&gt;

&lt;h2&gt;
  
  
  Then nothing, silently
&lt;/h2&gt;

&lt;p&gt;The next day, given the six modules to delegate, the harness failed completely.&lt;/p&gt;

&lt;p&gt;The shape of the failure is the part worth sitting with. The command exited with status 0. It&lt;br&gt;
printed the model's reply. It wrote no file. The reply was raw &lt;code&gt;&amp;lt;function=write&amp;gt;&lt;/code&gt; XML, the model&lt;br&gt;
describing a write in text form instead of the harness receiving a structured call it could&lt;br&gt;
actually execute. Nothing parsed it, and nothing complained.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Exit 0 with no output written is the worst failure mode a delegated task can have, because every&lt;br&gt;
cheap way of checking says it worked.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;A caller reading the exit code sees success. A caller reading stdout sees a confident, well-formed&lt;br&gt;
response. Only a caller that goes and looks at the filesystem sees the truth.&lt;/p&gt;

&lt;p&gt;The first attempt to get modules out of it was a cheap orchestrator agent, given room to fix the&lt;br&gt;
harness itself. It ran for roughly an hour and about fifty tool calls, delivered zero modules, and&lt;br&gt;
along the way took an action nobody had sanctioned: a global &lt;code&gt;npm install -g&lt;/code&gt; that upgraded&lt;br&gt;
&lt;code&gt;little-coder&lt;/code&gt; from 1.9.11 to 1.9.13, mutating machine-wide tooling mid-run. That upgrade is the&lt;br&gt;
one variable that changed between the benchmark that worked and the delegation that didn't.&lt;/p&gt;

&lt;p&gt;The failure was then reproduced directly, by hand, rather than trusted from the agent's own&lt;br&gt;
report. That's the only reason any of what follows is checkable at all.&lt;/p&gt;

&lt;h2&gt;
  
  
  Depending on less
&lt;/h2&gt;

&lt;p&gt;Rather than downgrade or re-pin a command-line tool that had already proved it could change&lt;br&gt;
underneath a running project, the session wrote a replacement in the same sitting:&lt;br&gt;
&lt;code&gt;delegate-via-rest.py&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Its design is the whole lesson. The model still writes all the code. What the driver removes is&lt;br&gt;
the model's need to call a tool at all. It sends the specification and the test file to the local&lt;br&gt;
server's chat endpoint, takes the reply, pulls out the largest fenced code block, writes that block&lt;br&gt;
to disk itself, runs pytest, and feeds any failure text back for another round. It talks only to&lt;br&gt;
&lt;code&gt;127.0.0.1&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;That takes the entire tool-calling scaffold, the layer that had just failed, out of the critical&lt;br&gt;
path. Writing a file is something the harness can do reliably. Asking a model to emit a structured&lt;br&gt;
call that a third-party parser has to recognise depends on two things nobody in this pipeline&lt;br&gt;
controls. The driver keeps the model doing the one part only it can do, and does the mechanical&lt;br&gt;
part itself.&lt;/p&gt;

&lt;p&gt;Rounds ran 8 to 30 seconds on this hardware. Across the six modules, three passed their tests on&lt;br&gt;
the first attempt. The other three converged within a few rounds each, usually by sharpening the&lt;br&gt;
specification rather than coaxing the model. The finished application ran to 34 commits and 52&lt;br&gt;
passing tests.&lt;/p&gt;

&lt;p&gt;Two features were added later, and each one encodes a failure that had already happened. A&lt;br&gt;
&lt;code&gt;--selfcheck&lt;/code&gt; preflight runs a trivial task end to end through the real endpoint before any real&lt;br&gt;
dispatch, because a "verified working" harness had already broken silently between sessions. A&lt;br&gt;
&lt;code&gt;--probe&lt;/code&gt; flag runs a held-out adversarial test file after the acceptance tests go green, and its&lt;br&gt;
output is deliberately never shown to the model, because feeding it back would let the model&lt;br&gt;
overfit the probe the same way weak acceptance tests had already overfit twice. The driver also&lt;br&gt;
carries four distinct exit codes instead of a plain pass or fail, including one specifically for&lt;br&gt;
tests green but the held-out probe failed. After a silent exit-0 incident, none of that reads as&lt;br&gt;
over-engineering.&lt;/p&gt;

&lt;h2&gt;
  
  
  The cause, as recorded
&lt;/h2&gt;

&lt;p&gt;The explanation written down was that version 1.9.13 no longer recognises the model's id, so it&lt;br&gt;
never attaches the tool-calling scaffold, so the model falls back to emitting raw XML.&lt;/p&gt;

&lt;p&gt;There was real evidence behind it. When the run failed, the harness printed a warning that the&lt;br&gt;
model wasn't found for the provider and it was falling back to a custom model id. A warning about&lt;br&gt;
the model id, sitting right next to a failure about the model not being wired up correctly, in a&lt;br&gt;
run whose only recent change was a version bump. It read as confirmation.&lt;/p&gt;

&lt;p&gt;That explanation made it into the trial write-up, the launcher's own header, the project's&lt;br&gt;
constraints file, its decisions log, and its tool registry.&lt;/p&gt;

&lt;h2&gt;
  
  
  The retest
&lt;/h2&gt;

&lt;p&gt;Four days later, a different project on the same machine retested the launcher as part of an&lt;br&gt;
unrelated tool inventory, and reproduced the failure in 46 seconds. Rather than stop at&lt;br&gt;
reproduction, it ran controls.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Path&lt;/th&gt;
&lt;th&gt;Result&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Local server &lt;code&gt;/v1&lt;/code&gt; directly, with tools, non-streaming&lt;/td&gt;
&lt;td&gt;tool calls parsed correctly&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Local server &lt;code&gt;/v1&lt;/code&gt; directly, with tools, streaming&lt;/td&gt;
&lt;td&gt;tool calls parsed correctly&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Local server &lt;code&gt;/v1&lt;/code&gt; directly, no tools&lt;/td&gt;
&lt;td&gt;prose, no XML leak&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;little-coder&lt;/code&gt; + &lt;code&gt;qwen3-coder-30b&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;raw XML, no file written&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;little-coder&lt;/code&gt; + &lt;code&gt;qwen3.5&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;writes the file&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;little-coder&lt;/code&gt; + &lt;code&gt;qwen3.5:latest&lt;/code&gt;, an unregistered id&lt;/td&gt;
&lt;td&gt;writes the file, warning fires&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;That last row is the control, and it's the one that actually settles the question. It holds the&lt;br&gt;
model constant and only varies whether the id is registered, and the file gets written anyway even&lt;br&gt;
though the warning still fires.&lt;/p&gt;

&lt;p&gt;So the warning was benign, and id resolution wasn't the cause of anything. The original explanation&lt;br&gt;
had inferred causation from adjacency: someone saw a warning next to a failure and wrote down a&lt;br&gt;
mechanism to connect them.&lt;/p&gt;

&lt;p&gt;The retest killed two of its own hypotheses too, which is what separates a control from a&lt;br&gt;
demonstration. It expected the harness might be omitting the tools array from the request.&lt;br&gt;
Refuted, since a different model tool-calls fine through that same adapter. It expected the&lt;br&gt;
unregistered id to disable native tool calling outright. Refuted by the control row itself.&lt;/p&gt;

&lt;p&gt;The correction went back into the record as a marked block, not a silent edit. The wrong claim is&lt;br&gt;
still sitting there, readable, right next to the right one.&lt;/p&gt;

&lt;h2&gt;
  
  
  The correction was a claim too
&lt;/h2&gt;

&lt;p&gt;The retest's own write-up had been careful. It reported exactly what it varied, and said plainly&lt;br&gt;
that it hadn't resolved why the harness's request shape defeats that particular model's parser, and&lt;br&gt;
hadn't chased it any further.&lt;/p&gt;

&lt;p&gt;What travelled outward from it was shorter: not the id, the model.&lt;/p&gt;

&lt;p&gt;That compression is checkable, and it doesn't hold. If the fault were the model itself, the same&lt;br&gt;
model through the same harness would not have scored 8 out of 8 two weeks earlier, writing three&lt;br&gt;
files to disk cleanly. Same box, same model server, same alias, same command-line tool. The one&lt;br&gt;
thing that changed between the run that worked and the run that no-ops is the version bump the&lt;br&gt;
orchestrator performed without asking: 1.9.11 against 1.9.13.&lt;/p&gt;

&lt;p&gt;The retest ran entirely on 1.9.13. It never varied the version, because the version wasn't the axis&lt;br&gt;
it set out to test. It was testing the id-resolution claim, and on that axis its own work holds up&lt;br&gt;
fine. What the evidence actually supports is narrower and less quotable than either slogan: on&lt;br&gt;
1.9.13, this specific model and this specific harness don't work together, while the same harness&lt;br&gt;
works fine with a different model and the same model works fine without that harness. It's an&lt;br&gt;
interaction. The mechanism behind it is still unknown.&lt;/p&gt;

&lt;p&gt;"The harness broke" was too broad a claim. "The model is at fault" replaced it with a different&lt;br&gt;
claim of the same shape, reached the same way: by reading a summary instead of the run underneath&lt;br&gt;
it. The 8-out-of-8 record was sitting the whole time in a benchmarks file the correction never had&lt;br&gt;
a reason to open.&lt;/p&gt;

&lt;h2&gt;
  
  
  Two places the correction didn't reach
&lt;/h2&gt;

&lt;p&gt;The correction was folded into four files. The message carrying it listed five places the wrong&lt;br&gt;
claim lived, and one of those was a session log left alone on purpose, because append-only history&lt;br&gt;
shouldn't get rewritten after the fact.&lt;/p&gt;

&lt;p&gt;Nine days later, a check of the record for this piece found the refuted mechanism still&lt;br&gt;
stated as plain fact in two places nobody had listed.&lt;/p&gt;

&lt;p&gt;The trial write-up still said the harness "no longer recognises the model id... fails to attach&lt;br&gt;
the tool-calling scaffold." And the driver's own docstring, the first thing anyone reads before&lt;br&gt;
using it, still explained its own existence as "after a version bump it stops recognising the&lt;br&gt;
model id."&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The tool built because of the diagnosis was still carrying the diagnosis, after the diagnosis&lt;br&gt;
itself had been withdrawn.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Not because anyone ignored the correction. Because propagating a correction requires knowing every&lt;br&gt;
place the original claim was written, and that list had been made from memory instead of from a&lt;br&gt;
search. Both have since been fixed, the docstring in place, the trial write-up with a dated&lt;br&gt;
correction block that leaves the original wording readable, because a results file is a record of&lt;br&gt;
what was believed at the time, not something to quietly rewrite.&lt;/p&gt;

&lt;p&gt;The real question isn't how two copies were missed. It's why anyone thought four was the complete&lt;br&gt;
set. A claim written into five documents has usually been written into more than five, and the&lt;br&gt;
cheap check, searching for the sentence instead of trying to recall where it went, was sitting&lt;br&gt;
there the whole time, unused.&lt;/p&gt;

&lt;h2&gt;
  
  
  What actually carries over
&lt;/h2&gt;

&lt;p&gt;The smallest surface wins twice here, not once. The driver works because it asks the model for&lt;br&gt;
text and writes the file itself, instead of trusting a structured call to survive a parser, a&lt;br&gt;
wrapper, and a version bump all at once. The same instinct applies to how the record of what&lt;br&gt;
happened gets kept. Exit 0 with no artefact is the failure mode worth designing against, which&lt;br&gt;
means checking for the file rather than the status code. Pinning the versions of any tool a&lt;br&gt;
pipeline depends on matters for the same reason, and no agent should be installing anything&lt;br&gt;
globally on its own initiative. A correction is a new claim, not a return to neutral, and it earns&lt;br&gt;
the same scrutiny the original claim never got: a real search for every copy of what it's&lt;br&gt;
replacing, not a list made from memory.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://thekilted.dev/carried-the-diagnosis/" rel="noopener noreferrer"&gt;thekilted.dev/carried-the-diagnosis&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>localllm</category>
      <category>debugging</category>
      <category>buildinpublic</category>
      <category>opensource</category>
    </item>
    <item>
      <title>Never installable</title>
      <dc:creator>the kilted dev</dc:creator>
      <pubDate>Sat, 19 Sep 2026 07:51:56 +0000</pubDate>
      <link>https://dev.to/thekilteddev/never-installable-2fh4</link>
      <guid>https://dev.to/thekilteddev/never-installable-2fh4</guid>
      <description>&lt;div&gt;
    &lt;iframe src="https://www.youtube.com/embed/F87SUzqVDc8" width="315" height="560"&gt;
    &lt;/iframe&gt;
  &lt;/div&gt;


&lt;p&gt;For three days of real-device testing, the app worked, or seemed to. Every test passed. Every&lt;br&gt;
review came back clean. On a real phone, it had never once been installable, and nothing had ever&lt;br&gt;
said so.&lt;/p&gt;

&lt;p&gt;This is a proof-of-concept, not an NHS product. It was built by one technical person working&lt;br&gt;
alongside an NHS dietetic team. No patient data exists anywhere in it. Nothing leaves the&lt;br&gt;
device unless a lookup runs, and even then it sends nothing but the barcode number itself. Clients&lt;br&gt;
had been sending in photos and rough text descriptions of what they'd eaten, and a dietitian was&lt;br&gt;
manually reading that, finding the matching product, and keying it into Nutritics, the accredited&lt;br&gt;
nutrition-analysis software the team already used. Nutritics has its own patient-facing app, Libro,&lt;br&gt;
that would let clients log the food themselves and skip all of that. Libro just isn't enabled for&lt;br&gt;
this region, and turning it on is weeks away at best, if it happens at all. So the trial runs a&lt;br&gt;
smaller experiment instead: making the manual keying-in as fast and unambiguous as it can be, and&lt;br&gt;
doubling as evidence for whether Libro is worth switching on.&lt;/p&gt;

&lt;p&gt;That's the frame. The build itself comes down to two decisions that held, and a run of confidently&lt;br&gt;
wrong guesses before the real one.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why it never asserts a calorie figure
&lt;/h2&gt;

&lt;p&gt;The first thing tried was the obvious move: point a consumer nutrition app at a barcode and let it&lt;br&gt;
fill in the numbers. Cronometer's first four barcode and photo lookups all came back wrong.&lt;br&gt;
Correcting them by hand was painful enough that the question settled itself. MyFitnessPal has kept&lt;br&gt;
barcode scanning behind a Premium paywall since October 2022, so the one app most clients already&lt;br&gt;
had was already a dead end. Only Open Food Facts, a free, open, no-account database of product&lt;br&gt;
names, gave anything back reliably, and even that only names a product. It doesn't know its&lt;br&gt;
nutrition.&lt;/p&gt;

&lt;p&gt;Reading digits off a barcode is deterministic and checkable, and that was never where Cronometer&lt;br&gt;
failed. It failed at mapping those digits to the right nutrition record through a crowdsourced&lt;br&gt;
database, and that's the exact spot it got wrong four times running. So the tool draws a hard line&lt;br&gt;
at that exact seam. It reads barcodes. It never writes a nutrition figure. Nutritics, with roughly&lt;br&gt;
1.6 million EUROFIR-accredited foods, stays the only source of truth for what anything actually&lt;br&gt;
contains.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;If the tool never claims a calorie number, it can never be the reason someone has to unpick a&lt;br&gt;
wrong one later.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The same discipline runs through barcode validation. A GS1 check digit rejected every single-digit&lt;br&gt;
misread thrown at it in testing, 351 out of 351, which covers the failure mode that actually&lt;br&gt;
happens when a camera misreads a smudged label. But roughly one in ten arbitrary thirteen-digit&lt;br&gt;
numbers will satisfy that check by pure chance, tested against a hundred thousand random numbers,&lt;br&gt;
so "the check digit agrees" only ever means the check digit agrees, not that the barcode is&lt;br&gt;
definitely the right product. An earlier draft of the docs called barcodes "self-verifying." The&lt;br&gt;
project corrected that before shipping, because it was a stronger claim than the tool could&lt;br&gt;
actually back.&lt;/p&gt;

&lt;h2&gt;
  
  
  Thirty-five foods, not a hundred and twenty
&lt;/h2&gt;

&lt;p&gt;The one insight that shaped everything downstream came from watching how Nutritics itself behaves,&lt;br&gt;
not from the client side at all. Its diet-log workspace works like a spreadsheet, and once a&lt;br&gt;
dietitian has searched for a food and dropped it into one day's log, that same food can be added to&lt;br&gt;
any other day or meal without searching again.&lt;/p&gt;

&lt;p&gt;A week's diary might run to something like a hundred and twenty logged eating occasions. Searched&lt;br&gt;
food by food, that's a hundred and twenty searches. But a person doesn't eat a hundred and twenty&lt;br&gt;
different things in a week. The same handful of items repeat across breakfasts and snacks. Counted&lt;br&gt;
by distinct food instead of by occasion, the same week might only need thirty-five searches. That's&lt;br&gt;
the number the design actually optimises, and it's why the data model splits in two: a Food&lt;br&gt;
Library, where every distinct food gets listed once against a short code, and a Daily Log, where&lt;br&gt;
each eating occasion just references a code and a quantity. A dietitian keying a week's diary isn't&lt;br&gt;
doing a hundred and twenty lookups anymore. They're doing thirty-five, and then a lot of quick&lt;br&gt;
copy-paste.&lt;/p&gt;

&lt;p&gt;It's a small reframe with a real effect on the person actually doing the keying, and it came from&lt;br&gt;
reading how the existing software worked rather than guessing at what a food diary "should" look&lt;br&gt;
like.&lt;/p&gt;

&lt;h2&gt;
  
  
  The bugs only a real phone could find
&lt;/h2&gt;

&lt;p&gt;None of this survived contact with a phone unscathed. The front end shipped as a vanilla-JS&lt;br&gt;
progressive web app, deliberately with no build toolchain (this was meant to be a short-lived trial&lt;br&gt;
workaround, not a product, and a bundler is more to maintain than that deserves). Every change&lt;br&gt;
afterward went through a fresh implementer and an independent reviewer before merging, and that&lt;br&gt;
review step earned its keep almost every round.&lt;/p&gt;

&lt;p&gt;The export path took the worst of it. The first version silently did nothing when someone tapped&lt;br&gt;
"Download" on an Android phone in DuckDuckGo, because a CDN script, &lt;code&gt;xlsx.full.min.js&lt;/code&gt;, that the&lt;br&gt;
service worker hadn't cached could fail to load without throwing anything visible. The fix that followed introduced its own bug:&lt;br&gt;
the downloaded file came back as &lt;code&gt;.bin&lt;/code&gt; instead of &lt;code&gt;.xlsx&lt;/code&gt;, because the fallback download mechanism&lt;br&gt;
wasn't reliably setting the file's MIME type on that browser. Fixed by building the download from&lt;br&gt;
an explicit Blob instead. Then a third bug, sneakier than either: the app would report "Downloaded"&lt;br&gt;
with nothing actually appearing, because the click handler waited on three IndexedDB round-trips&lt;br&gt;
before triggering the download, and that wait was long enough for the phone to quietly expire the&lt;br&gt;
tap's permission to trigger one at all. Nothing threw an error, no dialog appeared, and the app&lt;br&gt;
still reported "Downloaded" as if it had. The fix was to pre-build the export the moment the screen&lt;br&gt;
opened, so the tap had almost nothing left to wait on.&lt;/p&gt;

&lt;p&gt;A fourth export bug turned out not to be this app's to fix. Sharing the file to WhatsApp on Chrome&lt;br&gt;
Android threw a permission error even though the browser's own API had said sharing was possible.&lt;br&gt;
An A/B test settled why: a plain text file shared fine, but the identical share, swapped to the&lt;br&gt;
real xlsx MIME type, failed every time. That's Android Chrome's own share implementation rejecting&lt;br&gt;
the file type at the native layer, and the fix is a fallback, not a workaround: catch that&lt;br&gt;
specific failure and drop back to the working download path.&lt;/p&gt;

&lt;p&gt;Of the four export bugs, all found on a real phone, two gave nothing to go on (silent no-op,&lt;br&gt;
nothing downloaded) and were this app's own to fix. The other two threw a visible error, and only&lt;br&gt;
one of those — Android Chrome refusing the file type — turned out not to be this app's bug at all.&lt;/p&gt;

&lt;h2&gt;
  
  
  Two files, sixty-eight bytes each
&lt;/h2&gt;

&lt;p&gt;The bug that cost the most time wasn't in any of that. It was that the app was never actually&lt;br&gt;
installable, on any browser, on any host, the entire time.&lt;/p&gt;

&lt;p&gt;The manifest declared full-size icons, but the two actual icon files behind it were 68-byte&lt;br&gt;
placeholder stubs, one pixel by one pixel. Chrome checks that a PWA's declared icons actually exist&lt;br&gt;
at the sizes it claims. When they don't, nothing in the console warns about it, no error ever&lt;br&gt;
fires, and the "Install app" option just never appears. "Add to Home Screen" still worked, but it&lt;br&gt;
could only ever produce a bookmark shortcut, not a real installed app, so offline never worked&lt;br&gt;
either. The service worker, the manifest, and the caching logic underneath all of it had been&lt;br&gt;
correct from the start.&lt;/p&gt;

&lt;p&gt;Before anyone found the icons, two other theories took the blame instead. First the browser: maybe&lt;br&gt;
DuckDuckGo's PWA support was incomplete. Then the host: maybe something about how Namecheap served&lt;br&gt;
the files was the difference from the version that had worked fine on Netlify. Both theories were&lt;br&gt;
plausible. Both were wrong. An earlier comparison between the two hosts had already been written up&lt;br&gt;
as "decisive, host-specific." The actual difference was that Netlify's service-worker cache&lt;br&gt;
had been warm for months and Namecheap's was cold, and that warm cache had quietly been hiding two&lt;br&gt;
unrelated bugs the whole time. What actually surfaced all three bugs at once was a fresh cache forcing every code&lt;br&gt;
path to run for real, on a real phone, for the first time.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;A wee sixty-eight-byte file doesn't announce itself as the reason anything is broken. It just&lt;br&gt;
sits there, technically present, while every larger theory takes its turn and falls apart first.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Light, not orientation
&lt;/h2&gt;

&lt;p&gt;One more misdiagnosis is worth keeping, mostly for how the test caught it. A habit had formed of&lt;br&gt;
always photographing barcodes horizontally, and it looked like it mattered: a vertically held&lt;br&gt;
barcode seemed to fail more often. The obvious explanation was that the scanner's decoder reads&lt;br&gt;
horizontal scan lines and could miss a rotated barcode outright.&lt;/p&gt;

&lt;p&gt;A direct test said otherwise. A barcode held deliberately vertical, in good light, scanned exactly&lt;br&gt;
as well as a horizontal one. Orientation wasn't the variable. Light was, and the horizontal-photo&lt;br&gt;
habit had just happened to correlate with better lighting, not cause anything on its own. The same&lt;br&gt;
test also cleared the gallery-scan refactor, a different piece of code that had carried an&lt;br&gt;
"unverified on real hardware" flag since it was written. Whatever flakiness it had been suspected&lt;br&gt;
of causing turned out to have nothing to do with it.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's still open
&lt;/h2&gt;

&lt;p&gt;None of this is a finished product, and it isn't meant to be one. The whole tool is a workaround&lt;br&gt;
for not having Libro, and the plan from day one was to retire it without regret the moment Libro&lt;br&gt;
gets switched on for this region, rather than let it grow into something that has to be maintained.&lt;br&gt;
If the manual keying turns out to be genuinely painful even with a well-built sheet in front of the&lt;br&gt;
dietitian, that's the evidence the trial was actually built to produce.&lt;/p&gt;

&lt;p&gt;Either way, what's left isn't a product. It's a barcode reader that only ever claims what it's sure&lt;br&gt;
of, and a debugging log full of things that looked complicated right up until someone found the&lt;br&gt;
actual cause.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://thekilted.dev/never-installable/" rel="noopener noreferrer"&gt;thekilted.dev/never-installable&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>pwa</category>
      <category>debugging</category>
      <category>buildinpublic</category>
    </item>
  </channel>
</rss>
