More from matt.sh
agent-shell: stop spilling your outputs since the beginning of time, ai agents have wanted one thing at one thing only: redirecting stderr to stdout then piping the output to head or tail or grep or sed or awk. That’s all they really want. Except, they do it wrong the majority of the time (because “ai labs” are fundamentally incompetent at software engineering, as we’ve previously discussed before). Common ones I see routinely which are painful and require manual “reminders” into the agent to stop: uv run my-big-honking-test 2>&1 | grep -E "failed:|error:" | head -5 but then the test fails with a non-zero error code, the grep reports an error count, so then the agent RE-RUNS THE ENTIRE TEST with a different grep failure to “find the failing test case” except, the failing test case grep requires “guessing the future” regex, but the first attempt at “guessing the error regex” fails, then code agent continues re-running a 20 minute test suite with different grep filters until you remind it: “FILES EXIST! WE HAVE A FILE SYSTEM! WRITE OUTPUT TO FILES THEN READ THE FILES TO SEE THE ERRORS!” also, since current ai code agents have no feeling for “time” or “effort” they don’t care about running a 30 minute program-stderr-to-stdout-to-pipe-grep 10 times in a row even if each attempt takes 30 minutes. and a more toxic approach is where models decide to use live public URLs for reference material then curl | grep except, again, models try to “guess grep filters”, fail, then re-run the curl a dozen times with different “guess the regex” filters instead of saving the content locally and then searching through it (I often see claude get rate limited or blocked by upstream services because it “curls and greps” the same URLs in a loop, and you have to remind it every time “hey, files exist? you know? use files?”) I’ve run some bulk analysis about how often models “do the wrong thing” or “waste time guessing” (instead of following more proof-based data practices) over my claude session history (you do know all your claude session and all commands and tool calls are saved at ~/.claude right?) and here’s results: ways models try to read things Pattern Count Share of Bash commands Piped into a filter (grep/head/tail/awk/sed/etc.) 123,637 62.8% Bare narrowing command, no pipe 22,963 11.7% – Any pipe at all 135,413 68.8% Bare full-file read (cat) 1,573 0.8% Redirect-to-file, later read in full (“save then read”) 4,301 — common filter patterns guesses: Shape Count Likely context sed (bare, e.g. sed -n 'N,Mp' file) 15,123 line-range paging grep | head 9,497 search, then cap the results cd | head 5,998 cd dir && cmd \| head grep (bare) 4,523 direct search on a file uv | tail 3,864 tailing output of a uv run/uv pip command cd | tail 3,253 cd dir && cmd \| tail tail (bare) 2,764 log/output tailing ls | head 1,699 capped directory listing find | head 1,365 capped file search common slop guess counts: Metric Count Guess-then-give-up-and-read episodes (≥2 narrow attempts, then a full read) 541 Unresolved thrash episodes (≥3 narrow attempts, never followed by a full read) 2,701 Total narrow commands spent inside these episodes 5,006 Resolved episodes closed by the Read tool 447 (83%) Resolved episodes closed by a bare cat 94 (17%) multiple different cmd | filter guesses in a row here are full attempt-count distribution for episodes eventually resolving into a full read (example: running a command with a failed filter, then continuing to run cmd | filterA -> cmd | filterB over and over again until a “filter” matches instead of just saving output to a file and reading directly):
img,video{width:100%} claude-hooker The mystery of claude code over the past year and a half has been how does a world leading ‘AI productization lab’ continually generate such shitty amatuer globally distributed software and services over and over again? It’s almost like staffing a company entirely by 24 year olds seeing their net worth increase by $2 million per month for two years is a bad idea? Even the tech brain infosphere has noticed how claude code’s architecture is absolutely mornoic and amatuer and anthropic just continually ego-sociopath lies and nobody can stop them because hey, when you spend over $2 billion a month renting GPUs run by globally polluting gas turbines, they let you do it. don’t worry, bro, “it’s a javascript game engine in your console, ur not smaht enouf to understand our god-ai logic here!!!” as you may be able to tell, i’m deploying this post in annoyance/anger mode because I don’t understand why me, somebody who can’t afford a place to live and has 20 years of detailed technical experience, is giving free work to trillion dollar “ai” “startups” with good models but apparently abysmally amatuer software engineering practices. i guess it’s part of industry bubble syndrome. It’s not really worth thinking about what drives weird un-self-aware ego-sociopathic-autistic billionaires if you aren’t close enough to change anything in their minds though. The Bad i guess back to the point: given they have made claude so same-system dangerous with its cavalier attitude towards running destructive or system-resource-consuming actions you must install your own safeguards using claude code event hooks.
Kvestigate - Investigate Kubernetes Clusters Ever find yourself given access to a piece of garbage kubernetes cluster and you need need to audit it to figure out what the hell is going on? Say hello to kvestigate your kubernetes investigation and auditing toolkit with the ability to even run ad-hoc workloads beyond the reach of the kubernetes scheduler allocator substrate system by just doing shit on the hosts themselves like computers are supposed to do. ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Language Files Lines Code Comments Blanks ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Python 141 34192 28551 1381 4260 TOML 3 72 57 8 7 YAML 23 1059 718 257 84 ───────────────────────────────────────────────────────────────────────────────── Markdown 18 3983 0 3083 900 |- BASH 13 500 288 141 71 |- Python 6 177 132 27 18 |- YAML 3 218 187 11 20 (Total) 4878 607 3262 1009 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Total 185 40201 29933 4908 5360 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Features kvestigate is a read-first Kubernetes toolkit for investigating clusters, running workloads directly on host machines (no Docker), and safely handing a constrained slice of your cluster resources to AI agents. Three surfaces on one foundation (the official kubernetes client + a privileged node-access DaemonSet): Investigate & plan — audit a cluster, stream logs, exec into pods, and bin-pack a workload onto available GPU/CPU. Read-only by default. Run things host-native — create isolated workspaces on a node’s host OS (tmpfs / disk / hybrid storage, GPUs bound by UUID), sync code in, and launch processes. No container build, no pod scheduling. Host constrained cyberspaces — expose an allow-listed, quota’d, audited slice of those workspace capabilities over HTTP/MCP, so agents and other programs can “upload and run things” without cluster-wide power. Bonus Feature Natively integrates with nvidia-smi to query all nodes for cluster-wide gpu usage and power metrics to see how much of the world you are wasting with your “ai” “workloads”
hyperdjango Following up from opsmas 2025 is spring cleaning 2026. Welcome! To kick off spring cleaning, the first project I’d like to release is: hyperdjango. What is hyperdjango you may ask? You could jump ahead into all docs at the hyperdjango hyperdocs hypersite and find out. Though, what you should be asking: what isn’t hyperdjango?
More in AI
There's a lot of polarising discourse right now about the threat AI poses to humanity. Some think it's a farce and others think we face extinction. Here are my thoughts.
A middle ground between the cybersecurity and AI safety communities
An overview of the current state of the engineering market and the AI skills that are in demand
Wendell Berry died last week at 92 at his home in Port Royal, Kentucky, where he farmed his land using traditional techniques and wrote with ... Read more The post Wendell Berry and the Promise of the Deep Life appeared first on Cal Newport.