Agentpause Suspends LLM Agents Before Rate Limits Hit
Maleficent_Pain2722 · reddit · 2026-07-20
The author built agentpause, a scheduler for long-running LLM agents that suspends work before a rate limit is hit and resumes later without losing progress.
- It checks each next call against the provider’s real remaining budget using rate-limit headers plus a safety margin.
- If the step would exceed the budget, it either waits just long enough for refill or checkpoints and exits cleanly.
- On the next run, it resumes from the exact step instead of restarting the whole task.
- For hosted APIs like OpenAI, Anthropic, and Groq, this is a logical warm start: the context is resent, but no work is redone.
- On llama.cpp, the checkpoint can also save/restore the KV cache via /slots save/restore, which makes it a true warm start.
- The author measured a 9k-token Qwen3-8B resume on an M1 Pro: 46.9s for cold re-prefill vs 0.5s for warm restore, about 93x faster.
- An additional experiment showed that blindly truncating context can destroy recall quality, while a cheap summary preserved all planted facts.
The repo is MIT-licensed, dependency-light, and works with providers directly or via LiteLLM; it also plugs into LangGraph in two lines.
Related event: agentpause: Scheduler Pauses Agents Before Rate Limits(2 posts)→
More from coding & agent
- Warp's six non-engineering teams all run on Linear and Claude Code — mon__lim · 2026-09-11
- Is inference latency becoming the biggest bottleneck for production AI agents? — Euphoric_Sea632 · 2026-09-11
- Anthropic researcher: 99% of engineers now run swarms of 300+ self-improving agents — AlishaOutridge · 2026-09-11
- Gergely Orosz: Shipping 10x PRs With AI Agents, Sites Fill With Small Regressions — ducha_aiki · 2026-09-11
- Same Echo Maze prompt, three frontier models: all passed visually but shipped the same hidden bug — eyishazyer · 2026-09-11
- Astra storyboards plus Minimax H3 per-shot generation boost video success rates — Hailuo_AI · 2026-09-11