Skip to content
Token Controller Docs
Docs / Connect agents / CI agents and the GitHub Action

CI agents and the GitHub Action

Some agents run without a person: a PR review bot, a nightly dependency update, a cloud agent. The GitHub Action reports what they spend in GitHub Actions. It installs tc on the runner and reports the Claude Code and Codex session files the job wrote. On another CI system, tc submit with a service token in TC_TOKEN does the same; see In CI and scripts. Other agents report through the token entries endpoint.

Set up

# .github/workflows/review.yml, after the step that runs your agent
- uses: tokencontroller/tokencontroller/packages/github-action@v1
with:
project: shop
feature: ${{ steps.plan.outputs.feature }} # optional
tags: purpose=code-review # optional, any tags
token: ${{ secrets.TOKEN_CONTROLLER_TOKEN }}
Input What it does
token A service token (tc_svc_…), created in the web app under Settings. Required.
project The project of this job's work. Wins over a rule on the repository.
feature The feature of this job's work. Wins over every rule. Without it, TC_FEATURE set by an earlier step is used.
tags Any other tags, as name=value, separated by commas, spaces or new lines.
url The address of a self-hosted instance. Leave it out for the hosted service.

The output messages says how many messages the step reported, and the job summary says it in a line.

What it sends

The Action runs tc submit on the runner, so it sends what tc sends from the session files the job wrote, and no prompt text. It adds what the job itself knows, as signals: the repository, the branch, and the pull request's number and title. Claude Code with an API key, as CI usually runs it, records no sign-in and no provider, so its messages get their contract from a rule, such as one on the agent name, or from their project's default; otherwise they wait in the review list.

Whose messages CI cost is

The person who created the service token is the person of every message reported with it, usually the tech lead who set up the agent. Their attributes travel with the messages. How to hand an automation over is under Grants and roles.

Which tags CI cost gets

  • A feature given to the Action, or set as TC_FEATURE by an earlier step, wins over everything else.
  • A review of a pull request lands on the feature of that pull request, when a rule finds its key in the pull request title.
  • The project named in the Action wins over a rule on the repository.
  • CI work that matches no feature lands on the project, as project overhead.
Example. A review bot reviews a pull request for KD-214. The cost shows on KD-214 as direct cost, and its person is the tech lead who runs the bot. The feature's assignee is not charged for it. In the worked month, the review bot's session S3 found no feature and sits on Shop as project overhead, with Tom as its person.

The full order is under Rules.

Last updated 27 November 2026 · Edit this page© 2026 Jan Beck · Privacy · Imprint