Feature Request: WakaTime Integration for Time Tracking

Resolved 💬 4 comments Opened Jan 13, 2026 by yuvrajangadsingh Closed Feb 23, 2026

Summary

Add WakaTime integration to Codex CLI to track coding time spent in sessions. This would send heartbeats to the local wakatime-cli when files are read/written, enabling developers to track their AI-assisted coding time alongside regular coding activity.

Motivation

  • Consistency with Claude Code: Claude Code already has WakaTime support, making this a natural addition for Codex CLI
  • Developer productivity tracking: Many developers use WakaTime to track their coding time across different tools and projects
  • AI coding metrics: WakaTime supports --ai-line-changes flag to track lines added/changed by AI assistants

Proposed Implementation

I have a working implementation ready on my fork that includes:

Configuration

Opt-in via ~/.codex/config.toml:

[wakatime]
enabled = true
# Optional overrides:
# cli_path = "~/.wakatime/wakatime-cli"
# project = "my-project"

Architecture

  • New codex-wakatime crate with WakaTimeTracker struct
  • Rate limiting: 1 heartbeat per minute per file (writes bypass limit)
  • Integrates with SessionServices in codex-core
  • Hooks into file operations via ToolEmitter::emit() for patch apply events
  • Spawns wakatime-cli in background (non-blocking)

WakaTime CLI invocation

~/.wakatime/wakatime-cli \
  --entity /path/to/file \
  --plugin "codex-cli/1.0" \
  --project "project-name" \
  --write  # for write operations

Files Changed

  • codex-rs/wakatime/ (new crate)
  • codex-rs/Cargo.toml (workspace)
  • codex-rs/core/Cargo.toml
  • codex-rs/core/src/config/types.rs
  • codex-rs/core/src/config/mod.rs
  • codex-rs/core/src/state/service.rs
  • codex-rs/core/src/codex.rs
  • codex-rs/core/src/tools/events.rs

Testing

All existing tests pass, plus 3 new unit tests for the wakatime crate.

Happy to submit a PR once this feature request is approved.

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