Skip to content

fix(kimicode): count sessions in managed workspaces - #1939

Merged
iamtoruk merged 1 commit into
mainfrom
fix/kimicode-managed-workspaces
Nov 20, 2026
Merged

iamtoruk merged 1 commit into
mainfrom
fix/kimicode-managed-workspaces

Conversation

@iamtoruk

Copy link
Copy Markdown
Member

Summary

Kimi Code keeps sessions in two kinds of workspace folder: wd_<slug>_<hash> and wm_<uuid> (managed workspaces). Discovery only looked in wd_*, so usage from managed workspaces was missing from reports and history, while the live view already showed it.

  • Discovery accepts both prefixes.
  • DAILY_CACHE_VERSION goes 79 to 80 so settled days are rebuilt and include those sessions.

Fixes #1933. Found and first fixed by @TheoDZzz in #1934; thank you for the report and the pointer to the Kimi Code source.

Testing / Verification

  • Tested against real data. Real Kimi Code history, 1 Jul to 17 Nov 2026: 33,386 calls and $1,640.51 before and after, 0 of 45 days differ.
  • Real sessions copied into wm_ folders: 0 calls before, 592 calls and $19.08 after, the same as under wd_. The same sessions under both folders are counted once.
  • A settled day in a v79 cache is rebuilt once after the bump (334 to 520 calls in the test home) and is stable on later runs.
  • npx tsc --noEmit passes; the Kimi Code and daily-cache test files pass. The new wm_ case fails without the discovery change.
  • Not a UI change

@iamtoruk iamtoruk mentioned this pull request Nov 19, 2026
5 tasks done
@iamtoruk
iamtoruk merged commit c08d761 into main Nov 20, 2026
31 of 32 checks passed
@iamtoruk
iamtoruk deleted the fix/kimicode-managed-workspaces branch November 20, 2026 12:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Kimi Code usage is missing for managed workspaces (wm_*)

1 participant