Integrations

Time and token tracking for Codex

Codex writes every session to ~/.codex/sessions, the CLI and the desktop app alike. inlinr reads each file from where it last stopped and turns it into time, the lines Codex's patches changed and token counts per project, next to your editor time and Claude Code.

Get it on GitHub

Set it up

  1. Already use the inlinr plugin for Claude Code? Nothing to install: it reads Codex sessions on the same machine. Otherwise, with Node 18 or later, download the script:

    Terminal
    curl -fsSL https://github.com/inlinrhq/inlinr-claude-code/raw/main/dist/index.js -o inlinr.js
  2. Connect this machine, then open the link and approve with GitHub:

    Terminal
    node inlinr.js activate --editor codex
  3. Have Codex run inlinr after each turn, through its notify setting:

    Terminal
    node inlinr.js setup codex

What gets recorded

  • Time spent in each session, per project and branch
  • Files and lines changed by the patches Codex applied
  • Input, cached input and output tokens, and the model
  • Sessions you archived, read from ~/.codex/archived_sessions

Good to know

  • Never your prompts, the assistant's replies or file contents.
  • Tracking starts when you activate; past sessions are not uploaded.
  • setup adds notify to ~/.codex/config.toml. Codex takes one notify program: if you have one, setup prints the command to call from it.
  • No cost figure yet for OpenAI models: inlinr shows a cost only for prices it has checked.

Never file contents, prompts or replies. The full list of what is sent · Tracking Claude Code, Codex and Gemini CLI: terminal, desktop, IDE and cloud

Questions about Codex

Does it work with the Codex desktop app?

Yes. The desktop app writes the same session files as the CLI, so one setup covers both.

How are Codex's lines counted?

From the patches it applies, once Codex reports a patch went through. A rejected patch that is tried again counts once, not twice.

Why is cached input shown apart from input?

OpenAI counts cached input inside input. inlinr takes it out, so input means the same for Codex as for Claude Code: what was sent fresh.

What about a forked session?

A fork starts with a copy of its parent's history. That copy is skipped, so the parent's work is not counted a second time.

Read also

Start tracking Codex

Free for solo use. Sign in with GitHub, install, and your first session shows up on the dashboard.

No card to start · no source code leaves your machine