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-changesflag 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-wakatimecrate withWakaTimeTrackerstruct - Rate limiting: 1 heartbeat per minute per file (writes bypass limit)
- Integrates with
SessionServicesin codex-core - Hooks into file operations via
ToolEmitter::emit()for patch apply events - Spawns
wakatime-cliin 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.tomlcodex-rs/core/src/config/types.rscodex-rs/core/src/config/mod.rscodex-rs/core/src/state/service.rscodex-rs/core/src/codex.rscodex-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.
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