Was It The Agent? A weekend tool for a question every team is asking


Every team I’ve worked with lately has the same unspoken question hanging over code review: did a person write this, or did an agent? Not because it matters for blame in the punitive sense, but because it changes how you read the diff. Agent-written code gets a different kind of scrutiny than a teammate’s. So I built a small CLI to answer the question instead of guessing: Was It The Agent, or wita.


What it does

wita runs git blame on a file and classifies every line as HUMAN, AGENT, or MAYBE, with a confidence level attached.

wita path/to/some/file.py
  1 HUMAN  Human (-)           package main
  2 AGENT  Claude Code (high)  func suspiciouslyCleanFunction() {
  3 AGENT  Claude Code (high)      // perfectly formatted, zero typos
  4 HUMAN  Human (-)           }

── Was It The Agent? ──
  file:   main.go
  lines:  4
  agent:  2 (50%)
  human:  2

  verdict: still mostly human hands here.

There’s a --summary flag if you just want the ratio, --only agent to filter down to the robot-written lines, and --no-color for anyone who’d rather pipe the output somewhere.


How the detection actually works

This is the part worth being honest about, because it’s also the part that makes the tool genuinely useful and genuinely limited.

wita doesn’t inspect code style, formatting patterns, or anything content-based. It looks at commit metadata — author/committer name and email, the commit message body, and trailers — and matches them against a set of known fingerprints:

  • Co-Authored-By: Claude <noreply@anthropic.com> → Claude Code, high confidence
  • Co-Authored-By: Copilot → GitHub Copilot
  • cursoragent / cursor.com references → Cursor
  • Similar patterns for Codex, Devin, Aider, and generic [bot] accounts

Each commit gets the highest-confidence match across the whole signature set, then every line git blame attributes to that commit inherits the verdict.


The limitation that matters more than the feature

This is the part I’d want a reader to know before trusting the output: wita checks what the commit message says, not who actually ran git commit.

That cuts both ways:

  • An agent commit pushed under your own GitHub account still gets flagged AGENT — if the trailer is there, wita doesn’t care whose name is on the commit.
  • A commit with no trailer at all — hand-typed, squashed, or from an agent that doesn’t self-disclose — falls back to HUMAN by default, because there’s nothing to match against.

In other words, wita is a convention detector, not a forensic tool. It works well in repos where agents leave their usual co-author trailers (which, increasingly, is most of them by default). It’s trivially defeated by anyone who strips the trailer before committing. I’d rather ship that tradeoff clearly than pretend the tool does something it doesn’t.


Why I built it anyway

Most of the value isn’t catching anyone — it’s the aggregate view. Pointed at a file or a sweep of files, wita --summary gives a quick read on how much of a codebase is agent-touched, broken down by which agent. That’s a useful number to have on hand when you’re deciding how to review a PR, or just curious how much of your own recent work was actually typed by you.

pipx install git+https://github.com/syam000/Was-It-The-Agent.git@main

No dependencies beyond Python 3.8+ and git. Source is on GitHub if you want to add a fingerprint for an agent it doesn’t recognize yet — the signature list is a dozen lines of regex, intentionally easy to extend.