openai / openai/codex

Per-task cost estimates, model cost comparison, and spending authorization for agentic tasks

Open
#46,390 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

app enhancement rate-limits
Dominant language
Rust
Stars
125k
Forks
19.4k
PR merge metrics
PR metrics pending

Description

What variant of Codex are you using?

ChatGPT Work / Desktop, with the same concept applicable to Codex App/Web and other metered agentic workloads.

What feature would you like to see?

Before an agentic task begins, show the user an estimated monetary cost range for completing that task with the currently selected model and reasoning level.

The user should be able to compare the estimated cost across models, authorize a maximum spend for that individual task, see the running cost while it executes, and be asked for additional authorization if the task becomes substantially more expensive than originally estimated.

Additional information

Current token/credit pricing may be technically precise for accounting purposes, but it is difficult for an ordinary user to translate it into the question that matters before starting a task:

“Approximately how much money am I authorizing this task to spend?”

A user may understand that a premium model costs more without having any practical intuition for whether a particular agentic task will consume $2, $10, $25, or $50 of purchased credits.

Agentic workloads make this especially difficult because one user prompt can initiate many model turns, tool calls, file operations, delegated tasks, retries, and other work.

After-the-fact usage reporting and monthly spending limits do not solve this problem. They tell users what they have already consumed or limit aggregate consumption. They do not provide informed authorization for an individual task.

Proposed UX

When the user submits a task, before execution begins, show something similar to:

Estimated cost to complete: $4–$8

GPT-6 Astra — $4–$8

GPT-5.6 Sol — $2–$4

GPT-5.6 Terra — $0.75–$2

Changing the selected model or reasoning level should dynamically update the estimated range.

The estimate does not need to be exact. Agentic work is inherently unpredictable. A statistically derived range based on prompt/context size, selected model, reasoning level, anticipated tool use, and historical workloads would still be substantially more useful than exposing only tokens or credits.

Per-task spending authorization

Allow the user to specify:

Maximum authorized spend for this task: $10.00

The agent can then operate autonomously within that budget.

This is not necessarily intended as an absolute system-wide billing limit. It is authorization for the individual task.

Mid-task reauthorization

If the agent discovers unexpected complexity and predicts that completing the task will exceed the original estimate or authorized amount, pause execution.

For example:

Additional authorization required

Spent so far: $8.43

Original estimate: $4–$8

Revised additional cost estimate: $4–$7

The task has required more work than initially anticipated.

Options:

Continue with current model

Switch to a less expensive model

Increase spending limit

Stop task

This preserves agent autonomy while keeping financial authorization with the user.

Running cost meter

During execution, display something like:

Current task cost: $5.27 / $10.00 authorized

Credits and tokens can remain available as detailed metrics, but monetary cost should be the primary user-facing measurement when purchased credits are being consumed.

Real-world example

I encountered this problem while intentionally using GPT-6 Astra for substantial Skyrim modding and UX-design projects.

I selected Astra because its performance was excellent and I wanted high-quality results. I understood that a premium model would cost more.

However, I consumed 2,711.3 purchased credits in seven days.

My objection is not that premium compute has a premium price. I was willing to pay for Astra.

The problem is that when I authorized individual tasks, I had no intuitive way to know whether I was authorizing approximately $2, $10, or $50 of additional compute.

Tokens and credits are abstractions that make sense as internal accounting measurements, but they do not give most users an intuitive understanding of the financial commitment they are making.

Why this could benefit OpenAI as well as users

This isn't simply a request to reduce prices.

Better cost visibility could actually make users more comfortable intentionally selecting premium models when their capabilities justify the expense.

For example, if a task showed:

Astra: $8–$14

Sol: $3–$6

Terra: $1–$3

I could make an informed decision that an important task is worth spending $8–$14 on Astra.

Without that information, unexpectedly consuming a large credit balance can instead teach the user to avoid the premium model entirely.

Conversely, users may discover that routine work does not justify premium compute and deliberately select a less expensive model, potentially reducing unnecessary high-end compute consumption.

Suggested workflow

Prompt → Cost estimate → Model comparison → User authorization → Execution → Running cost → Reauthorization if necessary → Completion

The underlying token/credit accounting does not need to change.

This proposal is primarily about adding a human-understandable economic layer over the existing accounting system.

Users should not need to understand tokenization, cached input pricing, inference costs, subagent behavior, or model-specific credit rates to answer a much simpler question:

“Approximately how much am I agreeing to spend when I click Run?”

Image Image Image Image Image Image

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

No implementation files, tests, or entry points are identified in the issue. Start by reviewing the existing task execution, model-selection, usage-accounting, and authorization flows in the repository. Done would require an agreed design and implementation for estimation, model comparison, per-task authorization, running cost display, and mid-task reauthorization.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
ai-infra-agents, design, payments
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.