AIToday
Zenn AI/MLPublished: Oct 31, 2026, 06:00 JST

Chained claude -p prompts: same 30/30, 1.55× the cost

Send on LINE
Chained claude -p prompts: same 30/30, 1.55× the cost

3 Key Points

  1. What happened

    Splitting a six-step request into six chained claude -p prompts matched the single-prompt approach at 30/30 on six mechanical checks, but cost 1.55× more (0.55110 USD vs 0.35608 USD) and took 1.85× longer (131,120 ms vs 70,846 ms) across five trials each.

  2. Why it matters

    The measured trade-off is money and time, not output quality—so teams choosing between bundled and stepwise prompting for coding agents should weigh that surcharge against any expected gain, which this test did not show on its six checks.

Not sure about something? Ask the AI

Questions and answers are published on this page.

Summaries like this, every morning.

Context & Analysis

The test isolates one variable: the same six-line step list, byte-identical, sent either as one numbered prompt or as six sequential prompts that carry the conversation forward. Scoring was frozen before any run via hash values, and a reference implementation confirmed all six checks were simultaneously satisfiable. Across five trials per method, neither approach broke the other's prior achievements—the stepwise per-step counts were [2, 3, 3, 4, 5, 6] in all five trials, with zero regressions.

The cost gap traces to conversation re-reading rather than upfront prompt size. The first exchange carried only 1,567.2 more input tokens in the bundled version on average, but each later step in the split version re-read the accumulated history. The author notes this breakdown was only extracted for one trial's six calls, so the link between token-type mix and the 1.55× versus 2.51× multiplier mismatch remains unverified.

A separate finding concerns measurement hygiene: resumed claude -p calls report cumulative cost fields, and summing them produced a spurious 6.3× figure before correction to 1.55×. The author also observed that shell commands were denied in all 35 runs under acceptEdits—45 Bash denials total—so both methods reached 6/6 using file-writing tools alone, without self-verification.

FAQ
Did splitting the task into six steps improve the output?
No. Both the single-prompt and six-step approaches met all six mechanical checks in 5 out of 5 trials, for a 30/30 total each. The author did not compare code quality, readability, or design.
Why did the stepwise approach cost more if the instructions were the same?
The author found the initial input difference was only 1,567.2 tokens on average. The extra cost came from each later step re-reading the prior conversation, adding 259,531 to 335,499 input tokens per trial.
How did the author avoid overcounting the cost of resumed calls?
They found that total_cost_usd and per-model breakdowns are cumulative across a resumed session, so summing six steps overstated cost about 4× (2.24125 USD vs the correct 0.55110 USD). The fix was to read only the final step's cumulative value.
Send on LINE

AI news that matters for your work, delivered every morning.

Pick your industry and the AI tools you use, and get news related to your work every day.

Free · 30 seconds with Google · unsubscribe anytimeWhat is AIToday? →

Ask AI

Ask AI anything about this article. The AI reads this article, earlier AIToday articles, and Wikipedia, and cites its sources. Q&As are published on this page for other readers too.

Questions and answers are published on this page.

Next articleMicrodosing the spirit of Anthropic: inside AI labs' skewed views