Agent Hour Tracker
Agent Hour Tracker is a local CLI that measures cumulative Codex agent-hours from completed session turns.
If you inspect your own local Codex activity, start with the sanitized Archive Score card:
uvx codex-agent-hour-tracker --share
The command reads local session JSONL files and reports completed root and delegated turns. It does not decode conversation content for timing. Use explicit date bounds when you need a reproducible custom report.
Synthetic Archive Score example
The following card uses fabricated dates and values. It is an example, not a report from a person or machine:
CODEX AGENT-HOUR SCORE
30 complete calendar days | 2025-01-01 to 2025-01-30
-----------------------------------------------------
Agent-hours/day: 2.00
Total agent-hours: 60.00
Peak day: 4.00
Completed turns: 12
Active days: 10/30
Archive Score | methodology v1 | tracker v0.1.0
Calculated locally. No conversation content uploaded.
Agent-hours are cumulative completed-turn durations. If turns overlap, the tracker sums each turn independently. The total measures cumulative runtime, not elapsed wall-clock time.
Install
Install the published package with either tool:
uv tool install codex-agent-hour-tracker
codex-agent-hour-tracker --share
pipx install codex-agent-hour-tracker
codex-agent-hour-tracker --share
The agent-hours command is also installed as a short alias. The CLI reads the local Codex session directory by default. Use --sessions-dir PATH to select another directory.
Custom reports
The default report is text. Explicit --start and --end values define an inclusive local-calendar date range:
mkdir -p reports
agent-hours --start 2025-01-01 --end 2025-01-30 \
> reports/january-summary.txt
CSV output has one row per calendar day. Save generated reports only under the ignored reports/ directory:
agent-hours --start 2025-01-01 --end 2025-01-30 --format csv \
> reports/january-summary.csv
Git ignores the reports/ directory. Do not redirect generated output to tracked files.
Default window and methodology
The canonical Archive Score and a report without date bounds cover the 30 most recent completed local calendar days ending yesterday. Calendar days include days with zero use. If today is March 1, the window is January 30 through February 28.
The scanner bounds each event gap at 30 minutes and uses bounded duration fallbacks. It attributes turns to their payload started_at date, excludes batch files, and deduplicates turns globally. See the methodology for exact rules and limitations.
Privacy boundary
--share emits intentionally sanitized aggregate output and is the safe default for sharing. The card contains counts, durations, and dates, so sharing it remains a deliberate aggregate disclosure.
CSV and full text reports contain semi-sensitive activity patterns. Do not commit or share those files accidentally. Keep generated files under the ignored reports/ directory and review any output before distribution.
The scanner retains compact timing metadata only. It does not decode conversation content or send session data over the network. Diagnostics are separate from report output and may include counts and, outside --share, bounded local file paths.
Optional Codex skill
The optional Codex skill is available with this repository under skills/codex-agent-hour-tracker/. Use the repository path when you want the tracker workflow in Codex.
Development and tests
The package requires Python 3.11 or newer. From a source checkout, run the synthetic test suite with:
uv run python -m unittest discover -s tests -v
The command exposes agent-hours and codex-agent-hour-tracker entry points. Packaging metadata and the test suite are the source of truth for supported commands.
Read the security policy, methodology, and MIT license before deploying or sharing reports.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file codex_agent_hour_tracker-0.1.0.tar.gz.
File metadata
- Download URL: codex_agent_hour_tracker-0.1.0.tar.gz
- Upload date:
- Size: 34.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
819f170644d90d2cb08c14c17aca8cc5b28c7775435cf279e48da26a53341315
|
|
| MD5 |
8595a3322909b8bd52b847d7ddd5092b
|
|
| BLAKE2b-256 |
2ea22584f0737622570892802ac3c1abd65ac6d5e43f0865d08b54558442d6d5
|
Provenance
The following attestation bundles were made for codex_agent_hour_tracker-0.1.0.tar.gz:
Publisher:
release.yml on tim-osterhus/codex-agent-hour-tracker
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
codex_agent_hour_tracker-0.1.0.tar.gz -
Subject digest:
819f170644d90d2cb08c14c17aca8cc5b28c7775435cf279e48da26a53341315 - Sigstore transparency entry: 2624228870
- Sigstore integration time:
-
Permalink:
tim-osterhus/codex-agent-hour-tracker@9e164caaac8a3e25040d0598bde659e34f8a399f -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/tim-osterhus
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@9e164caaac8a3e25040d0598bde659e34f8a399f -
Trigger Event:
push
-
Statement type:
File details
Details for the file codex_agent_hour_tracker-0.1.0-py3-none-any.whl.
File metadata
- Download URL: codex_agent_hour_tracker-0.1.0-py3-none-any.whl
- Upload date:
- Size: 16.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
40dd70b48737eba3777b0146102b30f8b46bbdfc26c66e7b94892f81fce7be69
|
|
| MD5 |
401de54c3d982c4972b5babe22a7fcb8
|
|
| BLAKE2b-256 |
f8eb13166148d2c30962c5e61970cc5d4c8e73d2b21401508105bef7ceb80f3d
|
Provenance
The following attestation bundles were made for codex_agent_hour_tracker-0.1.0-py3-none-any.whl:
Publisher:
release.yml on tim-osterhus/codex-agent-hour-tracker
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
codex_agent_hour_tracker-0.1.0-py3-none-any.whl -
Subject digest:
40dd70b48737eba3777b0146102b30f8b46bbdfc26c66e7b94892f81fce7be69 - Sigstore transparency entry: 2624228889
- Sigstore integration time:
-
Permalink:
tim-osterhus/codex-agent-hour-tracker@9e164caaac8a3e25040d0598bde659e34f8a399f -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/tim-osterhus
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@9e164caaac8a3e25040d0598bde659e34f8a399f -
Trigger Event:
push
-
Statement type: