copilot-session-usage 0.8.4__tar.gz → 0.9.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (130) hide show
  1. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/.github/changes/requests/skill-breakdown/01-request.md +10 -10
  2. copilot_session_usage-0.9.1/.github/skills/record-finding/README.md +48 -0
  3. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/PKG-INFO +23 -5
  4. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/README.md +22 -4
  5. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/docs/source/explanation/how-cost-estimation-works.md +78 -40
  6. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/docs/source/how-to/add-commit-trailer.md +37 -3
  7. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/docs/source/how-to/analyze-specific-session.md +14 -2
  8. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/docs/source/how-to/copilot-cli-provider.md +10 -16
  9. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/docs/source/reference/pricing.md +53 -18
  10. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/knowledge/concepts/copilot-cli.md +9 -10
  11. copilot_session_usage-0.9.1/knowledge/findings/2026.10.07-17.30-cli-billed-nanoaiu-and-cache-write.md +40 -0
  12. copilot_session_usage-0.9.1/knowledge/findings/2026.10.07-request-billing-and-cache-write.md +62 -0
  13. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/knowledge/findings/index.md +2 -0
  14. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/knowledge/log.md +5 -0
  15. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/skills/copilot-session-usage/SKILL.md +61 -10
  16. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/src/copilot_session_usage/_internal/copilot_cli.py +135 -51
  17. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/src/copilot_session_usage/_internal/core.py +179 -25
  18. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/src/copilot_session_usage/_internal/git.py +4 -1
  19. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/src/copilot_session_usage/_internal/vscode.py +82 -7
  20. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/src/copilot_session_usage/cli.py +37 -4
  21. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/src/copilot_session_usage/data/models-and-pricing.lock +3 -3
  22. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/src/copilot_session_usage/data/models-and-pricing.yml +26 -40
  23. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/tests/test_cli.py +100 -0
  24. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/tests/test_copilot_cli.py +91 -7
  25. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/tests/test_core.py +164 -0
  26. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/tests/test_git.py +29 -0
  27. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/tests/test_vscode_platform.py +44 -0
  28. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/.editorconfig +0 -0
  29. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/.gitattributes +0 -0
  30. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
  31. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
  32. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/.github/guidelines/git-commit-message.guideline.md +0 -0
  33. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/.github/guidelines/knowledge-base.guidelines.md +0 -0
  34. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/.github/pull_request_template.md +0 -0
  35. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/.github/skills/consolidate-knowledge-base/SKILL.md +0 -0
  36. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/.github/skills/gh-commit-changes/SKILL.md +0 -0
  37. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/.github/skills/gh-create-pull-request/SKILL.md +0 -0
  38. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/.github/skills/gh-release-notes/SKILL.md +0 -0
  39. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/.github/skills/gh-release-notes/scripts/generate_release_notes.py +0 -0
  40. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/.github/skills/record-finding/SKILL.md +0 -0
  41. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/.github/workflows/ci.yml +0 -0
  42. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/.github/workflows/publish.yml +0 -0
  43. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/.github/workflows/refresh-pricing.yml +0 -0
  44. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/.github/workflows/release-notes.yml +0 -0
  45. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/.github/workflows/release.yml +0 -0
  46. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/.gitignore +0 -0
  47. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/.readthedocs.yaml +0 -0
  48. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/AGENTS.md +0 -0
  49. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/CHANGELOG.md +0 -0
  50. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/CONSTITUTION.md +0 -0
  51. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/CONTRIBUTING.md +0 -0
  52. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/LICENSE +0 -0
  53. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/docs/articles/presentation.md +0 -0
  54. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/docs/internal/automated_release_proces.md +0 -0
  55. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/docs/source/_static/changelog.js +0 -0
  56. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/docs/source/_static/custom.css +0 -0
  57. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/docs/source/changelog.md +0 -0
  58. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/docs/source/conf.py +0 -0
  59. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/docs/source/explanation/index.md +0 -0
  60. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/docs/source/how-to/batch-and-spending.md +0 -0
  61. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/docs/source/how-to/export-json.md +0 -0
  62. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/docs/source/how-to/index.md +0 -0
  63. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/docs/source/how-to/wsl2.md +0 -0
  64. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/docs/source/index.md +0 -0
  65. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/docs/source/installation.md +0 -0
  66. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/docs/source/reference/api.md +0 -0
  67. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/docs/source/reference/cli.md +0 -0
  68. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/docs/source/reference/index.md +0 -0
  69. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/docs/source/tutorials/getting-started.md +0 -0
  70. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/docs/source/tutorials/index.md +0 -0
  71. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/guidelines.yml +0 -0
  72. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/justfile +0 -0
  73. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/knowledge/_schema/Base.schema.yaml +0 -0
  74. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/knowledge/_schema/Concept.schema.yaml +0 -0
  75. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/knowledge/_schema/Experiment.schema.yaml +0 -0
  76. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/knowledge/_schema/Finding.schema.yaml +0 -0
  77. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/knowledge/_schema/Hypothesis.schema.yaml +0 -0
  78. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/knowledge/_schema/Outcome.schema.yaml +0 -0
  79. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/knowledge/_schema/Playbook.schema.yaml +0 -0
  80. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/knowledge/_schema/Principle.schema.yaml +0 -0
  81. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/knowledge/_schema/Reference.schema.yaml +0 -0
  82. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/knowledge/_schema/Structure.schema.yaml +0 -0
  83. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/knowledge/concepts/index.md +0 -0
  84. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/knowledge/concepts/overview.md +0 -0
  85. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/knowledge/concepts/session-cost-analysis.md +0 -0
  86. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/knowledge/concepts/threshold-based-pricing.md +0 -0
  87. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/knowledge/experiments/index.md +0 -0
  88. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/knowledge/experiments/verify-subagent-cost-attribution.md +0 -0
  89. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/knowledge/findings/2026.07.02-00.00-subagent-logs-runsubagent-prefix.md +0 -0
  90. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/knowledge/findings/2026.07.02-22.00-title-generation-not-counted-as-model-turn.md +0 -0
  91. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/knowledge/findings/2026.07.02-23.00-cache-write-approximation.md +0 -0
  92. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/knowledge/findings/2026.07.13-14.27-release-notes-overreported-maintainer-changes.md +0 -0
  93. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/knowledge/findings/2026.07.24-15.01-actions-token-cannot-create-pr.md +0 -0
  94. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/knowledge/findings/2026.08.05-16.24-utility-models-appear-in-logs-but-are-not-billed.md +0 -0
  95. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/knowledge/guides/automation-scripts.md +0 -0
  96. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/knowledge/guides/cost-optimization.md +0 -0
  97. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/knowledge/guides/index.md +0 -0
  98. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/knowledge/guides/wsl2-setup.md +0 -0
  99. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/knowledge/ideas/index.md +0 -0
  100. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/knowledge/ideas/multi-session-efficiency-analytics.md +0 -0
  101. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/knowledge/index.md +0 -0
  102. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/knowledge/principles/findings-are-immutable.md +0 -0
  103. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/knowledge/principles/index.md +0 -0
  104. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/knowledge/reference/debug-log-format.md +0 -0
  105. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/knowledge/reference/index.md +0 -0
  106. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/knowledge/reference/pricing-formats.md +0 -0
  107. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/knowledge/structures/cache-cost-approximation.md +0 -0
  108. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/knowledge/structures/index.md +0 -0
  109. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/knowledge/structures/knowledge-base-information-types.md +0 -0
  110. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/knowledge/structures/session-discovery-algorithm.md +0 -0
  111. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/knowledge/structures/subagent-cost-tracking.md +0 -0
  112. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/knowledge/structures/vscode-copilot-extension.md +0 -0
  113. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/pyproject.toml +0 -0
  114. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/scripts/refresh_pricing.py +0 -0
  115. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/skills/copilot-session-usage/references/span-analysis-template.md +0 -0
  116. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/src/copilot_session_usage/__init__.py +0 -0
  117. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/src/copilot_session_usage/_internal/__init__.py +0 -0
  118. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/src/copilot_session_usage/api.py +0 -0
  119. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/src/copilot_session_usage/data/__init__.py +0 -0
  120. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/src/copilot_session_usage/data/custom-models-pricing.yml +0 -0
  121. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/tests/conftest.py +0 -0
  122. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/tests/test_api.py +0 -0
  123. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/tests/test_coverage_gaps.py +0 -0
  124. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/tests/test_generate_release_notes.py +0 -0
  125. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/tests/test_pricing_runtime.py +0 -0
  126. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/tests/test_release_notes.py +0 -0
  127. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/tests/test_rendering.py +0 -0
  128. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/tests/test_vscode.py +0 -0
  129. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/uv.lock +0 -0
  130. {copilot_session_usage-0.8.4 → copilot_session_usage-0.9.1}/uv.toml +0 -0
