Skip to main content
Agent Golf measures spend on pull requests. Each Linear item gets the spend of the pull requests that link to it or to the items below it.

The spend of a pull request

A pull request’s spend is its inference cost plus its CI cost. This is the Cost on the pull request page.
  • Inference Cost: the cost of its sessions while each session worked on this pull request. A model request that counts for more than one pull request splits evenly between them. Manual links add no cost. See Cost of a pull request.
  • CI Cost: the cost of the pull request’s GitHub Actions runs. See CI Cost.

The period

A pull request counts in the selected period when GitHub last updated it in that period. It then brings its full spend, including the spend of sessions that ran before the period. The Pull Requests page uses the same rule, so a pull request that gets a new comment next month moves to next month. Without the View Team Activity permission, the roadmap counts only your own sessions in the inference cost. The answer then reads “Your project spend was …”.

The roll-up

Spend rolls up along the Linear hierarchy:
  • An issue counts the pull requests that link to it and to its sub-issues.
  • A project counts the pull requests of its issues.
  • An initiative counts the pull requests of its projects and its sub-initiatives.
Each item counts a pull request once, even when the pull request links to several of the item’s issues. A milestone is not a step of the roll-up. See Milestone spend.

Why the rows can add up to more than the total

A table row shows the full spend of each of the item’s pull requests, so a pull request in two projects shows in full in both rows. The All Projects rows can then add up to more than Project Spend. In the example, the rows add up to $700, and the project spend is $400. The same is true for Initiatives: a pull request in two initiatives counts in both. “Shares can add up to more than 100% when a pull request is in more than one initiative.” An initiative’s page names the difference. For example: “The projects add up to $700. 1 pull request is in more than one project, so this initiative counts it once: $400.” Select Show Shared Pull Requests to see them.

Split views

Three views show how the spend divides. In these views, a pull request in more than one item gives each item an equal part of its spend. So the parts add up to the total, and an amount can be lower than in the tables.

Spend by Initiative

Spend by Initiative on the roadmap splits the period’s spend:
  • A pull request in N top-level initiatives gives each initiative 1/N of its spend. Inside an initiative, the pull request’s projects split that part the same way.
  • No Initiative holds the spend of pull requests that reach a project, but no initiative.
  • Unplanned holds the unplanned spend.
The initiatives, No Initiative, and Unplanned add up to the period’s spend.

Spend by priority

Spend by Priority splits the spend by each project’s Linear priority: Urgent, High, Medium, Low, and No Priority. A pull request in N projects gives each project 1/N, under that project’s priority. A project without a priority counts under No Priority. Unplanned shows apart. The priorities and Unplanned add up to the period’s spend.

Milestone spend

On a project page, each milestone shows its spend. A pull request counts for the project’s milestones whose issues it links to directly. A pull request in N milestones of the project gives each 1/N of its spend. Milestones of other projects do not change this part. A pull request counts once in each milestone. The milestones do not always add up to the project. A pull request of an issue with no milestone counts in no milestone. An issue row shows the full spend of its pull requests.

Example

The numbers of the diagram above: Pull request #1 gives $150 to each of its two projects in the split views.

Unplanned spend

A pull request is unplanned when it reaches no project and no initiative. For example:
  • It links to no Linear issue.
  • It links only to issues with no project.
  • Its issue is archived, or Agent Golf did not import it.
Unplanned Spend is the spend of the unplanned pull requests, plus the spend with no pull request. The spend with no pull request has two parts:
  • The requests in the period of the sessions that link to no pull request.
  • The CI runs with no pull request that finished in the period.
The roadmap, the Project Spend card of the Dashboard and the Team page, and the get_roadmap MCP tool show the same amount. On each of them, the project share is a share of the period spend: the pull requests updated in the period, plus the spend with no pull request. Linked Pull Requests counts the pull requests of active contributors in the period that link to at least one Linear item on your roadmap. An active contributor is a user with a linked GitHub account and a session in the period, so pull requests of bots such as Renovate do not count. An archived item does not count. A pull request that links only to an issue with no project is linked, but unplanned.

Progress

The progress of an item is “N of M” issues done. It counts each issue below the item once, with its sub-issues. It does not count canceled or archived issues. Progress does not depend on the period.

Spend of a user

The Priority Mix on the Team page and the Projects section of a user page count one user’s spend with other rules. See Priority Mix.

Budgets

A budget sets an amount of spend for an initiative or a project. A budget counts spend by the UTC month in which it happened, not by the period of the pull request. See Project Budgets.