← Reddit

The most expensive prompt I ever sent was two words

Reddit · pyjuunu · July 30, 2026
An author discovered that a two-word prompt triggered 82 tool calls, 33 file edits, and 25 shell commands, costing $6.50—64% of the entire session's cost—yet this expense was obscured when averaging costs across the full workflow. Recognizing that individual expensive prompts disappear into aggregate session statistics, the author created TurnLens, a monitoring tool that displays each prompt's token count, tool calls, model, and cost in real-time during Claude Code or Codex sessions. TurnLens runs in a separate terminal and immediately reveals expensive prompts as they execute rather than after the fact.

Detailed Analysis

A Reddit post detailing the development of TurnLens, a lightweight monitoring tool for Claude Code and Codex sessions, highlights an underappreciated cost dynamic in agentic AI coding workflows. The developer's central discovery was that a single two-word prompt—"Approved, go ahead"—triggered an autonomous chain of 82 tool calls, 33 file edits, 25 shell commands, and two new file creations within one turn, consuming 9.7 million tokens and costing $6.50. That single exchange accounted for 64% of a $10.19 session total spanning 14 prompts, illustrating how cost in agentic coding tools is not evenly distributed across a conversation but concentrated in a small number of high-agency turns where the model executes long, self-directed sequences of actions.

The technical explanation lies in how context accumulates during multi-step tool use: each tool call requires resending the full conversation context to the model, and in this case 9.6 million of the 9.7 million tokens were cache reads. Prompt caching is what kept the cost at $6.50 rather than an estimated $48, underscoring how critical caching mechanisms have become to making iterative, tool-heavy agent workflows economically viable. Without caching, the compounding cost of repeatedly transmitting growing context windows across dozens of sequential tool calls would make such autonomous "approve and continue" workflows prohibitively expensive for many developers.

This matters because existing usage-tracking tools in the Claude Code and Codex ecosystems typically report costs at the session or daily level, averaging expenses in a way that obscures which specific prompts or turns are actually driving spend. A developer approving an open-ended agentic task with minimal oversight has no visibility into the fact that this single approval could unleash dozens of file edits and shell commands, each adding to a rapidly growing token bill, until after the fact. TurnLens addresses this blind spot by running as a companion terminal process that passively reads session files and prints per-turn cost, token count, tool-call count, and model used the moment each turn closes—giving developers real-time visibility into which prompts are actually expensive as they happen, rather than requiring post-hoc analysis.

This development reflects a broader trend in the AI coding tools ecosystem: as agentic systems like Claude Code and OpenAI's Codex gain more autonomy to chain together tool calls, edit files, and run shell commands with minimal human intervention per step, the unit of meaningful cost analysis is shifting from "session" or "day" to "individual agentic turn." This mirrors growing industry-wide attention to token efficiency, prompt caching strategies, and cost observability as agentic coding becomes mainstream. Community-built tools like TurnLens—free, dependency-light, read-only utilities distributed via npx and GitHub—also point to a maturing ecosystem of third-party tooling emerging around Anthropic's and OpenAI's coding agents, driven by practical gaps that the core products themselves have not yet solved. As autonomous coding agents take on increasingly large and open-ended tasks, fine-grained cost transparency will likely become as important as correctness or speed in evaluating whether these tools are sustainable for everyday development use.

Read original article →