The Agentic Team Report

Annotating Agent Runs With Linear Issue and GitHub PR Links so VP Engineering Spend Rollups Write Themselves

Tagging each agent run at creation turns spend reporting into a query.

· 9 min read
Cover illustration for “Annotating Agent Runs With Linear Issue and GitHub PR Links so VP Engineering Spend Rollups Write Themselves”
Parallel Agent Workflows · November 16, 2026 · 9 min read · 1,960 words

Per-run agent cost attribution for engineering teams starts by recording the Linear issue, GitHub repository and branch, agent harness, triggering actor, and timestamp when each run is created, then adding the PR number when it exists. Joining those records to session spend makes VP Engineering rollups a byproduct of work, eliminating month-end reconstruction. The essential discipline is to capture context before execution and preserve it through review and merge.

Why VP Engineering spend rollups are still a manual task in most teams

An autonomous agent can open a pull request without recording which person requested the work or which initiative should pay for it. The PR author is a bot. Without a link to an issue, finance and engineering leadership must reconstruct who asked for what, which agent ran, and how long it worked. Across parallel tools and repositories, one sprint can produce dozens of untagged runs.

The reporting tax begins before analysis does. Spend records exist, but their session IDs do not identify a team, project, or sprint. The missing relationship originates when the run starts, so a better month-end report cannot repair the underlying omission. A consistent creation-time annotation can.

What “annotation” means when tracking which engineer or team owns each agent run and its cost

An annotation is structured metadata on a queryable agent run record. Its minimum fields are Linear issue ID, GitHub repository and branch or PR number, agent harness, timestamp, and triggering actor. The actor identifies the human or automation that initiated execution. The issue supplies the organizational context needed to group spend without interpreting conversations or code changes.

Richer annotations add the cycle, team label, estimated scope in story points or an ACU budget, and the initiating Slack thread or webhook. These fields belong on the run record. Comments in Linear or GitHub can expose links for people, but they are not a substitute for metadata queryable across runs. At creation, the branch can stand in for a PR that does not yet exist.

Timing is part of the convention. The initiating system has the context before execution. Inferring it afterward from branch names becomes fragile when branches are reused, rebased, or created independently by the agent.

How Linear and GitHub already model the data the rollup needs

Linear’s issue fields already include team, assignee, cycle, project, priority, and labels. The missing element is the join between them. Storing the Linear issue ID and GitHub PR reference on the agent run links who owns the work to what ships and what it costs, without adding another reporting store.

The issue lifecycle also gives that relationship an operational view. An issue can move from Backlog to Todo, then to In Progress when an agent takes it, In Review when a PR opens, and Done when it merges. The workflow must be set up to make those transitions. They are not a consequence of merely storing an issue ID.

Cursor Blame on Enterprise provides a different level of attribution, distinguishing lines associated with tab completions, agent runs, and human edits. That is finer-grained than a spend rollup needs. A PR author and linked issue give a first link between what ships and the work it belongs to, while the annotated run has the initiating actor and session spend.

Wiring the annotation pipeline from Linear issue creation to agent run start

The implementation discipline is to give every entry point the same required annotation fields before execution. A Slack command or mention reads the issue ID from the Linear-linked channel context and passes it as a run parameter. Capturing the message thread ID preserves the scope discussion. The run then has both a work reference and a conversation reference.

For automated dispatch, moving an issue to Ready for Agent triggers a Linear webhook. The payload supplies issue ID, team, cycle, and assignee for the run record. No command is needed on this path. API clients and schedules also pass the issue ID and repository context before execution, without waiting for a nightly job to finish.

The dashboard needs the same discipline through required issue and repository fields. API schema enforcement covers callers that bypass the interface. Runs missing an issue ID should be queued and flagged before they start, with the gap visible in Slack and the dashboard.

Once the run starts, the harness assigns the issue to the agent identity, moves it to In Progress, and posts the run ID in a Linear comment. Linear gives people a view of the work as it happens. The run record remains the authoritative annotation store, with Linear reflecting its state. Checking for an issue already In Progress with an agent also prevents a second agent from taking the same assignment.

When the agent opens its PR, the post-run hook reads the issue ID from the run record and writes it into the PR description. Linear’s integration documentation specifies linking language such as “fixes” with the issue ID. A bare ID is not sufficient for linking. The hook also stores the PR reference on the run, moves the issue to In Review, and posts the PR URL in Linear.

CI failures and review requests should then update the run record while leaving the issue open. A CI failure leaves Linear in In Review. If a reviewer requests changes, the agent can be re-triggered from the existing record, with the new run inheriting the issue and PR references so revision spend remains attached to the same work.

The Symphony spec pattern describes the same lifecycle relationship between PR open, review, and issue closure. Merge is the definitive delivery signal. Session spend is captured at session end, while the merge event marks the record complete, moves the issue to Done, and locks the spend figure used for the closed rollup.

What the rollup query looks like and what a VP Engineering can read from it

