Pinned Tweet
I ran AI agents in prod for months the way everyone does: fire it off, hope, scroll the logs later. Then one quietly burned $400 in tokens overnight doing nothing. So I started treating agents like what they actually are : Unix processes. ps. kill. audit. 馃憞
1
14
1,956
The heavy field in a denial log is rollback. A rejected write with no recorded revert path is a pending incident, not a closed event. Log the rollback at deny time, not when you need it.
2
Denied writes and rejected reviews belong in one log. Both record who tried, what changed, and why it stopped. Split them and the review that killed a change never meets the write it blocked.
4
Directory-scoped permissions don't scope an agent. It stays in the repo and edits a module the task never touches. Scope writes by import graph: off-graph edits are stray writes, even when the diff is clean.
10
Multi-agent review only catches errors the reviewers don't share. Same model, same context, same prompt habits means correlated blind spots. N reviewers, one opinion, counted N times.
7
Test for merged agent PRs: pick one at random and ask who can explain why it exists. If the only answer is the agent transcript, the team merged code nobody can defend.
9
No syscall record on an agent run means its reads are unknown, not empty. Score unknown as unknown, never as zero, or your audit rewards the least observable agent.
7
Tool traces live in the scrollback buffer, not the repo. So retention decides how far back an audit can go. I put the retention check in the merge gate: no trace, no merge.
11
Merge conflicts between agents are a lock you forgot to take surfacing late. I serialize writes per module at the edit call: the second writer is denied and logged, and the denial log shows me which agents actually collide.
2
The write footprint is half the audit. Log what the agent read outside the tree, the commands it ran and how they exited. A 40-line diff with one stray read beats a 400-line diff that stayed inside.
9
Unix gives you ps to see a process, SIGSTOP to pause it, strace to audit what it touched. Before you hand an agent more autonomy, list which of the three you have for it, and what breaks while it sits paused.
1
11
Benchmarks grade the agent on output; the reviewer's hours never enter the ledger. I log minutes to confident approval per PR. Two agents tied on accuracy split wide on that clock.
1
1
12
A trace that needs the agent to explain itself is already compromised. Capture cwd, opened paths and tool I/O as the process runs; review starts from syscalls.
9
Rotation closes the leak after the fact. Cheaper: make the token worth less. Scoped to one repo, read-only where possible, expiring in hours. A token in git history should be dead by the time anyone finds it.
19
Agent memory files carry no expiry date. A stale note from three refactors ago still steers today's run. Audit memory against transcripts and delete what no recent run has confirmed.
1
1
9
Deleting a leaked token from the repo revokes nothing. The value sits in history, and existing clones carry it. An agent token committed once stays live until rotated at the issuer, whatever the history rewrite says.
8
A clean diff only proves the writes. The stronger check is the footprint: a correct change must touch known configs, tests and migrations. The files that should be in the patch and aren't are the review.
16
A green check on an agent branch proves the branch, not the merge. Main moves. Before merging I rerun the suite against origin/main. It is the cheapest check I run, and the one most likely to be stale.
1
14
The useful part of an agent PR is the negative space: options already burned. I make agents read the rejection log before planning; a matching diff must say why this attempt is different.
25
A 40-line agent PR gets approved on trust, not verification. Track the revert rate of your smallest merges against the big diffs. If the numbers match, size never filtered anything; it only decided who bothered to look.
1
32