@@ -130,16 +130,16 @@ Cache session metadata (title, created_at, has_debug_logs, debug_log_dir) in a s
130
130
 
131
131
  ## Acceptance criteria
132
132
 
133
- - [ ] `copilot-session-usage id <uuid> --skill-breakdown` prints a per-skill cost table.
134
- - [ ] `copilot-session-usage list --title <substring>` returns only matching sessions.
135
- - [ ] `copilot-session-usage analyze --title <substring> --latest` analyzes the most recent matching session.
136
- - [ ] `copilot-session-usage id <uuid> --skill "<name>"` filters the report to that skill.
137
- - [ ] Subagents spawned by `runSubagent` show their real name, not `unknown`.
138
- - [ ] `copilot-session-usage id <uuid> --tool-breakdown` prints per-skill/per-subagent tool-call counts.
139
- - [ ] `copilot-session-usage id <uuid> --format json --minimal` returns a small, stable JSON object.
140
- - [ ] `copilot-session-usage skills --last 7d` lists skills with aggregated cost.
141
- - [ ] All new features are covered by unit tests.
142
- - [ ] `just preflight` passes.
133
+ - [x] `copilot-session-usage id <uuid> --skill-breakdown` prints a per-skill cost table.
134
+ - [x] `copilot-session-usage list --title <substring>` returns only matching sessions.
135
+ - [x] `copilot-session-usage analyze --title <substring> --latest` analyzes the most recent matching session.
136
+ - [x] `copilot-session-usage id <uuid> --skill "<name>"` filters the report to that skill.
137
+ - [x] Subagents spawned by `runSubagent` show their real name, not `unknown`.
138
+ - [x] `copilot-session-usage id <uuid> --tool-breakdown` prints per-skill/per-subagent tool-call counts.
139
+ - [x] `copilot-session-usage id <uuid> --format json --minimal` returns a small, stable JSON object.
140
+ - [x] `copilot-session-usage skills --last 7d` lists skills with aggregated cost.
141
+ - [x] All new features are covered by unit tests.
142
+ - [x] `just preflight` passes.
143
143
 