The query uses issue ID to join agent run records to Linear issues, then groups them by team, cycle, and project or initiative. For each group, it adds up spend and reports which PRs were opened, merged, and sent back for revision. Harness, triggering actor, and entry point provide additional breakdowns. Cycle time runs from execution start to PR merge.

A result row can therefore represent one team’s work on one initiative during one cycle, with total spend, delivery counts, revision rate, and cost per merged PR. The structure is ordinary aggregation. A BI tool or agent-platform dashboard can answer which initiative consumed the most compute last sprint and which harness had the lowest cost per merged PR.

Revision rate makes the comparison more informative. It is the fraction of agent PRs sent back before merge, and it distinguishes a cheap first attempt from cheap completed work. A run that costs more but merges right away can cost less in all than a cheaper run that needs two revision cycles. Grouping all runs under the same issue exposes that difference by linking retries to the task.

Billing units still need their own treatment. Compute minutes, token counts, and ACUs are not interchangeable monetary amounts, although the shared annotation lets their associated costs appear in one dashboard. Devin’s ACU-based model reports the cost of each task, so a 3-ACU bug fix can have a dollar figure before the sprint ends. The rollup aggregates the recorded costs into cost per merged PR rather than treating unlike usage units as equivalent.

Where the pipeline breaks and how to prevent each failure mode

Missing issue IDs are the most direct failure. A dashboard or API run can otherwise enter the system with spend but no owner in the reporting model. Schema enforcement should queue and flag these submissions, while any existing unassigned spend appears in an explicit “unattributed” bucket. Visibility is preferable to silent omission. The VP can then see the size of the attribution gap.

Broken write-backs require a different control. A rate limit, downtime, or expired credential can leave Linear in In Progress after the PR has opened. An idempotent write-back should place the state transition on a queue and retry failures. The run record remains authoritative during that delay. Linear can catch up without requiring the reporting relationship to be reconstructed.

Older schedules can skip the checks on how new runs are created. A one-time audit should backfill issue IDs for existing automations, followed by schema enforcement on new schedule and webhook registrations. Maintenance work that has no ticket of its own can use a standing Platform Maintenance issue. Otherwise, unattended jobs keep generating orphaned spend despite compliant manual entry points.

Multi-issue runs create ambiguity in otherwise complete data. The pragmatic approach records a primary issue and secondary issues, then splits spend proportionally in the rollup. The cleaner approach scopes each run to one issue, producing a PR whose review boundary matches its attribution boundary.

Security and governance controls the annotation pipeline depends on

A board-facing rollup needs more than complete fields. Its records must be protected against after-the-fact alteration, with audit logs recording who initiated each run, its parameters, and its repository. Annotation belongs within that audit record. Credential access controls and session isolation help keep the same record of who is responsible for each run and belong with these reporting controls.

SCIM provisioning supports automatic credential deprovisioning when an engineer leaves. Stale credentials can otherwise create a governance problem as well as an attribution gap. Isolated Linux VMs per run provide an execution boundary for GitHub tokens and Linear API keys, which must remain scoped to the session.

Claude Code Enterprise has SCIM, audit logs, a Compliance API, and custom data-retention controls. As of August 2026, Anthropic lets Team and Enterprise organizations send cloud sessions to self-hosted environments so the audit log stays in the customer’s infrastructure. Cursor made self-hosted cloud agents available for general use on March 25, 2026. Its customer-operated workers execute terminal commands and code changes while Cursor handles orchestration, with annotation metadata in customer worker logs.

Codex Business includes SAML SSO and no training on business data by default. Enterprise also has SCIM, role-based access control, and data-retention and data-residency controls. Those distinctions affect deployment approval for unattended runs. Regulated organizations should settle how the cloud sandbox handles data and limit the pipeline to self-hosted or customer-controlled infrastructure so issue IDs, repository names, and spend records stay within the compliance boundary. Annotation metadata, audit logs, and execution should follow the same retention policy.

Running the annotation pipeline in practice through a complete worked example

First, triage moves a Linear issue to Ready for Agent, and the webhook creates its run record with issue ID, team, cycle, triggering actor, timestamp, harness, repository, and branch context. Next, the harness assigns the issue to the agent identity, moves it to In Progress, and posts the run ID back to Linear. The agent then works in an isolated Linux VM, with compute minutes accumulating against that annotated issue.

When the PR opens, the hook adds the issue ID with the integration’s linking language, records the PR reference, moves Linear to In Review, and posts the PR URL. A human review requesting changes triggers another run with the same issue and PR annotation, keeping both sessions’ spend attached to the original task. Each session writes its spend before delivery is finalized.

Finally, the merge webhook marks the run record as complete, locks the final spend, and moves the issue to Done. The rollup now groups the closed records under the issue’s team, cycle, and initiative, and shows both runs if changes were needed. The spend figure is no longer a live estimate. The completed record contains the request, responsible actor, execution, review history, delivery signal, and cost needed for the rollup without a separate tagging exercise.

Sources

  1. GitHub Integration

More in Parallel Agent Workflows