openai / openai/codex

Bug: `astra` token consumption spikes above ~272k tokens in Codex CLI

Open
#42,901 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug CLI context rate-limits
Dominant language
Rust
Stars
125k
Forks
19.4k
PR merge metrics
PR metrics pending

Description

Summary

astra in Codex CLI appears to have unexpected token-consumption spikes once request size goes beyond ~272k tokens, similar to older sol behavior. OpenAI’s model docs for astra suggest this should not happen.

Repro steps

  1. Use Codex CLI with model astra.
  2. Send requests with increasing token size.
  3. Compare usage near ~272k tokens and slightly above that size.
  4. The run above ~272k reports materially higher total token consumption.

Expected

Token usage for astra should stay consistent with documented astra behavior and not show a threshold-based spike in consumption.

Actual

Total token consumption appears to jump after ~272k tokens, matching the old overage-style behavior previously seen with sol.

Impact

Unexpected cost increase and reduced cost predictability for long-session workflows.

Notes

  • User-reported behavior in production workflow
  • Date reported: 2026-09-05 (UTC)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Codex CLI path that handles model selection and reports token usage, then reproduce requests around the reported ~272k-token threshold with model astra. Compare usage just below and above the threshold; done means the threshold-based consumption spike is explained and the behavior matches the documented astra usage.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.