{"slug": "do-not-invent-a-5-hour-window-in-a-codex-usage-tracker", "title": "Do Not Invent a 5-Hour Window in a Codex Usage Tracker", "summary": "A developer at Agent Island warns against hardcoding a 5-hour window label in a Codex usage tracker, as the provider no longer exposes that period. The primary tile should display the weekly window and its reset time, and each provider needs separate state to avoid hiding failures.", "body_md": "An old quota tile can keep looking correct long after the provider stops reporting the data behind it.\n\nCodex currently exposes a weekly usage window. It does not expose the former five-hour window. Keeping a permanent \"5h\" card in the interface would turn stale product history into current telemetry.\n\nThe primary tile should describe the weekly window and its reset time. The layout can expand when only one period exists instead of preserving an empty second slot.\n\nDo not hardcode the label from a previous API response shape:\n\n```\nbad:  tile.title = \"5h\"\ngood: tile.title = providerPeriodLabel\n```\n\nThe percentage may be displayed as used or remaining. Either way, it answers one question: how much weekly capacity is left?\n\nA combined Claude and Codex dashboard still needs separate provider state.\n\nIf Claude refreshes successfully while Codex fails, a single green \"updated\" status hides the Codex failure. Each provider needs its own value, error, and refresh timestamp.\n\nPersisted values can prevent an empty screen during startup, but loading old data must not refresh its age. Show the last successful sync and the provider-specific error.\n\nCodex session records can contain token usage events. A local ledger can parse them, separate input, output, and cached-token categories, and deduplicate records that reappear during later scans.\n\nThe event timestamp controls daily and weekly attribution. The scan timestamp only tells us when the record was observed.\n\nThis local ledger does not explain the provider quota percentage one for one. Provider rules and local log coverage have different boundaries.\n\nFor recognized model identifiers, a dated price snapshot can produce estimated API value. Unknown models should remain unpriced instead of inheriting the rate of a convenient neighbor.\n\nThe estimate is not subscription spend. Included usage, price changes, missing events, and provider-side aggregation prevent exact reconciliation.\n\nAsk these questions before trusting a Codex usage tracker:\n\nI help run Agent Island. The Codex weekly window, local ledger, and report behavior described here is verified on macOS in v1.7.1. This is not a Windows-parity or Codex quota-alarm claim.\n\nThe canonical guide contains the full data-boundary discussion:", "url": "https://wpnews.pro/news/do-not-invent-a-5-hour-window-in-a-codex-usage-tracker", "canonical_source": "https://dev.to/agentis/do-not-invent-a-5-hour-window-in-a-codex-usage-tracker-44od", "published_at": "2026-07-24 05:05:08+00:00", "updated_at": "2026-07-24 05:34:00.962094+00:00", "lang": "en", "topics": ["developer-tools"], "entities": ["Agent Island", "Codex", "Claude"], "alternates": {"html": "https://wpnews.pro/news/do-not-invent-a-5-hour-window-in-a-codex-usage-tracker", "markdown": "https://wpnews.pro/news/do-not-invent-a-5-hour-window-in-a-codex-usage-tracker.md", "text": "https://wpnews.pro/news/do-not-invent-a-5-hour-window-in-a-codex-usage-tracker.txt", "jsonld": "https://wpnews.pro/news/do-not-invent-a-5-hour-window-in-a-codex-usage-tracker.jsonld"}}