iiRecord
Agentic AI Atlas · GAP-TOOLS-028: Sleep/Delay Effect Enhancement
page:docs-harness-features-backlog-gaps-tools-capabilities-gap-tools-028a5c.ai
II.
Page reference

page:docs-harness-features-backlog-gaps-tools-capabilities-gap-tools-028

Reading · 2 min

GAP-TOOLS-028: Sleep/Delay Effect Enhancement reference

Enhance the existing ctx.sleepUntil() effect with richer delay semantics: relative durations, conditional wake (sleep until condition), retry-with-backoff patterns, and integration with the scheduling system. Document current capabilities and gaps.

Pagewiki/docs/harness-features-backlog/gaps/tools-capabilities/GAP-TOOLS-028.mdOutgoing · 0Incoming · 1

GAP-TOOLS-028: Sleep/Delay Effect Enhancement

FieldValue
Categorytools-capabilities
PriorityLow
EffortS
StatusPartial

Description

Enhance the existing ctx.sleepUntil() effect with richer delay semantics: relative durations, conditional wake (sleep until condition), retry-with-backoff patterns, and integration with the scheduling system. Document current capabilities and gaps.

Current State

The ctx.sleepUntil() intrinsic exists as a ProcessContext effect that pauses execution until a specified timestamp. The sleep task kind is registered. Sleep effects go through the journal and replay system. However: only absolute timestamps are supported (no relative durations like "wait 5 minutes"), no conditional wake mechanism, no built-in retry-with-backoff pattern, and no integration with scheduling.

Target State

Extended sleep API: ctx.sleep(duration) for relative delays, ctx.sleepUntil(timestamp) (existing), ctx.waitFor(condition, options) for conditional wake with polling interval and timeout, ctx.retryWithBackoff(task, options) for exponential backoff retry patterns. All variants journal-tracked and replayable.

Dependencies

Key Files

ComponentPath
Process contextpackages/sdk/src/runtime/processContext.ts
Task definitionspackages/sdk/src/tasks/
Replay enginepackages/sdk/src/runtime/replay/

Recommendation

Phase 4 implementation. Add ctx.sleep(duration) as syntactic sugar over ctx.sleepUntil(). Implement ctx.waitFor() as a polling effect. Build ctx.retryWithBackoff() as a composition of task + sleep effects. Low effort since the foundation exists.