<- blog

Agent Runs Need Audit Trails

Vercel Agent Runs and GitHub Copilot usage metrics show why AI work needs inspectable logs, not just accepted diffs.

#ai-agents#operations#analytics

The useful question for AI-assisted work is shifting from "did the agent produce a patch?" to "can we explain what work happened?" Two fresh platform updates point in that direction.

Vercel's 3 July changelog says Agent Runs are now available in the Vercel MCP and CLI, making agent activity accessible outside the dashboard. On the same day, Vercel added CLI management for Vercel Flags segments, which matters because feature targeting is often where product experiments become real customer impact. GitHub's 2 July changelog says Copilot usage metrics reports now have improved accuracy and coverage, including better attribution for CLI suggested lines, server-side telemetry, and AI credit consumption.

These are not just reporting features. They are signs that agentic work is becoming an operational system with runs, segments, credits, telemetry, and policy surfaces.

A diff is not enough evidence

A pull request shows the final file changes. It does not show the path the agent took to get there.

For low-risk copy edits, that may be fine. For practical web operations, it becomes thin evidence when the task touches:

  • checkout, quote, booking, or lead-routing flows;
  • analytics events and attribution code;
  • feature flags, audience segments, or rollout rules;
  • deployment configuration and environment variables;
  • customer messaging, CRM sync, or notification logic;
  • performance fixes based on production logs.

In those cases, reviewers need to know more than whether the final diff looks plausible. They need to know which context was read, which commands ran, which tool calls failed, which assumptions were made, and whether the agent stopped inside its intended boundary.

That is the difference between a helpful assistant and an unobservable operator.

What an agent run record should contain

Small teams do not need a heavyweight governance platform to start. They need a compact run record that answers the questions a reviewer or incident responder will ask later.

agent_run:
  id: vercel-or-internal-run-id
  task: fix mobile booking form validation
  requester: paul@example.com
  risk_band: medium
  systems_touched:
    - booking-form
    - analytics-events
  context_read:
    - repository files
    - preview deployment logs
  write_actions:
    - opened pull request
  flags_or_segments_changed: none
  validation:
    - bun test
    - playwright booking smoke test
  spend_summary:
    model: standard
    credits_or_tokens: recorded-by-platform
  human_approval_required_before:
    - production deploy
    - changing live feature segments

The exact field names can change. The important habit is that the run has a durable identity and a summary that travels with the pull request, issue, deployment, or experiment.

Feature flags make the audit problem sharper

Feature flags and segments are powerful because they let teams change behaviour without a full deployment. That is also why they deserve special treatment in agent workflows.

An agent that changes a flag segment may affect only "beta users", "mobile traffic", "Queensland leads", "returning customers", or "10% of checkout sessions". That sounds safer than a global release, but it can be harder to notice when something goes wrong. The blast radius is narrower, yet the evidence trail is often weaker.

When flags or segments can be managed from a CLI, add a simple rule: segment-changing commands must leave a receipt. The receipt should include:

  • the flag key and environment;
  • the segment name and matching rule changed;
  • the previous value and new value;
  • the business reason for the change;
  • the rollout window;
  • the metric that decides rollback or expansion;
  • the human who approved the change.

This is especially important for ecommerce and local-service funnels. A small segment change can alter who sees a free-shipping offer, whether a quote form asks for a phone number, which booking slots appear, or which analytics event fires.

Usage metrics need business labels

GitHub improving Copilot usage metrics is useful because it makes AI work less invisible. But raw usage data is only the starting point. Suggested lines, active users, IDE attribution, and credit consumption become more valuable when connected to business categories.

Instead of reviewing one undifferentiated AI usage number, tag agent and assistant work by lane:

Work lane Useful metric Review question
Content and copy Accepted edits per review cycle Did it reduce human drafting time without adding cleanup?
Bug fixes Runs per accepted fix Did the agent converge or loop?
Analytics and CRO Experiments touched Did the change preserve measurement quality?
Security and reliability Incidents investigated Did the agent produce evidence or just suggestions?
Release work Deployments or previews touched Did automation stay inside the release contract?

This turns usage reporting from a finance afterthought into an operating dashboard. It also helps decide where agents are worth more autonomy and where they need tighter gates.

Add run evidence to the pull request

The practical implementation can be simple. When an agent opens or updates a pull request, require a short evidence block:

## Agent run evidence
- Run ID:
- Task boundary:
- Context read:
- Commands run:
- Flags or segments changed:
- Validation result:
- Spend or usage note:
- Human approval required before:

For a small site or store, this does three useful things. It gives the reviewer a map. It creates a searchable history when a later incident asks "what changed?" And it discourages vague agent tasks because the run must eventually explain itself.

If the agent cannot produce the evidence block, treat that as a reason to slow down, not as a documentation nuisance.

The operating standard

AI coding and operations tools are moving toward richer telemetry: runs in CLIs and MCP servers, more complete usage reports, token or credit attribution, and configuration surfaces that scripts can change. That is good. It means teams can manage AI work like work, rather than treating it as magic text generation.

The next standard should be straightforward: every meaningful agent job gets an ID, a boundary, a record of context and actions, a validation result, and a business label. The teams that adopt that habit early will have an easier time scaling AI assistance because they can answer the most important operational question: not just what changed, but why, by whom, with which evidence, and inside which limits.

Need technical help?

I'm a software engineer who builds web apps, APIs, and AI tooling. If you've got a project or a problem to talk through, book a free 30-minute call.

Book time with me ->