Skip to content

v3.10.43 β€” Lookback πŸͺŸ

Choose a tag to compare

@KevRojo KevRojo released this 26 Jul 23:40

πŸͺŸ Lookback β€” keep 2,000 turns, pay for 20.

Long agent sessions bleed tokens: every turn replays the entire history to the model. Lookback splits what the model sees from what you keep.

  • /lookback on (or /lookback 20) β€” only the last N user turns go to the API. Big token savings.
  • /loopback show|search|head|status β€” the full conversation stays saved locally; inspect or search it anytime.
  • Window cuts only on user-turn boundaries β€” an assistant tool_call is never severed from its tool_result.
  • The window is anchored (hysteresis, re-anchor ~every N/4 turns) so the API prefix stays append-only and provider prompt caches keep hitting β€” a naive sliding window busts the cache and costs more than it saves.
  • Native Loopback tool so the agent retrieves hidden history itself instead of asking you.
  • A gold short_memory rides in the system prompt for the essential past.

Off by default. /lookback shows live status and tokens saved this turn.

Three months of this on my own machine: 5.9B tokens through Claude, 98.8% cache hit rate, on a single $20 plan.

pip install --upgrade dulus

Try it and tell me how it feels. πŸ¦…πŸ‡©πŸ‡΄