Cognition Devin CLI local usage tracking.
- Source:
src/providers/devin.ts - Loading: eager (
src/providers/index.ts) - Test:
tests/providers/devin.test.ts
Devin CLI data lives under:
~/.local/share/devin/cli/
Usage comes from transcript JSON:
~/.local/share/devin/cli/transcripts/*.json
The provider also reads:
~/.local/share/devin/cli/sessions.db
sessions.db is enrichment only. It supplies project path/name, model fallback,
timestamp fallback, and hidden-session filtering. It is not the source of usage
or billing.
Devin reports spend in ACUs. CodeBurn reports provider cost through costUSD,
so Devin stays disabled until a positive finite ACU-to-USD rate is configured:
{
"devin": {
"acuUsdRate": 2.25
}
}The config file is:
~/.config/codeburn/config.json
When the rate is missing or invalid, discoverSessions() returns [] and the
parser yields no calls.
CodeBurn supports ATIF transcript variants used by Devin across ATIF-v1.5, ATIF-v1.6, and ATIF-v1.7 (and remains backward-compatible with older Devin transcripts that still use v1.4-style field names).
The parser does not hard-fail on schema_version; it parses any object root
with a steps[] array.
The provider normalizes equivalent usage fields across versions:
- Cost inputs (ACU before conversion to USD):
metadata.committed_acu_costextra.committed_acu_costmetadata.committed_credit_cost / 10000extra.committed_credit_cost / 10000
- Input tokens:
- legacy:
metadata.metrics.input_tokens - newer prompt-style:
metrics.prompt_tokens - cache_read - cache_creation
- legacy:
- Output tokens:
metrics.output_tokensormetrics.completion_tokens
- Cache write tokens:
metrics.cache_creation_tokensmetrics.cache_creation_input_tokensmetrics.extra.cache_creation_input_tokens
- Cache read tokens:
metrics.cache_read_tokensmetrics.cache_read_input_tokensmetrics.cached_tokensmetrics.extra.cache_read_input_tokens
- User steps are skipped when either:
metadata.is_user_input === true(older exports)source === "user"(ATIF step source)
- Non-user steps are included only when they contain positive ACU usage or positive token usage.
- sessionId:
session_id->trajectory_id-> transcript filename - model:
step.extra.generation_model->step.metadata.generation_model->step.model_name->agent.model_name->sessions.model->devin - timestamp:
step.metadata.created_at->step.timestamp->sessions.last_activity_at->sessions.created_at
costUSD is always provider-supplied and uses configured ACU conversion:
costUSD = committed_acu_cost * devin.acuUsdRate
If a step only has committed_credit_cost, CodeBurn converts credits to ACU
using Devin's current export convention:
committed_acu_cost = committed_credit_cost / 10000
Token-only steps are still included when they have positive token metrics, but
their costUSD is 0 if no committed cost is present.
src/parser.ts preserves Devin's provider-supplied costUSD instead of
re-pricing it through LiteLLM.
The provider reads these columns from sessions:
| Column | Use |
|---|---|
id |
join key with transcript session id during parsing; discovery uses transcript filename before .json |
working_directory |
projectPath and derived project name |
model |
model fallback |
title |
project name fallback |
created_at |
timestamp fallback |
last_activity_at |
preferred session timestamp fallback |
hidden |
skip hidden sessions |
devin:<sessionId>:<step.step_id>
When step_id is missing, parser falls back to 1-based step index.
- Transcript JSON is the usage source;
sessions.dbonly enriches metadata. - There is no default ACU-to-USD rate. Missing config intentionally hides Devin.
- Hidden sessions from
sessions.dbare skipped in discovery and parsing. - Tool names are taken from either
tool_calls[].function_nameortool_calls[].function.name. - If SQLite is unavailable or
sessions.dbcannot be opened, transcript parsing still works without enrichment.
- Confirm
~/.config/codeburn/config.jsoncontains a valid positivedevin.acuUsdRate. - Validate a transcript step's raw usage fields first (cost + token fields).
- If project/model/timestamp metadata is wrong, inspect
sessions.db. - Run
tests/providers/devin.test.tsafter parser changes.