Skip to content
Guides/Cost

Token-rich vs Token-poor Loops in Loop Engineering

Short answer

Token-rich loops pass large context into every iteration. Token-poor loops pass summaries, retrieved memory, or scoped observations to reduce cost.

Why it matters

Context is multiplied by every iteration and every run. A loop that re-sends a huge prompt each turn is easy to build but expensive and more likely to hit context limits; a token-poor loop is cheaper and faster but needs real memory and state management.

Practical checklist

  • Estimate input tokens per iteration before scheduling
  • Decide what to keep, summarize, retrieve, and forget
  • Pass only the observations relevant to the next action
  • Re-estimate cost when iterations or runs/day increase

Example

Instead of re-sending an entire repository each iteration, a token-poor loop passes a summary of the last error and the few files involved — cutting input tokens from 80k to 8k per turn.

Common failure modes

Re-sending full context every iteration
No summary or retrieval strategy
Cost grows silently as runs/day increase

Related templates

Sources & further reading