Inspiration

These days a lot of code gets written by AI agents like Claude Code and Codex, and we use them every day. You give one a task, approve a few commands, and come back later. After a while you stop reading every command. Nobody checks what npm install runs under the hood, and the agent's window doesn't show it anyway. That's fine until a package's install script reads your .env and posts it somewhere. We wanted to see everything our agents ran, not just the lines they printed.

What it does

Harness watches everything your coding agents start on your computer. It sees the commands they type, the processes those spawn, the files they touch and the servers they connect to. It shows all of it as a tree, so you can see that npm install ran a package's setup script, which read a secret and opened a connection. Anything risky raises an alert and lowers a safety score, and Harness can pause the agent before the damage is done. For Claude Code it can block an action before it runs at all.

It runs locally as a menu bar app on Mac and Windows, and nothing leaves your machine unless you ask for a Gemini review. You can also pair your phone by scanning a QR code, then check on your agents while you're away from your desk and pause or stop one if something looks wrong.

How we built it

  • Backend: Node. It polls the process list every half second and walks each process's parents to find which agent started it. It checks open connections with lsof and netstat, and for Claude Code and Codex it also reads their session logs to see what they were asked to do.
  • Decoys: fake secrets planted in ~/.harness/bait. Each one holds a random value unique to your computer, so we can tell when one gets read or copied.
  • Pausing: SIGSTOP on macOS and NtSuspendProcess on Windows.
  • Blocking: a Claude Code PreToolUse hook that checks each action in about 10 ms.
  • Dashboard: plain HTML and JS with live updates, wrapped in Tauri for the desktop app.
  • Reviews: Gemini can give a second opinion on a flagged event. You see exactly what will be sent before it goes. Secrets are hidden first, and file contents are never sent.
  • Safety score: everyone starts at 100. Each risky event costs points in one or more of six groups (secrets, sending data out, hidden background changes, risky commands, unknown servers, new software), and each group has a cap so one noisy category can't drown out the rest. Costs halve every 12 hours, so the score recovers on its own once things calm down:

Challenges we ran into

  • Polling misses programs that start and finish in under half a second, so we needed the decoy files as a backstop.
  • File access times don't say which process read a file, so we had to work out who to blame when more than one agent is running.
  • Windows was a different beast: no easy way to get a process's working folder, slower pausing through PowerShell, and last-access times that are sometimes turned off.
  • Shipping unsigned builds meant writing clear first-open steps without telling people to switch off their security settings.

Accomplishments that we're proud of

  • A working demo where a malicious npm package tries to steal fake AWS keys and Harness catches and pauses it mid-upload.
  • The pre-run hook, tested against a real Claude Code session, which stops bad actions before they happen instead of cleaning up after.
  • Real installers for Apple silicon, Intel Macs and Windows, with Node bundled in.
  • A dashboard someone non-technical can read ("A package's setup script", "Opened a decoy secret"), with the raw commands one click away.

What we learned

Most of what an agent does never shows up in its own window, and the danger usually isn't the command it typed but something three processes further down. We also learned that blocking before an action beats reacting after it, and that a fake secret is one of the cheapest and most reliable tripwires you can set.

What's next for Harness

  • Deeper macOS monitoring through Apple's eslogger, so nothing slips past polling.
  • Reading session logs for the other agents, not just Claude Code and Codex.
  • Blocking before an action runs for agents beyond Claude Code.
  • Learning what's normal for each project on its own, without you marking every command.
  • More testing on Windows.
  • Signed and notarized builds.

Built With

Share this project:

Updates

Submission history