144
144
  ## Non-goals
145
145
 
@@ -0,0 +1,48 @@
1
+ # Record Finding
2
+
3
+ `record-finding` is a handoff tool for investigations that outgrow the current
4
+ model. When a small model struggles to reach a reliable conclusion, it can leave
5
+ the maximum useful evidence for a bigger model to continue from.
6
+
7
+ ## Why use this skill?
8
+
9
+ Debugging sessions and log investigations often reach a useful boundary before
10
+ they reach a reliable conclusion. A small model may have already found the
11
+ relevant files, tested several explanations, and identified what remains unclear,
12
+ but lack the context window or reasoning capacity to finish. If that partial work
13
+ stays in the conversation, a bigger model has to rediscover it.
14
+
15
+ Usage:
16
+
17
+ ```md
18
+ /record-findings
19
+ ```
20
+
21
+ ## Use it when
22
+
23
+ - a small or fast model is stuck after a meaningful investigation;
24
+ - you need to hand off debugging context to a bigger model without starting over;
25
+ - you have finished diagnosing a bug or unexpected behavior;
26
+ - you verified how VS Code, Copilot, pricing, or session logs behave; or
27
+ - you discovered a non-trivial fact that another investigation may need.
28
+
29
+ The skill writes exactly one immutable file under `knowledge/findings/` and runs
30
+ the knowledge-base validation checks.
31
+
32
+ ## Do not use it for
33
+
34
+ - team standards or rules, which belong in a Principle;
35
+ - descriptions of how a system or object is composed, which belong in a Structure;
36
+ - stable, consolidated ideas, which belong in a Concept; or
37
+ - a collection of unrelated observations.
38
+
39
+ Record one claim at a time. If a conclusion changes later, add a new Finding that
40
+ links to the earlier one instead of rewriting the historical record.
41
+
42
+ ## Example prompts
43
+
44
+ - "I am stuck on why this Copilot session has no model name. Record everything a
45
+ bigger model needs to continue."
46
+ - "Create a Finding from the investigation of the pricing mismatch."
47
+ - "Save the parser behavior, attempted fixes, and open questions as an OKF
48
+ Finding for a bigger model."
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: copilot-session-usage
3
- Version: 0.8.4
3
+ Version: 0.9.1
4
4
  Summary: Usage and cost analytics for GitHub Copilot and Copilot-CLI session logs
5
5
  Project-URL: Homepage, https://github.com/gsemet/copilot-session-usage
6
6
  Project-URL: Documentation, https://copilot-session-usage.readthedocs.io/en/stable/
@@ -70,7 +70,7 @@ Copilot CLI/App event logs and turns them into repeatable reports. It provides:
70
70
  | Estimated cost (`$`) **per model** | ❌ No accurate cost per breakdown | ✅ |
71
71
  | Tokens **per subagent** | ⚠️ LLM digging each time; consumes tokens | ✅ |
72
72
  | Estimated cost (`$`) **per subagent** | ❌ No accurate cost per breakdown | ✅ |
73
- | Cost attribution to skills | ❌ Cannot provide cost per breakdown | ✅ |
73
+ | Cost attribution to skills | ❌ Cannot provide cost per breakdown | ✅ Limited timeline attribution (VS Code) |
74
74
  | Tool-call counts by skill and subagent | ⚠️ LLM digging each time | ✅ |
75
75
  | Batch analysis, filtering, and aggregation | Limited/conversational | ✅ |
76
76
  | Stable JSON, table, and detailed output | No stable contract | ✅ |
@@ -82,6 +82,13 @@ In the table, `⚠️` means that Chronicle may answer the question in a particu
82
82
  environment or with additional analysis, but does not guarantee a stable, reproducible
83
83
  breakdown for it.
84
84
 
