Back to Writing
4 min read

Token Discipline: Spend AI Tokens on Work, Not Narration

AI Agents Cost Optimization Engineering

The quiet cost in agentic workflows is not always tool use. It is narration.

As teams move more work to frontier models, output discipline starts to matter as much as prompt construction. In a demo, a verbose answer is harmless. In production, repeated summaries, pasted logs, and routine status updates become part of the bill every time the agent runs.

The waste looks small per turn. At scale, it becomes budget.

Output token cost comparison

The Price Ladder

Current standard output-token pricing per 1M tokens shows how quickly the cost grows as teams move toward stronger models:

ProviderLower-cost tierMid tierFrontier tier
OpenAIGPT-5.4 mini: $4.50GPT-5.4: $15GPT-5.5: $30
AnthropicClaude Haiku 4.5: $5Claude Sonnet 4.6: $15Claude Opus 4.7: $25
GoogleGemini 3.1 Flash-Lite: $1.50Gemini 3.1 Flash: $2.50Gemini 3.1 Pro: $12-$18

Benchmark: Geometric Average Reduction

To measure the impact of token discipline, I ran three engineering tasks through a standard assistant prompt and the same prompt with added token-discipline rules. The first baseline used Gemini CLI (Gemini 3 Pro); I then repeated the pattern with Codex CLI and GPT-5.4 Mini.

CLI & ModelTask / ConfigurationStandard TokensDisciplined TokensReduction
Gemini CLI (Gemini 3 Pro)1. Python Scripting6836416.1%
Gemini CLI (Gemini 3 Pro)2. Go HTTP Server1,12665741.7%
Gemini CLI (Gemini 3 Pro)3. Documentation (SRP)2,35289861.8%
Codex CLI (GPT-5.4 Mini)Python Scripting (Low Effort)1,8491,55216.1%
Codex CLI (GPT-5.4 Mini)Python Scripting (Mid Effort)2,3571,63430.7%
Codex CLI (GPT-5.4 Mini)Python Scripting (High Effort)1,7841,55213.0%
Codex CLI (GPT-5.4 Mini)Python Scripting (xHigh Effort)1,8192,285-25.6%
Codex CLI (GPT-5.4 Mini)Go HTTP Server (Low Effort)2,3242,1059.4%
Codex CLI (GPT-5.4 Mini)Go HTTP Server (Mid Effort)2,3751,47937.7%
Codex CLI (GPT-5.4 Mini)Go HTTP Server (High Effort)3,3352,51424.6%
Codex CLI (GPT-5.4 Mini)Go HTTP Server (xHigh Effort)2,6421,95725.9%
Codex CLI (GPT-5.4 Mini)Documentation (SRP) (Low Effort)1,7812,278-27.9%
Codex CLI (GPT-5.4 Mini)Documentation (SRP) (Mid Effort)1,9811,78210.0%
Codex CLI (GPT-5.4 Mini)Documentation (SRP) (High Effort)2,2472,1285.3%
Codex CLI (GPT-5.4 Mini)Documentation (SRP) (xHigh Effort)2,3451,53534.5%

Token Discipline Output Cost Graph

Methodology: Token counts came from the CLI session logs. I use a geometric average because the tasks vary in size.

How to Reproduce

I published the benchmark harness and raw results in a public Gist. To see how the comparison was run (using the Python Scripting task as an example):

  1. Clone the Harness:
    git clone https://gist.github.com/omar391/bc15f0cbeaa7453d1c3d3958e736264f token-bench
    cd token-bench
  2. Run the Test:
    ./run_real_bench.sh
  3. Audit the Logs: The script parses the session files to report exact token counts.

In the standard-agent runs, cutting narration reduced output without changing task success. A geometric average of 40.6% reduction is roughly a 1.68x capacity multiplier on the same output-token budget.

The Reasoning Trap & Prompt Breeding

The Codex CLI run with gpt-5.4-mini exposed a separate issue. The older token-discipline rules cut visible tool and text output by more than 56%, but strict negative constraints (“no user-facing prose”, “avoid mid-task updates”) increased internal Reasoning Tokens.

At xHigh reasoning effort, total token usage increased by 44.6%.

To find a universal prompt that works across both standard and reasoning models without confusing them, I ran a “prompt breeding” experiment. I tested several framing strategies on xHigh effort:

  1. Baseline Standard: 2,271 Tokens
  2. Current Negative (“no user-facing prose”): 1,629 Tokens (28.3% reduction)
  3. Positive Framing (“Directly execute required tool calls…”): 1,464 Tokens (35.5% reduction)
  4. Minimal Framing (“Use tools immediately. Do not explain your steps.”): 1,299 Tokens (42.8% reduction)

The best result was Minimal Framing. A short positive instruction plus one direct negative constraint produced a 42.8% reduction on the maximum effort setting.

The broader lesson is not tied to one CLI: ask agents to work directly, and make status text earn its place. Brevity is not the goal; useful output is.

Technical Implementation: The Universal Rule

I updated my AGENTS.md file to enforce this new universal behavior:

## Token Discipline

- Use tools immediately.
- Do not explain your steps.

Why It Saves Tokens

Most of the savings come from cutting output that does not change the outcome:

  1. Eliminating Narration: Routine progress updates (“I am now reading file X…”) are removed in favor of direct tool calls.
  2. Log Suppression: Logs are only surfaced on failure or explicit request, keeping the context window clean for long-running tasks.
  3. Context Recycling: Avoiding repetition of the user’s original request or previous turn summaries.

If an agent avoids 1M unnecessary output tokens, the savings can be roughly $30 on GPT-5.5, $25 on Claude Opus 4.7, or $12-$18 on Gemini 3.1 Pro.

Less narration. More execution.

Sources:

Thanks for reading. If you found this useful, feel free to DM me on X/LinkedIn.