Agent Provenance: Tracing a Change Back to a Person
Agent provenance is the record that lets you take any change an AI coding agent made and trace it back: which person the agent acted for, which agent it was, which plan a person approved, which session did the work, which files changed according to a source other than the agent, and who decided each step. Git history alone does not answer this, because the commit author is often a bot or the developer whose machine ran the agent, and nothing in the commit says who approved what. This article describes the five links of that chain, the difference between files an agent reports and files a system verified, and what Forkit, the coordination system for agent teams, records today and does not.
The question auditors ask
When an agent's change reaches production, the questions are the ones asked of any change: who asked for it, who approved it, what exactly changed, and was it checked. GitLab's guide to governing agentic AI (Julie Griffin, 31 Jul 2026) names the first requirement: "Every AI agent's identity should be linked to the human user who requested the action." It also asks for "The ability to tell which code was AI-generated versus human-written in the first place," and for agent actions to land "in the same audit trail your organization already reviews."
Software supply chain practice has a word for the build side of this. SLSA's levels say "Provenance describes what entity built the artifact, what process they used, and what the inputs were," and Build L1 requires that provenance "exists describing how the artifact was built." Agent provenance asks the same of the change before it is built: which entity wrote it, under what process, from which inputs.
Why git history is not enough
- The commit author is whoever's credentials pushed, which may be a shared bot or the developer who started twenty agents.
- A commit message is written by the agent, so it is the agent's own account of its work.
- The approval lives in a pull request review, which says a person approved, not what version of the plan they approved or whether new commits arrived after.
- Nothing ties the change to the run, its budget, or the questions the agent asked along the way.
Five links in the chain
1. Person to agent key. In Forkit, an API key belongs to one person, and the key's name is the agent's name. Keys minted for a fan-out act under the person of the agent that started it. Every write an agent makes carries that key, and identity comes from the key, never from what the agent writes in a request. See agent identity and API keys.
2. Agent key to plan version. Before a large run, an agent can submit a plan for people to review. Only the planner's own person or a workspace owner may decide. An approval names the version the person read, and a newer version refuses it. A fan-out started with --plan ID is refused unless the plan's current version is approved, and the fan-out records the plan's id. An owner can require an approved plan for every fan-out in the workspace.
3. Plan to session thread. Each agent session is one thread, with append-only events: prompts, commands, changed files, messages, questions, permission requests and decisions. A fan-out agent's session links to the fan-out's parent thread.
4. Thread to verified files and checks. The files that changed, recorded by something other than the agent (next section).
5. Each decision, with its actor. Every event records whether a person, an agent or the system wrote it, and which. A permission decision records whether a rule, the orchestrator or a person decided. A review approval carries the last event the reviewer saw.
Put together, a single change answers: this file was changed by agent acme-migrate-007, acting for Dana, in a fan-out started from plan 41 version 3, which a workspace owner approved on Tuesday; the agent asked to run pnpm install, which an allow rule answered; the security lead approved the pull request after the last commit and a passing check.
Verified files versus reported files
An agent's summary of what it changed is a claim. Provenance needs a second source.
Forkit records changed files from three places, in decreasing trust:
- GitHub. When Forkit's GitHub App has the pull request, the files come from GitHub, along with check runs. New commits or a failed check bump the thread's sequence, so an approval of what was seen before is refused.
- Forkit's own repository pushes. For a fan-out with a repository per agent, every push to an agent's fork starts a workflow that reads the two trees itself and writes an
artifactevent markedverified: true, by the system actor "Forkit repo". - The agent's hooks. Claude Code and Codex hooks report each edit as it happens. This is the agent's side of the record.
Reviews count every artifact event on the thread plus the files the review request names, so an agent cannot hide a file by leaving it out of its summary. When GitHub lists files the session never recorded, the review page flags them "not in session". If approval rules exist and the files are unknown, an owner must approve.
Decisions as append-only events
Provenance is only as good as its record's resistance to rewriting. Forkit's thread events are append-only, numbered per thread, and each carries an actor kind of user, agent or system. A few rules keep the record meaningful:
- Only a person can resolve a thread or decide a review.
- An approval names the last event the reviewer saw; any newer event refuses it, in one atomic batch. See stale approvals.
- A message from another agent is never a person's decision; it cannot approve, resolve or answer a permission request.
- Approval rules map path globs to approvers; each matching pattern needs one of its people, and approvals accumulate until all are met. CODEOWNERS vs approval rules compares this with GitHub's own mechanism.
Cost and run attached to the change
Provenance often needs to answer "what did this cost" and "which run produced it". Forkit records estimated cost per thread and per fan-out, priced at list price from the tokens agents report, and for factories (saved fan-outs that can be run again) each run's cost, seconds, and a person's verdict of good or bad. These are estimates, not your provider's bill.
An agent provenance checklist
- Every agent key belongs to one named person
- Identity on every write comes from the key, not the request
- Large runs start from a plan whose approved version is recorded
- Each session's events are append-only and carry an actor kind
- Changed files come from GitHub or the system's own push records, not only the agent
- Files present in the pull request but missing from the session are flagged
- Approvals name what was seen and are refused after new commits or failed checks
- Approval rules record which person signed for which paths
- Run cost and verdict are attached to the run
Gaps
- No audit log export yet. A CSV or JSON export of thread events, permission decisions, plan approvals and key changes, for a SIEM, is planned for a Business plan and is not built. Today the record is read in Forkit's pages and APIs.
- Agents that are not connected leave no trail. An agent with no hooks and no
forkit runwrapper is invisible to Forkit. Support for Cursor, Gemini CLI, Copilot and Devin through their own hooks was added on 26 Nov 2026 and has not yet been run against the real agents. - Hook-reported files are the agent's side. Without the GitHub App or a fan-out repository, the file list comes from hooks only.
- Forkit is not a build provenance system. It does not produce SLSA attestations. It records the change's history up to the pull request.
Sources
- Forkit engineering notes: agent identity, thread rules, GitHub App, a repository per fan-out agent (
verified: true), plans, approval rules, what agents cost; pricing proposal (audit export not built). - Julie Griffin, GitLab, "How to govern agentic AI, MCPs, and AI code assistants", 31 Jul 2026, https://about.gitlab.com/blog/govern-agentic-ai-mcps-code-assistants/ (read 27 Nov 2026).
- SLSA, "Security levels" (v1.0), https://slsa.dev/spec/v1.0/levels (read 27 Nov 2026).