Fire a Per-Turn Reminder That Clears Itself Instead of Re-Billing Every Later Turn

Drops per-turn harness reminders to the cost of their single live turn instead of re-billing them (and the growing stack behind them) as input on every later turn - a ~40-token nudge kept across ~100 turns falls from ~4,000 re-billed tokens to ~40 (illustrative; scales with reminder size, count, and session length) - while avoiding the full-history cache re-read a top-level system-prompt edit would trigger. Advanced 4 min read

On a long agent loop, per-turn nudges appended as ordinary mid-conversation system messages pile up and re-bill the whole growing stack as input on every subsequent turn; rewriting the top-level system prompt to carry the current nudge is worse, re-processing the entire cached history. Anthropic's turn-scoped system messages fix this: set clear_at:"next_user_message" on a role:"system" message and it renders only until the next user turn, then stays in the array rendering nothing and costing zero input tokens - the model sees only the newest reminder and you stop paying for the stale ones, all without editing history or busting the cache.

๐Ÿ”’ Pro tip ยท Advanced

Unlock this tip โ€” and 125 more

This is one of 126 advanced, fact-checked tactics reserved for Pro. Get the full 148-tip library, a searchable archive, and a new tip every morning. Free for 7 days, then $9/mo.

Prefer to browse? The 22 Beginner tips are free forever.