Urgent.News

What's breaking now, across hundreds of outlets.

Tech

Codex Logged Fast Mode. My Cost Tracker Still Couldn't Price 13.07M Tokens.

On November 25, I ran my Codex logs through agent-cost , a CLI I maintain that estimates costs from local usage records. It counted 13.07 million tokens from Fast mode and marked all of them unpriced . The token counts were there. So was service_tier = priority , the setting for Fast. The clue was where that setting appeared in the log. The setting came one line later Here are the events that…

On November 25, I examined my Codex logs using an agent-cost tool I developed that estimates costs from records of usage on a local system. The analysis revealed 13.07 million tokens were processed in Fast mode, but all of these tokens were marked as unpriced. The tool did note that service_tier = priority, which is the setting for Fast mode, but it was located one line later in the log.

Here are the significant events, in the sequence they occurred according to Codex:

1. The turn began

2. The turn context (turn_context) was recorded, noting the turn ID and model thread_settings_applied

3. Codex recorded the service_tier = priority for the thread

4. Codex recorded the token usage

5. The parser produced the third line while still setting up the turn, before any usage had been recorded

The parser mistakenly recognized the log as normal mode when it should have been Fast mode. Consequently, the cost for these tokens could not be determined. Changing the parser so that it uses the initial setting immediately after turn_context as the turn's starting setting should fix this issue. This update will also ensure that earlier tokens are priced with the Fast rate when a mode switch occurs during a turn.

In version 0.5.9, the parser can use the setting right after the first turn_context as the turn's initial setting. This prevents any usage from being recorded at the time. Additionally, the parser checks that the setting matches the thread and the model, and that no other turn overlaps. Additionally, I limited the cutoff to one second after turn_context for testing purposes.

To test this, I created a synthetic log for a gpt-6.2-sol model with one million input tokens, zero cached tokens, and zero output tokens. The settings were the same, except for the service_tier and its timestamp. The delay was set to 1 millisecond, and I compared the results with the default setting in version 0.5.8.

The estimates were as follows:

- One millisecond after turn_context: priority was unpriced, but Fast mode cost $4

- One millisecond after turn_context: default was normal, priced at $2

- One second after turn_context: priority was unpriced, but Fast mode cost $4

- One second and one millisecond after turn_context: priority was unpriced, and Fast mode remained unpriced

The $4 and $2 values come from the rate table included with each version, and they are applied to the synthetic million-token input. The calculation does not include promotions or contract discounts. However, the usage log alone does not indicate what I was billed.

When I re-ran the logs from November 25, the parser correctly priced the priority turns as Fast. However, some older Astra logs still lacked a service_tier. Those tokens remained unpriced in the usage count.

To run a report on your own Claude Code or Codex logs, you can use the command: uvx --from coding-agent-cost agent-cost report.

Rewritten by urgent.news; may contain errors — check the original.

Source: dev.to

Read the original at dev.to →

Report a problem with this story

More in Tech

I got tired of copy-pasting website tables into Excel, so I automated it with 30 lines of Python

If you have ever spent an afternoon copying a product table off a website row by row, this is the fix. You only need two libraries: requests to fetch the page, and BeautifulSoup to pull the table out.

  • Python script automates table data extraction from websites
  • Uses requests and BeautifulSoup libraries for web content fetching and HTML parsing
  • Converts extracted data into CSV files with optional pagination and data cleaning

On‑policy layer selection speeds long‑context models

FlashMorph2 shatters the long‑standing bottleneck where hybrid attention models either stall on very long sequences or sacrifice quality for speed.

  • FlashMorph2 resolves hidden-state drift issues in hybrid attention models
  • On-policy layer selection enables efficient scaling for 0.6B-8B models
  • Accuracy improves 2.42 points on RULER and 0.76 on recall-intensive tasks

The Uncanny Valley of the Stand-Up

Every morning at 9:02, seven grown adults turn on their cameras and perform a small theatrical ritual for an audience of muted microphones.

  • Seven adults perform daily stand-up rituals at 9:02 AM.
  • AI-generated summaries mask underlying technical issues.
  • Exhausted engineer admits to "brain fried" during outage.

More from Monday, 30 November 2026 →