85
+ Skill token and cost attribution is limited: VS Code requests are grouped under
86
+ the latest explicit slash-command skill, including the whole request context and
87
+ later work until another invocation. This is not an isolated measurement of tokens
88
+ or cost caused by the skill; automatically loaded and overlapping skills cannot be
89
+ separated. CLI/App per-skill tokens and costs are unavailable. See
90
+ [Skill attribution](docs/source/explanation/how-cost-estimation-works.md#skill-attribution).
91
+
85
92
  Use Chronicle for **“What did I do?”** and use this project for **“How much did it cost,
86
93
  which model or subagent consumed it, and can I export the evidence?”**
87
94
 
@@ -165,9 +172,11 @@ copilot-session-usage list --dir /path/to/debug-logs --format table
165
172
  - **Session filtering** — regex match by name, date-range filtering
166
173
  - **Aggregation** — roll up costs across many sessions in one command
167
174
  - **Skill-aware cost attribution** — detect skills, attribute LLM and tool calls to the active skill
175
+ - **Skill-source detection** — inspect slash commands, discovery events, system prompts, and skill tools
168
176
  - **Skill cost breakdown** — per-skill token counts and estimated cost (VS Code provider)
169
177
  - **Tool-call attribution** — per-skill/per-subagent tool-call counts
170
178
  - **Title filtering** — find sessions by title substring
179
+ - **Metadata cache** — reuse session indexes until the workspace database changes
171
180
  - **Efficiency summaries** — cache ratio, model split, cost per 1M tokens
172
181
  - **Field extraction** — pull specific values with `--query`
173
182
 
@@ -181,9 +190,17 @@ copilot-session-usage list --dir /path/to/debug-logs --format table
181
190
  `~/.config/Code/User/workspaceStorage/` (Linux).
182
191
 
183
192
  Each session directory contains a `GitHub.copilot-chat/debug-logs/` folder with
184
- JSONL files. The tool parses these files, extracts token counts per model,
185
- applies per-model pricing (including cache-hit discounts and long-context tier
186
- switching), and estimates the session cost in USD.
193
+ JSONL files plus optional `system_prompt_*.json` and `tools_*.json` artifacts.
194
+ The tool parses the JSONL files, extracts token counts per model, applies
195
+ per-model pricing (including cache-hit discounts and long-context tier
196
+ switching), and estimates the session cost in USD. Skill detection also reads
197
+ the optional system-prompt skill list and skill tool definitions. Those artifacts
198
+ identify available skills; only timestamped slash-command user messages drive
199
+ the active-skill attribution timeline.
200
+
201
+ Session metadata from `state.vscdb` is cached in a small local index keyed by
202
+ workspace hash. The index stores metadata only, never raw logs or message
203
+ content, and is invalidated when the source database mtime changes.
187
204
 
188
205
  Subagent calls (`runSubagent`) are tracked separately so you can see how much
189
206
  token usage was delegated to helper agents.
@@ -262,6 +279,7 @@ just knowledge-validate
262
279
  | `--workspace PATH` | Only sessions from this workspace folder |
263
280
  | `--aggregate` | Aggregate all matching sessions into one summary |
264
281
  | `--summary` | Output a cost-efficiency summary |
282
+ | `--minimal` | Alias for `--detail minimal` on analysis commands |
265
283
  | `--skill-breakdown` | Emit a per-skill cost breakdown |
266
284
  | `--tool-breakdown` | Emit a per-skill/per-subagent tool-call count breakdown |
267
285
  | `--skill NAME` | Filter the report to a single skill |
@@ -52,7 +52,7 @@ Copilot CLI/App event logs and turns them into repeatable reports. It provides:
52
52
  | Estimated cost (`$`) **per model** | ❌ No accurate cost per breakdown | ✅ |
53
53
  | Tokens **per subagent** | ⚠️ LLM digging each time; consumes tokens | ✅ |
54
54
  | Estimated cost (`$`) **per subagent** | ❌ No accurate cost per breakdown | ✅ |
55
- | Cost attribution to skills | ❌ Cannot provide cost per breakdown | ✅ |
55
+ | Cost attribution to skills | ❌ Cannot provide cost per breakdown | ✅ Limited timeline attribution (VS Code) |
56
56
  | Tool-call counts by skill and subagent | ⚠️ LLM digging each time | ✅ |
57
57
  | Batch analysis, filtering, and aggregation | Limited/conversational | ✅ |
58
58
  | Stable JSON, table, and detailed output | No stable contract | ✅ |
@@ -64,6 +64,13 @@ In the table, `⚠️` means that Chronicle may answer the question in a particu
64
64
  environment or with additional analysis, but does not guarantee a stable, reproducible
65
65
  breakdown for it.
66
66
 
67
+ Skill token and cost attribution is limited: VS Code requests are grouped under
68
+ the latest explicit slash-command skill, including the whole request context and
69
+ later work until another invocation. This is not an isolated measurement of tokens
70
+ or cost caused by the skill; automatically loaded and overlapping skills cannot be
71
+ separated. CLI/App per-skill tokens and costs are unavailable. See
72
+ [Skill attribution](docs/source/explanation/how-cost-estimation-works.md#skill-attribution).
73
+
67
74
  Use Chronicle for **“What did I do?”** and use this project for **“How much did it cost,
68
75
  which model or subagent consumed it, and can I export the evidence?”**
69
76
 
@@ -147,9 +154,11 @@ copilot-session-usage list --dir /path/to/debug-logs --format table
147
154
  - **Session filtering** — regex match by name, date-range filtering
148
155
  - **Aggregation** — roll up costs across many sessions in one command
149
156
  - **Skill-aware cost attribution** — detect skills, attribute LLM and tool calls to the active skill
157
+ - **Skill-source detection** — inspect slash commands, discovery events, system prompts, and skill tools
150
158
  - **Skill cost breakdown** — per-skill token counts and estimated cost (VS Code provider)
151
159
  - **Tool-call attribution** — per-skill/per-subagent tool-call counts
152
160
  - **Title filtering** — find sessions by title substring
161
+ - **Metadata cache** — reuse session indexes until the workspace database changes
153
162
  - **Efficiency summaries** — cache ratio, model split, cost per 1M tokens
154
163
  - **Field extraction** — pull specific values with `--query`
155
164
 
@@ -163,9 +172,17 @@ copilot-session-usage list --dir /path/to/debug-logs --format table
163
172
  `~/.config/Code/User/workspaceStorage/` (Linux).
164
173
 
165
174
  Each session directory contains a `GitHub.copilot-chat/debug-logs/` folder with
166
- JSONL files. The tool parses these files, extracts token counts per model,
167
- applies per-model pricing (including cache-hit discounts and long-context tier
168
- switching), and estimates the session cost in USD.
175
+ JSONL files plus optional `system_prompt_*.json` and `tools_*.json` artifacts.
176
+ The tool parses the JSONL files, extracts token counts per model, applies
177
+ per-model pricing (including cache-hit discounts and long-context tier
178
+ switching), and estimates the session cost in USD. Skill detection also reads
179
+ the optional system-prompt skill list and skill tool definitions. Those artifacts
180
+ identify available skills; only timestamped slash-command user messages drive
181
+ the active-skill attribution timeline.
182
+
183
+ Session metadata from `state.vscdb` is cached in a small local index keyed by
184
+ workspace hash. The index stores metadata only, never raw logs or message
185
+ content, and is invalidated when the source database mtime changes.
169
186
 
170
187
  Subagent calls (`runSubagent`) are tracked separately so you can see how much
171
188
  token usage was delegated to helper agents.
@@ -244,6 +261,7 @@ just knowledge-validate
244
261
  | `--workspace PATH` | Only sessions from this workspace folder |
245
262
  | `--aggregate` | Aggregate all matching sessions into one summary |
246
263
  | `--summary` | Output a cost-efficiency summary |
264
+ | `--minimal` | Alias for `--detail minimal` on analysis commands |
247
265
  | `--skill-breakdown` | Emit a per-skill cost breakdown |
248
266
  | `--tool-breakdown` | Emit a per-skill/per-subagent tool-call count breakdown |
249
267
  | `--skill NAME` | Filter the report to a single skill |
@@ -56,8 +56,8 @@ token-count events emitted by the Copilot extension for each LLM call:
56
56
  - `model` — the model name as reported by the provider
57
57
 
58
58
  A single session may call multiple models (e.g., Claude Sonnet for the main
59
- request and Claude Haiku for a subagent). Each model's tokens are summed
60
- separately, then costs are computed per model and aggregated.
59
+ request and Claude Haiku for a subagent). Each request is priced separately,
60
+ then its tokens and cost are aggregated by model, subagent, and active skill.
61
61
 
62
62
  ### Utility models
63
63
 
@@ -78,21 +78,20 @@ The VS Code debug log reports `inputTokens` as the **total** prompt sent
78
78
  (cached + non-cached combined). `cachedTokens` is the subset served from
79
79
  the provider's cache. The non-cached portion is `inputTokens − cachedTokens`.
80
80
 
81
- Each `llm_request` event also carries `copilotUsageNanoAiu` — VS Code's own
82
- cost for that call in nano-AI Credits (nanoAIU). It is present for all
83
- Copilot-plan models (Claude, GPT, and others). It is absent for Azure-hosted
84
- models not billed via Copilot AIC — `Kimi-K2.6-azure` is one such model:
85
- it is billed through Azure separately and correctly reports $0 AIC.
81
+ An `llm_request` event can also carry `copilotUsageNanoAiu` — VS Code's own
82
+ cost for that call in nano-AI Credits (nanoAIU). Recent logs expose it for
83
+ Copilot-plan models (Claude, GPT, and others), but it can be missing.
84
+ Absence alone does not establish a zero bill or identify an external provider.
86
85
 
87
- When `copilotUsageNanoAiu` is present and non-zero, the tool uses it directly:
86
+ When `copilotUsageNanoAiu` is present, including zero, the tool uses it directly:
88
87
 
89
88
  ```
90
89
  cost_usd = copilotUsageNanoAiu / 100_000_000_000 (1 nanoAIU = 1e-11 USD)
91
90
  ```
92
91
 
93
- For models that do not report `copilotUsageNanoAiu` — Azure-hosted models billed
94
- outside the Copilot plan — the tool falls back to token-based computation
95
- (or $0 when the model has no Copilot pricing entry):
92
+ For individual requests without `copilotUsageNanoAiu`, the tool falls back to
93
+ token-based computation. An unknown model uses the generic fallback rate and is
94
+ listed in `fallback_pricing_models`; it is not automatically treated as free:
96
95
 
97
96
  ```
98
97
  cost_usd = (
@@ -102,10 +101,18 @@ cost_usd = (
102
101
  ) / 1_000_000
103
102
  ```
104
103
 
105
- plus the Anthropic cache-write approximation when applicable.
104
+ plus the cache-write premium approximation when the rate card defines one,
105
+ including Anthropic and GPT-5.6 and later models. Fallback tiers are selected
106
+ from each request's input tokens, not a model's accumulated session tokens.
107
+ Billed and estimated requests can coexist without either being dropped.
106
108
 
107
- Verified on a real session: `copilotUsageNanoAiu`-based cost matches the
108
- VS Code AIC panel at **0.000% error** for Claude models.
109
+ On 2026-10-07, an audit of 34 fully billed local sessions matched the sum of
110
+ VS Code's billed nano-credit telemetry at the output's four-decimal USD precision.
111
+ The inspected VS Code 1.140.0 debug-summary implementation sums this same field.
112
+ The audit included GPT and Claude requests; it did not verify every model against
113
+ an invoice. Exact parity requires complete billing telemetry. Token-only cache
114
+ estimates cannot guarantee it. Breakdowns round to six decimals, so their sums
115
+ can differ slightly from the four-decimal session total.
109
116
 
110
117
  ---
111
118
 
@@ -121,18 +128,39 @@ Subagent names are extracted from the JSONL filename
121
128
 
122
129
  ## Skill attribution
123
130
 
124
- Skills are detected from three sources in the debug logs:
131
+ Skills are detected from four sources in the debug logs:
125
132
 
126
133
  - `user_message` events containing slash commands such as `/skill-name` or
127
134
  `/namespace skill-name`.
128
135
  - `discovery` events of type `Skill Discovery` that list loaded skills.
129
136
  - `generic` events named `Custom Instructions` that enumerate on-demand skills.
137
+ - `system_prompt_*.json` skill blocks and `tools_*.json` skill definitions.
130
138
 
131
139
  Each `llm_request` and `tool_call` is attributed to the most recently invoked
132
140
  skill at that timestamp. The result is included in the session report under the
133
141
  `skills` key and can be surfaced with `--skill-breakdown`, `--tool-breakdown`,
134
142
  or `--skill <name>`.
135
143
 
144
+ System-prompt and tool artifacts establish detected or available skills only;
145
+ timestamped slash-command user messages establish the active-skill timeline.
146
+ Session metadata discovery uses a local workspace-hash index keyed by the
147
+ `state.vscdb` mtime. The cache contains metadata such as titles and log paths,
148
+ not raw debug logs or user message content.
149
+
150
+ Skill costs preserve the same billed request amounts as the other breakdowns,
151
+ but **skill token and cost attribution is limited**. Each request's full token
152
+ counts and cost are assigned to the latest slash-command skill until another
153
+ invocation occurs. These tokens include conversation history, instructions, and
154
+ tool results, not just the skill's own text or incremental token consumption.
155
+
156
+ Detection does not establish attribution: discovery events identify skills but
157
+ do not independently assign request usage to them. Automatically loaded or read
158
+ skills and overlapping skill use cannot be separated. Unrelated work after a
159
+ skill invocation can remain attributed to that skill, while requests before any
160
+ invocation belong to `unknown`. Exact billed request costs do not make the skill
161
+ assignment causal or exact. CLI/App cumulative usage does not provide a validated
162
+ per-skill token or cost split; those breakdowns remain unavailable.
163
+
136
164
  ---
137
165
 
138
166
  ## Copilot CLI / Copilot App provider (`--agent cli`)
@@ -202,28 +230,40 @@ added to `diagnostics` explaining what was skipped.
202
230
 
203
231
  ### Cost calculation
204
232
 
205
- The shared, token-based pricing calculation (the same as the VS Code
206
- provider's, described above) is applied to the per-model `usage` reported in
207
- `session.shutdown`. Copilot CLI's own per-model billing figure,
208
- `totalNanoAiu`, is *not* used for this calculation: it is reported separately
209
- under `provider_usage.total_nano_aiu` and never substituted for or blended
210
- into `total.estimated_usd` or `model_breakdown[].estimated_usd`, since it is
211
- not validated to carry the same USD-billing meaning as VS Code's own
212
- `copilotUsageNanoAiu` field.
233
+ Copilot CLI's billed figures are used first, mirroring the VS Code
234
+ provider's use of `copilotUsageNanoAiu` (1 nanoAIU = 1e-11 USD):
235
+
236
+ - `total.estimated_usd` is the session-level `totalNanoAiu`, which is
237
+ cumulative across resumes (the largest value from the last
238
+ `session.shutdown` or `session.usage_checkpoint`).
239
+ - Each `model_breakdown` row uses that model's `totalNanoAiu`. Without it, the
240
+ model's tokens are priced exactly: `inputTokens` includes cache reads and
241
+ cache writes, so fresh input is `inputTokens - cacheReadTokens -
242
+ cacheWriteTokens`, and only `cacheWriteTokens` are charged at the
243
+ cache-write rate. The pricing tier is chosen from the average request size,
244
+ not the session sum.
245
+ - `subagents` lists the main agent and each subagent from
246
+ `session.shutdown.agentMetrics`, with their own billed `totalNanoAiu`.
247
+ - Per-model and per-agent metrics omit segments that ended without a
248
+ `session.shutdown` (a crash or kill before a resume). That remainder is
249
+ reported as `total.unattributed_usd`, with a diagnostic, so
250
+ breakdowns plus `unattributed_usd` always equal the total.
251
+
252
+ Across 101 local CLI/App sessions, totals matched the billed `totalNanoAiu`
253
+ exactly and breakdowns reconciled with it. Pricing tokens with the exact
254
+ cache-write count reproduced per-model billed amounts for 89 of 96 models;
255
+ the rest included long-context requests or discounts invisible in aggregates.
213
256
 
214
257
  ### When usage is unavailable
215
258
 
216
259
  A session that is still active, or that was interrupted before shutting down,
217
260
  has no `session.shutdown` event. In that case:
218
261
 
219
- - Per-model token totals, the model breakdown, skill cost breakdown, and the
220
- shared `total` block (tokens, cost, cache ratio) are all unavailable — they
221
- are represented as `null`/missing, **never** as a fabricated zero.
222
- - If a `session.usage_checkpoint` exists, its cumulative `totalNanoAiu` and
223
- `totalPremiumRequests` are still reported under `provider_usage` (separate
224
- from the shared token/cost calculation), but the shared `total` block stays
225
- unavailable — there is no per-model token breakdown at checkpoint
226
- granularity to price.
262
+ - Per-model token totals, the model breakdown, and skill cost breakdown are
263
+ unavailable — they are represented as `null`/missing, **never** as a
264
+ fabricated zero.
265
+ - If a `session.usage_checkpoint` exists, its cumulative `totalNanoAiu`
266
+ provides `total.estimated_usd`, entirely reported as `unattributed_usd`.
227
267
  - `diagnostics` explains exactly what is unavailable and why.
228
268
  - Batch/aggregate operations exclude sessions with unavailable evidence from
229
269
  their sums (rather than counting them as zero) and report how many were
@@ -261,18 +301,16 @@ to:
261
301
  and duration — all evidence taken directly from `subagent.started`/
262
302
  `subagent.completed`.
263
303
 
264
- The shared, per-subagent `subagents` block (the same contract VS Code
265
- populates with a validated input/output/cached split per subagent) stays
266
- empty for `cli` sessions: `subagent.completed` reports only a single combined
267
- `totalTokens` figure, with no validated split to populate that contract
268
- without fabricating it.
304
+ The shared, per-subagent `subagents` block is built from
305
+ `session.shutdown.agentMetrics`: one row for `main` and one per subagent,
306
+ with per-model tokens (including `cache_write_tokens`) and the agent's billed
307
+ `totalNanoAiu`. CLI versions that do not emit `agentMetrics` leave it empty.
269
308
 
270
309
  ### Provider-native counters
271
310
 
272
- `provider_usage` always carries Copilot CLI's own counters — `total_nano_aiu`,
273
- `total_premium_requests`, `shutdown_type`, `resume_count`, and `code_changes`
274
- — separately from the shared `total` block. These are never substituted for
275
- the shared token/estimated-USD calculation.
311
+ `provider_usage` carries Copilot CLI's own counters — `total_nano_aiu`,
312
+ `total_premium_requests`, `shutdown_type`, `resume_count`, and `code_changes`.
313
+ `total_nano_aiu` is the same cumulative figure used for `total.estimated_usd`.
276
314
 
277
315
  ---
278
316
 
@@ -32,9 +32,9 @@ and model names keep the casing from `data/models-and-pricing.yml`.
32
32
  Token counts are expressed in millions of tokens with two decimals. The
33
33
  `aic` value and the `Copilot-Session-Usage-AIC` line show the cost in AI
34
34
  credits (1 AIC = $0.01) with two decimals. If the commit already contains
35
- `Copilot-Session-Usage-Acc` or `Copilot-Session-Usage-AIC` trailers, they are
36
- replaced so the values stay fresh. Other trailers, such as `Signed-off-by`,
37
- are preserved and kept at the end of the message.
35
+ usage trailers, they are replaced so the values stay fresh. Optional session ID,
36
+ name, and type trailers are removed when their options are omitted on a later amendment.
37
+ Other trailers, such as `Signed-off-by`, are preserved and kept at the end of the message.
38
38
 
39
39
  ## From VS Code Copilot context
40
40
 
@@ -110,6 +110,40 @@ Copilot-Session-Usage-AIC: 232
110
110
  This will allow another process, not done by Copilot-Session-Cost, to later rewrite
111
111
  the commit chain with commit-accurate costs.
112
112
 
113
+ ## Add client metadata
114
+
115
+ Pass either or both of these optional parameters:
116
+
117
+ - `--session-type TEXT`: the name of the tool, process, or framework that uses
118
+ `copilot-session-usage` to set commit trailers.
119
+ - `--session-name TEXT`: the name of the current change, PRD folder, or identifier
120
+ of the whole coding session. It usually corresponds to one session ID, but the
121
+ same name can span several session IDs.
122
+
123
+ These fields are for clients to consume. `copilot-session-usage` writes them as
124
+ trailers but does not use them for session discovery, grouping, or cost analysis.
125
+ They do not require `--with-session-id`.
126
+
127
+ ```bash
128
+ copilot-session-usage amend-commit \
129
+ --session-id "abc-123" \
130
+ --session-id "def-456" \
131
+ --with-session-id \
132
+ --session-type "MyFrameWork" \
133
+ --session-name "auth-refactor"
134
+ ```
135
+
136
+ The command adds one trailer for each supplied metadata value, regardless of the
137
+ number of session IDs:
138
+
139
+ ```text
140
+ Copilot-Session-Usage-Session-Name: auth-refactor
141
+ Copilot-Session-Usage-Session-Type: MyFrameWork
142
+ ```
143
+
144
+ Use the same name across commits for the same change, even when the session ID changes.
145
+ Supply the metadata options on each amendment to retain them.
146
+
113
147
  ## Preview before amending
114
148
 
115
149
  Use `--dry-run` to see the trailers that would be injected without modifying
@@ -101,7 +101,16 @@ Path-based analysis requires choosing one provider.
101
101
  ## Skill-aware analysis
102
102
 
103
103
  When a session invokes a skill (for example `/compendium-generic get-session-costs`),
104
- you can attribute costs and tool calls to that skill.
104
+ you can group VS Code request tokens, costs, and tool calls under that skill.
105
+
106
+ :::{note}
107
+ Skill token and cost attribution is limited to the latest explicit slash-command
108
+ invocation. It assigns the whole request context, not just the skill text or usage
109
+ caused by that skill. Automatically loaded skills, overlapping skills, and later
110
+ unrelated work cannot be reliably separated; requests before any invocation are
111
+ grouped under `unknown`. CLI/App per-skill tokens and costs remain unavailable.
112
+ See [How cost estimation works](../explanation/how-cost-estimation-works.md).
113
+ :::
105
114
 
106
115
  ```bash
107
116
  # Per-skill cost breakdown for a session
@@ -113,9 +122,12 @@ copilot-session-usage id 3a91c012-1b4e-4c8a-9f72-ab12cd34ef56 --tool-breakdown
113
122
  # Concise cost for a single skill
114
123
  copilot-session-usage id 3a91c012-1b4e-4c8a-9f72-ab12cd34ef56 \
115
124
  --skill "/compendium-generic get-session-costs" \
116
- --format json --detail minimal
125
+ --format json --minimal
117
126
  ```
118
127
 
128
+ `--minimal` is an alias for `--detail minimal`; both forms return the stable
129
+ single-skill fields without the full session breakdown.
130
+
119
131
  ## List skills across sessions
120
132
 
121
133
  ```bash
@@ -99,10 +99,9 @@ Diagnostics:
99
99
  ```
100
100
 
101
101
  When a `session.usage_checkpoint` is available (a periodic cumulative
102
- counter), its provider-native counters (`total_nano_aiu`,
103
- `total_premium_requests`) are still reported under `provider_usage`, but the
104
- shared `total` block (tokens, cost, cache ratio) stays unavailable — there is
105
- no per-model token breakdown at checkpoint granularity to price. See
102
+ counter), its billed `totalNanoAiu` provides `total.estimated_usd`, reported
103
+ entirely as `total.unattributed_usd` because there is no per-model breakdown
104
+ at checkpoint granularity. See
106
105
  [How cost estimation works](../explanation/how-cost-estimation-works.md)
107
106
  (Copilot CLI / Copilot App provider section) for the full breakdown of what
108
107
  is and isn't available at each stage.
@@ -121,10 +120,9 @@ everything into `main`. `--tool-breakdown` shows the resolved subagent name
121
120
  (or the raw `agentId` when a `subagent.started` event wasn't captured) in its
122
121
  `subagent` column. `provider_usage.subagents` separately preserves the raw
123
122
  per-subagent evidence available from the event log (name, model, tool-call
124
- count, a combined `total_tokens_reported`, and duration) — this is kept
125
- apart from the shared, per-subagent `subagents` cost contract, which stays
126
- empty for `cli` sessions because `subagent.completed` reports only a single
127
- combined token count, not a validated input/output/cached split.
123
+ count, a combined `total_tokens_reported`, and duration). The shared
124
+ `subagents` cost block is built from `session.shutdown.agentMetrics` (main
125
+ agent plus each subagent, with billed `totalNanoAiu`).
128
126
 
129
127
  ## What's different from the VS Code provider
130
128
 
@@ -132,14 +130,10 @@ combined token count, not a validated input/output/cached split.
132
130
  `cli` sessions: `events.jsonl` only exposes cumulative session-level token
133
131
  totals, not per-request ones. `skills.detected` and `--tool-breakdown` are
134
132
  still fully populated, including subagent attribution (see above).
135
- - The shared, per-subagent `subagents` block (cost split by subagent) is
136
- always empty for `cli` sessions — see "Subagent and skill attribution"
137
- above for the separate, evidence-preserving `provider_usage.subagents`.
138
- - Provider-native counters (`total_nano_aiu`, `total_premium_requests`, and
139
- similar) are reported separately under `provider_usage` and never replace
140
- the shared token/estimated-USD calculation — including nanoAiu, which is
141
- informational only for this provider and is never used to compute
142
- `total.estimated_usd`.
133
+ - Costs use Copilot's billed `totalNanoAiu` (session, per model, per agent).
134
+ Without it, tokens are priced with the exact `cacheWriteTokens` count.
135
+ Usage from segments that ended without `session.shutdown` appears as
136
+ `total.unattributed_usd`.
143
137
  - Pricing lookups for `cli`/`all` are local-only by default (no runtime
144
138
  pricing refresh attempt), unlike the `vscode` provider's default daily
145
139
  refresh attempt. Run `copilot-session-usage pricing refresh` to update