Multi-Agent

The Cost Trap of Scheduled Tasks

Having an Agent summarize news every hour sounds simple. But if you reuse the old session, the context grows with every run — after 24 hours your costs explode. One choice can make the monthly bill differ by 10×.

Reuse Session vs. New Session
Reuse Old Session
Run 1Run 12Run 24
$7.20
24h Total Cost
$0.60
Last Run Cost
New Session Each Time
Run 1Run 12Run 24
$0.72
24h Total Cost
$0.03
Cost Per Run
Drag "Days Running" to See the Difference

成本计算器

7
24 times
$50.4
Reuse Session Total Cost
$5.0
New Session Total Cost
10x
Cost Multiplier
Why Reusing Sessions Causes Snowballing Costs

Context Accumulation Process

1
Run 1: context = System Prompt + current conversation ≈ 2,000 tokens
2
Run 2: context = all of Run 1 + current conversation ≈ 4,000 tokens
3
Run 10: context = all of Runs 1–9 + current ≈ 20,000 tokens
4
Run 24: context = all of Runs 1–23 + current ≈ 48,000 tokens. You pay for all those historical tokens on every request!
New session = starting from zero every time. Run 24 costs exactly the same as Run 1, because no historical context is carried. Scheduled tasks don't need memory: just summarizing today's news is enough — there's no need to know what was summarized yesterday.
For scheduled tasks, always create a new session — never reuse the old one. This single choice can make the monthly bill differ by 10×. Most scheduled tasks don't need context memory; new sessions are both cheaper and more stable.