Skip to content

feat: track Claude and Codex usage simultaneously#54

Merged
leonardocouy merged 2 commits intofeat/codex-monitoringfrom
feat/grand-refactor
Jan 24, 2026
Merged

feat: track Claude and Codex usage simultaneously#54
leonardocouy merged 2 commits intofeat/codex-monitoringfrom
feat/grand-refactor

Conversation

@leonardocouy
Copy link
Copy Markdown
Owner

Summary

  • Add Codex usage tracking alongside Claude
  • Support both OAuth and CLI modes for Codex authentication
  • Show combined usage in tray: CL 25% · CX 10%
  • Major refactor: split monolithic modules into focused submodules
  • Add ts-rs for automatic Rust→TypeScript type generation with CI drift check

Changes

Features

  • Track Claude and Codex usage simultaneously
  • Codex OAuth mode reads from ~/.codex/auth.json
  • Codex CLI mode spawns codex app-server for RPC (session reuse with 5min idle timeout)
  • Tray shows both providers with color-coded usage levels

Architecture

  • Extract state/, commands/, refresh/, tray/ modules
  • Add ts-rs for Rust→TypeScript type generation
  • Add CI check for IPC type drift
  • Use IpcErrorCode enum instead of string literals
  • Add policy.rs for pause/delay logic with unit tests

Bug Fixes

  • Reap CLI session on teardown to prevent zombie processes
  • Reduce polling loop duplication

Test plan

  • Enable Claude tracking only → shows CL X%
  • Enable Codex tracking only → shows CX X%
  • Enable both → shows CL X% · CX X%
  • Codex OAuth mode with valid ~/.codex/auth.json
  • Codex CLI mode with codex binary installed
  • Settings window reflects both providers
  • Notifications work for both providers (near limit, reset)

- Extract state/, commands/, refresh/, tray/ modules
- Add ts-rs for Rust→TypeScript type generation
- Add CI check for IPC type drift
- Use IpcErrorCode enum instead of string literals
@leonardocouy leonardocouy changed the base branch from main to feat/codex-monitoring January 24, 2026 13:59
@leonardocouy leonardocouy merged commit 1f1e105 into feat/codex-monitoring Jan 24, 2026
7 checks passed
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.

1 participant