320 File Changes, 11 Attributed: Naming the Agent Behind a Write with eBPF

November 23, 2026 · Dirk

A coding agent on my machine ran go build, go test and gofmt. That caused 320 recorded file changes. Looking at the writing process, its parent and its command line, we attributed 11 of them to the agent. The other 309 looked like an ordinary build.

Why one hop is not enough

The agent did not write those files. compile wrote 110, link 77, vet 57 and asm 32, and none of them is a child of the agent. The chain is claude > bash > go > compile.

The 11 that matched were luck. An output path under /tmp/claude-1000/ put the string "claude" in a command line. Rename the directory and the count is zero.

Recording the grandparent as well would have found 44 of 320. Any fixed number of hops loses to a build system: make, cc and ld already go deeper, and so do npm, node and esbuild.

Walk the ancestry at the moment of the write

So the eBPF program walks real_parent from the writing task and stores the name of each ancestor's executable. Userspace reverses it into one string:

systemd>dash>node>node>claude>bash

Agents that are called node

Executable names are not enough either. An agent written in JavaScript or Python shows up as node or python3, and setting process.title does not change that. Everything such an agent ran was attributed to nobody.

The walk now also stores the process ID of each ancestor, in the same loop iteration as its name. Userspace uses it to name an interpreter by the script it runs, so node becomes node:pi.

What the verifier made of it

The verifier does not count what runs. It explores the states a program can reach, so costs multiply where you expect them to add:

The same object that loaded on kernels 5.14 to 7.0 was rejected on 7.2.4, at 1,000,001 instructions. The cause was our own bug: a length the verifier treats as possibly negative, stored as unsigned. Nothing in the kernel had broken, our margin was just gone. A rename was simpler: do_filp_open became do_file_open in 7.0, so we ship both programs and load the one whose symbol exists.

Dropped records

A full ring buffer drops records, and nothing in the output shows it. Creating 30,000 files and removing them lost 34% of the creates and 89% of the deletes on my machine, because the userspace loop read about 11,000 records a second. Now one goroutine only copies records into a queue and another processes them. The same test then lost nothing, up to 300,000 files. That is a measurement on one machine, not a guarantee.

What this does not see

kaimon is an Agent Integrity Monitor (AIM) for VS Code on Linux, kernel 5.14 or later with BTF. The extension is open source under Apache-2.0. The eBPF daemon is proprietary. Always free, 100% local, no signup.

Get the VS Code Extension

Ready to Align Your AI Agents?

Two minutes to install. From then on, every file change your agents make is on record.

Get the Free VS Code Extension

Linux, local or over Remote-SSH · Nothing leaves your machine

Running a team? Get notified about kaimon for Teams