u/Kafumanto

With Microsoft rolling out big changes to GitHub Copilot, while waiting for the promised usage insights from MS, I built an open‑source tool that shows how much Copilot Chat in VS Code is actually using (tokens + estimated costs).

I originally made this because I wanted real numbers before deciding whether to use also an API‑based provider. Once it was working, I figured others might find it useful too.

The project is fully open source on GitHub: https://github.com/kafumanto/copilot-tokens

What the tool does

The tool analyzes the local VS Code Copilot Chat logs and provides:

  • Token counts per session
  • Estimated costs using OpenRouter pricing
  • Total usage and costs summaries (to help track or budget AI expenses in the future)
  • JSON and CSV export
  • Cross‑platform support
  • Optional --anonymous mode to hide session titles if you want to share results with the community

Try it instantly

If you want to run it instantly without installing anything, there’s a Docker image ready to go:

Happy to hear feedback from the community!

P.S. As an example, here is the anonymous report of my activity on April:

Start time (UTC)         Session ID                            Model                          User msgs  Asst msgs      Input      Output       Total    Input $     Output $      Total $
-----------------------  ------------------------------------  -----------------------------  ---------  ---------  ---------  ----------  ----------  ---------  -----------  -----------
2026-04-05 19:14:44.261  259bee87-0aa1-4e2e-bdd5-71db096609a4  *                              8                  8     17 837     314 259     332 096  $0.046565    $4.713885    $4.760450
2026-04-06 19:38:54.152  8bfc312e-c3ad-42b6-b1be-a8487cf67a28  *                              45                45     88 918     977 458   1 066 376  $0.153898   $12.077276   $12.231175
2026-04-07 19:25:27.702  e135e6e2-1e2f-4eab-a674-c974126ed045  copilot-auto/gpt-5.3-codex     3                  3      6 105     103 274     109 379  $0.010684    $1.445836    $1.456520
2026-04-07 21:43:35.241  60c6af4e-a0d7-4795-973b-83d799323bf2  copilot-auto/gpt-5.3-codex     4                  4      7 396     173 641     181 037  $0.012943    $2.430974    $2.443917
2026-04-07 22:17:37.140  609f39c3-03d2-4c72-9e62-945a419b0ba9  copilot-auto/gpt-5.3-codex     2                  2      4 894     127 644     132 538  $0.008565    $1.787016    $1.795581
2026-04-09 14:46:38.689  d5858144-ef82-47b3-b230-292b21434467  *                              2                  2      4 341      84 770      89 111  $0.004426    $1.085616    $1.090042
2026-04-10 14:27:30.911  04df2046-e7cc-4e1f-a224-37b397551a31  copilot-auto/gpt-5.3-codex     5                  5     14 821     209 067     223 888  $0.025937    $2.926938    $2.952875
2026-04-10 17:22:36.108  5f713ffa-7874-4d1c-8229-9650b6fa1425  copilot-auto/claude-haiku-4-5  2                  2      4 239     146 157     150 396          -            -            -
2026-04-10 17:51:10.175  f32a2406-e029-46ec-90bc-2abf042e223c  *                              7                  7     16 648     373 796     390 444  $0.030964    $5.245548    $5.276512
2026-04-11 17:04:43.668  066955f2-6330-4536-bcc8-86358dae9096  copilot/gpt-5.4-mini           3                  3      5 995      17 040      23 035  $0.004496    $0.076680    $0.081176
2026-04-12 11:25:32.945  debcdb51-f639-4157-959e-2a9bfef4a9d3  copilot/gpt-5.4-mini           19                19     45 977      89 107     135 084  $0.034483    $0.400982    $0.435464
2026-04-12 12:11:01.495  b311bd93-3823-4a3e-b718-40a5e4cc63a8  *                              10                10     22 179     421 886     444 065  $0.032621    $3.533456    $3.566077
2026-04-13 13:21:17.869  6250c8dc-4c53-41fb-9b21-3ead4524290e  copilot/gpt-5-mini             1                  1        919       9 980      10 899  $0.000230    $0.019960    $0.020190
2026-04-13 15:14:26.630  617c52b9-2ef5-4873-a0f5-6b1872bcaddc  copilot-auto/gpt-5.3-codex     1                  1      2 738      64 857      67 595  $0.004791    $0.907998    $0.912789
2026-04-13 15:46:43.398  b2af9993-5ea9-4af9-9e8c-f99b8c1074ce  *                              14                14     32 039     459 956     491 995  $0.047318    $6.384112    $6.431430
2026-04-13 17:11:56.366  09516416-cd55-43eb-874a-e1347badfb9f  *                              9                  9     16 899     252 856     269 755  $0.033863    $3.625738    $3.659601
2026-04-13 17:33:59.920  e11aa88d-c423-429f-9598-97745be6b5b9  *                              6                  6     12 105     297 231     309 336  $0.026018    $4.230402    $4.256420
2026-04-13 21:55:43.913  a47dc628-5a59-4d36-8041-34fdebf14643  *                              4                  4      8 265     141 846     150 111  $0.009742    $1.454334    $1.464076
2026-04-13 22:39:35.338  5e148767-3a08-480e-9563-d3bacb2059dc  *                              8                  8     15 756     152 990     168 746  $0.025720    $2.113617    $2.139337
2026-04-14 14:04:24.426  cbaea9f4-63ed-4cc5-b3fc-7dc3c4ea565e  copilot/gpt-5.4-mini           1                  1      1 262      15 475      16 737  $0.000947    $0.069638    $0.070584
2026-04-14 14:52:28.572  03e5f7fd-e8c9-4eee-964e-613ee1a73689  *                              16                16     17 340     109 060     126 400  $0.048301    $1.593360    $1.641661
2026-04-15 14:52:04.399  b5d68888-5d39-43b1-93bf-a1eb89310f72  *                              4                  4      4 680       8 337      13 017  $0.008944    $0.121177    $0.130121
2026-04-15 14:54:14.649  57a75856-e04d-4425-8085-3cb4065640c0  *                              7                  7     20 290      44 392      64 682  $0.032632    $0.564023    $0.596654
2026-04-15 16:18:00.093  fca7006c-1127-4ea4-8236-1cc2a7b8e73d  *                              4                  4     12 459      25 447      37 906  $0.016699    $0.354900    $0.371599
2026-04-16 14:10:28.854  c4a58e5a-c7bc-4fa1-a212-0691c22ea7f9  copilot-auto/gpt-5.4           4                  4     13 181      51 997      65 178  $0.032952    $0.779955    $0.812908
2026-04-16 15:14:26.269  a82cc17c-42f0-4109-8d78-93c29f8d4454  copilot/gpt-5.4-mini           3                  3      9 642      51 205      60 847  $0.007232    $0.230423    $0.237654
2026-04-17 16:27:25.226  cfd340a6-cb37-4238-b0ab-f5f0aa96b0c3  *                              6                  6     12 661     888 276     900 937  $0.027526   $12.576427   $12.603952
2026-04-20 13:16:44.853  b05a054b-ab4d-453c-ad39-38f46abcd647  *                              5                  5     10 795     320 136     330 931  $0.025190    $4.625649    $4.650839
2026-04-20 14:20:00.685  4539a11d-5b41-4fda-9775-0f6b9fdac835  copilot-auto/gpt-5.4           8                  8     18 276     295 257     313 533  $0.045690    $4.428855    $4.474545
2026-04-20 15:07:06.559  d1057a63-c038-4d6c-823a-bcb02d72479b  *                              17                17     43 217   1 374 176   1 417 393  $0.036585   $10.885003   $10.921588
2026-04-20 15:31:22.529  9b6c63e8-69a2-4fdd-b44a-c65f1e4bbfe5  *                              16                16     35 539     192 590     228 129  $0.077196    $2.812593    $2.889789
2026-04-21 11:37:43.796  4a16efc5-1689-4759-8959-9dc156316801  *                              4                  4      7 687      68 355      76 042  $0.003844    $0.171412    $0.175256
2026-04-21 11:50:24.053  0ac0838e-a236-4805-a4a8-610459a2675d  *                              14                14     33 205     140 905     174 110  $0.026880    $1.256636    $1.283516
2026-04-21 12:53:46.973  733545d9-7f9c-4653-b2ce-842c9170e8fe  copilot/claude-sonnet-4.6      32                32      2 892     221 118     224 010  $0.008676    $3.316770    $3.325446
2026-04-22 14:05:26.047  50f58429-bb1d-4275-ac88-d28201719376  *                              8                  8     15 497      95 532     111 029  $0.028269    $1.103028    $1.131297
2026-04-22 14:10:12.867  338bd895-99b4-4485-8c25-12a116455fcc  *                              10                10      1 078     541 705     542 783  $0.002971    $7.946214    $7.949185
2026-04-22 17:31:08.553  b7c0c827-3e41-4ad4-b4c3-f410f773ead2  *                              6                  6        290     207 411     207 701  $0.000839    $3.036353    $3.037191
2026-04-23 10:56:29.747  c7cfc84c-2422-4287-8696-3a9ce1fc2013  copilot-auto/gpt-5.3-codex     1                  1      2 795      50 420      53 215  $0.004891    $0.705880    $0.710771
2026-04-23 12:27:32.732  48247db7-cfbc-4669-a2d7-6f9a0b322df4  *                              14                14      2 352     152 178     154 530  $0.006389    $2.188286    $2.194675
2026-04-23 16:02:57.579  76493285-2e8c-4035-b5d2-5ad02abf5e72  copilot/gpt-5.4-mini           2                  2         11       9 017       9 028  $0.000008    $0.040577    $0.040585
2026-04-23 16:14:24.331  7ec10f9a-909a-445c-aa4f-47118b65034a  copilot/gpt-5.4-mini           1                  1         13      24 211      24 224  $0.000010    $0.108950    $0.108959
2026-04-23 16:22:29.802  4d605940-ea33-424e-81c7-f62938e50400  copilot/gpt-5.4-mini           2                  2      4 044      13 514      17 558  $0.003033    $0.060813    $0.063846
2026-04-26 16:30:52.260  a325c075-dafd-4b3c-a26e-26d62989dca2  *                              4                  4        116      19 997      20 113  $0.000285    $0.263025    $0.263310
2026-04-26 16:55:24.359  31efedaf-9108-4e2c-94e3-9f029122908f  copilot-auto/gpt-5.4           3                  3        235       9 548       9 783  $0.000588    $0.143220    $0.143808
2026-04-26 17:01:30.749  07a47fee-2d52-4600-8318-bc9b7a89c61f  copilot-auto/gpt-5.3-codex     1                  1         26       3 976       4 002  $0.000046    $0.055664    $0.055709
2026-04-26 17:03:36.018  d38ae9d7-24bc-4ae1-bee8-c6a6fbcaa657  copilot-auto/gpt-5.3-codex     1                  1         97      14 463      14 560  $0.000170    $0.202482    $0.202652
2026-04-27 15:48:21.108  45c6ecfb-748b-45e9-820d-74bf622900da  *                              2                  2      1 095      17 866      18 961  $0.001585    $0.267330    $0.268915
2026-04-27 15:57:37.649  5d6eff33-f113-4ed2-891f-7d1c1d84e7fd  copilot-auto/gpt-5.4           5                  5     17 866      89 021     106 887  $0.044665    $1.335315    $1.379980
2026-04-27 16:17:47.726  93f5c43d-2b5f-4640-b579-bf03b2922a1e  copilot-auto/gpt-5.3-codex     1                  1      3 294       9 606      12 900  $0.005765    $0.134484    $0.140248
2026-04-28 14:10:38.424  cf5b2eef-f9d1-4903-abc4-bb4195fa52d3  *                              12                12     43 600     448 520     492 120  $0.115064    $6.727800    $6.842864
2026-04-28 15:51:44.300  6c58ec33-c7a9-470e-8ee6-4d5e59580b2b  copilot/claude-sonnet-4.6      6                  6     18 059      80 754      98 813  $0.054177    $1.211310    $1.265487
2026-04-28 22:19:07.044  965226fc-ec01-4684-9de0-5e6c53a9fb25  *                              18                18     57 362     690 582     747 944  $0.149469   $10.358730   $10.508199
2026-04-28 23:14:58.114  91f8f174-609e-4005-ada8-46d19943c544  copilot/claude-sonnet-4.6      4                  4     15 364      25 125      40 489  $0.046092    $0.376875    $0.422967
2026-04-29 12:10:12.376  bc64f338-4ab2-4552-b8cf-43992428336e  *                              12                12     39 823     417 113     456 936  $0.102537    $6.256695    $6.359232
2026-04-29 12:59:09.609  f17cdfc9-3799-4a9e-aa31-ffa69ac64604  *                              18                18     68 407     260 118     328 525  $0.141818    $2.490476    $2.632294
2026-04-29 15:33:53.636  edfea68f-dfa5-423a-b826-25120ead4f8b  copilot/claude-sonnet-4.6      4                  4     11 725     170 526     182 251  $0.035175    $2.557890    $2.593065
2026-04-29 15:52:36.883  8d6f6ff2-96ee-47d9-beca-e325e37d3fde  copilot/claude-sonnet-4.6      2                  2      6 839      12 415      19 254  $0.020517    $0.186225    $0.206742
2026-04-29 17:19:10.546  6d8e7cfa-4f55-4863-90c1-46cd51fd55c5  copilot/claude-sonnet-4.6      7                  7     21 786     253 547     275 333  $0.065358    $3.803205    $3.868563
2026-04-29 21:54:42.982  4552eaf5-ef32-4e2c-8747-bb68a35a7cdd  copilot/claude-sonnet-4.6      5                  5     24 662      22 476      47 138  $0.073986    $0.337140    $0.411126
2026-04-30 01:06:20.192  b8dfdb25-151f-42d9-8c2e-6cf67b37c0e1  copilot/claude-sonnet-4.6      9                  9     39 249     261 530     300 779  $0.117747    $3.922950    $4.040697
2026-04-30 11:30:23.993  c6781da3-28ba-409f-b997-ec98c47b48fb  copilot/claude-sonnet-4.6      10                10     43 761     487 685     531 446  $0.131283    $7.315275    $7.446558
2026-04-30 14:12:57.937  a641d597-bf0a-4c0e-b8fa-3414053f1784  copilot/gpt-5.4-mini           1                  1      3 083      54 231      57 314  $0.002312    $0.244040    $0.246352
2026-04-30 14:17:06.266  c343a669-310f-4dd7-ae42-ae79ae06f5c6  copilot/claude-haiku-4.5       1                  1      3 075       7 849      10 924  $0.003075    $0.039245    $0.042320
2026-04-30 14:21:24.013  94688487-c606-4225-b6f6-bc4301f463e8  copilot/claude-haiku-4.5       5                  5     30 067     223 747     253 814  $0.030067    $1.118735    $1.148802
2026-04-30 14:27:08.249  91227ace-2d3a-4259-ab8f-094ee70abd7e  copilot/claude-sonnet-4.6      3                  3     16 348     714 932     731 280  $0.049044   $10.723980   $10.773024
-                        TOTAL                                 *                              472              472  1 063 216  13 614 156  14 677 372  $2.149787  $173.509377  $175.659164

Sessions: 65
Scanned roots: /data/workspaceStorage
               /data/globalStorage
Note: counts are derived from persisted session content only; hidden Copilot-side system/context tokens are not included.
u/Kafumanto — 10 days ago