effect-uai-pause-resume

Pause and resume an in-flight agent loop using Latch primitives.

30|4|Updated Apr 26, 2026
One-click install
npx skills add https://github.com/betalyra/effect-uai --skill effect-uai-pause-resume
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: effect-uai-pause-resume
Source: https://github.com/betalyra/effect-uai/tree/main/skills/effect-uai-pause-resume
Command: npx skills add https://github.com/betalyra/effect-uai --skill effect-uai-pause-resume

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Soft pause-resume of an in-flight agent loop using Latch. The body waits on the latch before each iteration; closing it pauses the loop (no new streamTurn is initiated, no HTTP connection held), opening it resumes. State threads through the loop naturally, so resume picks up exactly where pause left off — no checkpoint to write.

Core Features & Use Cases

  • Soft pause and resume for fine-grained control over the agent lifecycle between turns.
  • Works for rate-limit cooldowns, manual UI pauses, and scheduled gating.
  • Maintains state continuity so you resume exactly where paused.

Quick Start

Pause the agent loop between turns and resume automatically when the latch is opened.

Frequently Asked Questions about effect-uai-pause-resume

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I pause an agent loop without holding open HTTP connections?

To pause an agent loop without holding provider calls, use a latch to block streamTurn initiation before each iteration. Closing the latch stops new HTTP connections from being held during the pause. Opening the latch resumes the body.

How does state threading work when resuming a paused agent loop?

State threads through the loop naturally, so resume returns to the exact point of pause. No checkpoint needs to be written because state continuity is maintained internally within the loop body.

Can I use a soft pause and resume mechanism for rate-limit cooldowns?

Yes, soft pause and resume is applicable for rate-limit cooldowns, manual UI pauses, and scheduled gating. The latch gates the loop iteration based on your specific timing requirements without dropping state.

Do I need the Effect library to implement agent loop pausing?

Yes, implementing this soft pause-resume requires the Effect library, Latch primitives, and core loop utilities. These dependencies provide the concurrency structures needed to gate the loop body iterations.

What is the best way to gate an in-flight agent loop between turns?

Using a latch primitive is the best way to gate an in-flight agent loop between turns. The loop body waits on the latch before each iteration, providing fine-grained lifecycle control without losing state.