readSessionUsage
readSessionUsage(
worktreePath,claudeSessionId):Promise<SessionUsage|null>
Defined in: src/usage.ts:171
Read a session’s JSONL transcript and accumulate its token totals. Returns null if the file is absent/unreadable (reviewer transcript not written, race, etc.). Async so the single server loop is never blocked by a sync read.
Parameters
Section titled “Parameters”worktreePath
Section titled “worktreePath”string
claudeSessionId
Section titled “claudeSessionId”string
Returns
Section titled “Returns”Promise<SessionUsage | null>