Skip to content

Calculating AI Unit Costs by Feature, Project, Team and Customer

For years, engineering spend had a single predictable line item: headcount. Today, an engineering organization can spend thousands of dollars a week across AI subscriptions, extra-usage overflow and API keys while Finance has no denominator for what that spend actually bought.

Connect recorded work to a customer or ticket on YouTube

Transcript

Tags add useful context to recorded work. A tag pairs a key with a value. Customer is a key and Acme is its value. This guide explains the tag model for organizations, projects and personal use, with web controls and a Mac command-line route.

Start with Customer, Cost center and Work type. The key names the kind of context; the value supplies the detail. In the web Sessions list, select Add tag on a session you can edit. Choose an approved value for a key, then select Save tags. An existing tag opens the same dialog for that choice.

Organization admins manage approved values in Settings, Organization, Tags. An approved list restricts the choices for that key. The Mac command line accepts free text when that key has no approved list. Use it to request another value when a list applies. An approval request and a saved tag are different states.

The tag model has organization, project and personal levels. At each level, rules can restrict values for a key and the creation of new key and value pairs. The rules can also control simple tags: labels such as Follow-up with no separate value.

In this model, a personal Review equals Later tag stays personal if the project does not accept it. The tag is left out of the project view. The same rule applies between project and organization levels. Your lower-level choice is kept, not sent or accepted above.

In the tag model, detecting a supported ticket link adds the ticket tag automatically. That connects the recorded work to the ticket it refers to. Comment is different: a free-text note rather than a choice from an approved list. The Mac command line can set a comment.

The Mac terminal offers another route. Replace SESSION ID with the Tokematic Session ID you want. With no tag flags, the command prints its tags. Add the customer flag to set that key's value. Other flags set cost center, work type, ticket or comment. Check the result: saved, queued and awaiting approval are different states.

Choose a clear key and a useful value, then check that the change was saved. Consistent tags help you find related work and understand who it served. A clear tag policy keeps personal choices useful while teams keep their shared views consistent.

Tokematic gives AI spend a concrete denominator by linking every session, token and dollar to the Project, Work Tag, Team and Outcome it produced.

Organizing Spend by Project (#/projects)

Tokematic automatically groups sessions by Git repository and .tmatic project root. In #/projects (https://tokematic.app/#/projects) and #/work, you can see:

  • Tokens, cost, time and the newest work for each project in the Projects list, which you can sort and filter by name or owner. Open a project to see its spend, sessions, people and recent work. Its page also shows who can read it (see Projects and collaboration).
  • Which models and vendors power each repository.
  • How spend tracks against shipped commits and completed session outcomes.

What a tag means

A tag is a key/value pair. For example, in Customer: Acme, Customer is the key and Acme is the value.

The default classification keys are:

  • Customer: who the work is for, such as Acme.
  • Cost center: where the spend belongs, such as Engineering.
  • Work type: the kind of work, such as Bug fix.

These are default keys, not the definition of every possible tag. A simple tag is a standalone label without a separate value.

Ticket is a separate case. The intended behavior is to add a ticket tag automatically when a supported ticket link is detected. Comment is a free-text note, not another classification key with approved choices.

Tag rules at each level

The intended tag model has organization, project and personal levels. At each level, the person who manages it can restrict the values allowed for a key. They can also control the creation of new key/value pairs and simple tags.

A choice at a lower level does not have to be accepted above it. For example, you can keep a personal Focus: Research tag even if your organization does not accept it. It stays in your personal view. It is omitted from the data sent to, accepted by or shown at the higher level. The higher-level restriction does not delete your personal choice.

What is available now

The full model above is not yet implemented. The current session-tag controls use fixed fields and an organization list of approved values. They do not yet provide custom keys or separate project and personal policies with higher-level filtering. Existing simple-label paths are separate from these session-tag controls.

Comment is already a free-text note of up to 500 characters. Detected ticket references can open a supported link, but this does not yet assign the session's Ticket tag automatically. Manual ticket assignment remains available.

Add a tag with the current controls

In the web Sessions list, Add tag opens the tag dialog for a session you can edit. Choose an approved value and select Save tags. An existing tag chip opens that tag for editing or removal. Other fields stay unchanged.

Organization admins manage approved values in Settings > Organization > Tags (#/work-tags). Requests wait at the top for Approve or Reject or replace. A request is not an assigned tag. Current controls also expose Ticket as a manually assigned field.

The Mac command line is another route. Replace SESSION_ID with the Tokematic Session ID or a unique short prefix. The command finds the vendor from that session:

# Read this session's tags.
tmatic tag --session SESSION_ID

# Set a customer value.
tmatic tag --session SESSION_ID --customer acme

# Clear only the customer field.
tmatic tag --session SESSION_ID --clear customer

# Request approval of a new customer value.
tmatic tag --session SESSION_ID --customer new-customer --request

Other current flags are --cost-center, --work-type, --ticket and --comment. These fixed flags do not create custom keys. To select the latest session for a folder, use --provider claude --latest --cwd /path/to/project instead of --session. This selection still needs a provider because it does not name a Tokematic Session ID.

Use --vendor-session-id only for a vendor's original session ID and supply its provider explicitly:

tmatic tag --provider claude --vendor-session-id VENDOR_SESSION_ID --customer acme

An optional --provider with a Tokematic Session ID narrows the lookup. If a short prefix matches several sessions, supply a longer Tokematic Session ID.

The server accepts free-form values for a field with no approved list. Once that field has approved values, it rejects a value outside the list. This rejection is not the intended higher-level filtering described above.

Check the command result. Saved, queued and awaiting approval mean different things. A queued change still needs to be sent. An unapproved value may be requested instead of assigned. A ticket tag provides context; it does not mark the ticket complete.

Comparing List Price and Billed Spend (#/dashboard)

The Total spend chart on #/dashboard includes a List price | Billed toggle in its header:

  • List price (the default) plots cumulative session list-price spend across every active account and vendor in the selected period, plus metered API spend for key-only vendors, matching the top At list price summary figure even when sessions span multiple logins or historical subscriptions.
  • Billed plots recorded subscription invoices, prepaid top-ups and daily metered overflow (SpendChunk deltas) from all discovered accounts, and notes when any active session account in the window has no recorded billing entries.

Hiding Noise Without Losing Financial Accuracy

If you want to declutter your session list with tmatic hide <SESSION_ID>, hidden sessions are removed from visual session lists but still count in usage and financial totals so unit economics and spend reconciliation stay 100% accurate.

Next video: Compare recorded sessions side by side

4. For Finance & Leadership: Unit Costs, Renewals & Governance

All guides