Skip to content

an open-source alternative to the dots, bots and muses of the world, run an office of claude code/codex like agents on your laptop, sandboxes or anywhere, uses your existing subscriptions

fix(windows): usage meter read 0/0 - transcript dir encoding

Gulum07b8dd6e3e09
diff --git a/src/main/transcript.ts b/src/main/transcript.ts
index 3d1793bf..06630850 100644
--- a/src/main/transcript.ts
+++ b/src/main/transcript.ts
@@ -6,9 +6,14 @@ import { estimateCostUsd, normalizeModel } from './pricing';
/** Resolve the Claude Code transcript directory for a given working directory.
* Claude Code stores per-project transcripts under ~/.claude/projects, keying
* each project by its absolute cwd with the leading slash dropped and every
- * remaining slash turned into a dash (e.g. /Users/me/app → Users-me-app). */
+ * remaining slash turned into a dash (e.g. /Users/me/app → Users-me-app). On
+ * Windows EVERY non-alphanumeric character is dashed (drive colon and
+ * backslashes included): C:\Users\me\app → C--Users-me-app. */
export function projectDir(cwd: string): string {
- return path.join(os.homedir(), '.claude/projects', cwd.replace(/^\//, '').replaceAll('/', '-'));
+ const key = process.platform === 'win32'
+ ? cwd.replace(/[^a-zA-Z0-9]/g, '-')
+ : cwd.replace(/^\//, '').replaceAll('/', '-');
+ return path.join(os.homedir(), '.claude/projects', key);
}
export interface AgentUsage {