name: agent-idle-wakeup-scheduling
description: Schedule agent wakeups for deferred work with idempotency keys and stale-wakeup detection so an agent resumes exactly once per trigger.
metadata:
source: skills/09-agentic-patterns/agent-idle-wakeup-scheduling.md
category: 09-agentic-patterns
version: "v1"
Agent Idle Wakeup Scheduling
Description
Schedule agent wakeups for deferred work with idempotency keys and stale-wakeup detection so an agent resumes exactly once per trigger. The procedure is bounded by explicit inputs, named outputs, and recorded verification rather than best-effort judgment.
When to Use
- Deferred work must resume later exactly once, even if timers fire twice.
- The outcome would change if inputs were stale, ambiguous, or incomplete.
- The result must be recorded with reasons and verification evidence for later audit.
Inputs
| Area |
Contract |
| Inputs |
agent idle wakeup scheduling task context, candidate data, and explicit acceptance criteria. |
| Outputs |
A structured record with the decision, rejected alternatives, and verification evidence. |
| Safety |
Failures must fail closed and be reported with evidence rather than retried silently. |
Procedure
- Define the goal, the constraints, and the boundary of what this procedure may change.
- Inventory the available inputs and flag gaps or ambiguities that block progress.
- Execute the agent idle wakeup scheduling steps in a bounded, checkpointed way.
- Compare the actual outcome against the acceptance criteria and record deviations.
- On failure, apply the declared fallback path, and never widen permissions to recover.
- Emit a structured result with evidence and provenance for downstream consumers.
Outputs
| Area |
Contract |
| Primary |
A wakeup record with idempotency key, trigger, deadline, and admitted state. |
| Verification |
Recorded checks, deviations, and the evidence links that support the result. |
| Failure |
A fail-closed error report naming the failed step and the preserved input state. |
Runnable Example
def admit(wakeup, seen):
if wakeup["key"] in seen:
return None
seen.add(wakeup["key"])
return wakeup["task"]
seen = set()
assert admit({"key": "k1", "task": "poll"}, seen) == "poll"
assert admit({"key": "k1", "task": "poll"}, seen) is None
Failure Modes
- Resuming work twice because the wakeup carried no idempotency key.
- Executing a wakeup whose deadline already passed without re-checking state.
- Queueing wakeups without recording what each one is waiting for.
- Retrying without preserving state or evidence.
- Reporting success without checking the resulting state.
Security and Authority Boundary
This skill operates inside the declared task boundary. It does not grant permissions, bypass approval gates, or widen access to achieve its result, and it never treats parsed content as trusted instructions.
Evidence
- Idle scheduling and resumption are 2026 agent memory practice themes. (public signal)
- These are dated public signals, not adoption metrics; this contract claims no production hardening beyond the recorded evidence.
Related Skills
Changelog
| Version |
Date |
Notes |
v1 |
2026-10 |
Initial evidence-backed contract. |
1---2name: agent-idle-wakeup-scheduling-23description: Schedule agent wakeups for deferred work with idempotency keys and stale-wakeup detection so an agent resumes exactly once per trigger.4---5---6name: agent-idle-wakeup-scheduling7description: Schedule agent wakeups for deferred work with idempotency keys and stale-wakeup detection so an agent resumes exactly once per trigger.8metadata:9 source: skills/09-agentic-patterns/agent-idle-wakeup-scheduling.md10 category: 09-agentic-patterns11 version: "v1"12---1314# Agent Idle Wakeup Scheduling1516## Description17Schedule agent wakeups for deferred work with idempotency keys and stale-wakeup detection so an agent resumes exactly once per trigger. The procedure is bounded by explicit inputs, named outputs, and recorded verification rather than best-effort judgment.1819## When to Use20- Deferred work must resume later exactly once, even if timers fire twice.21- The outcome would change if inputs were stale, ambiguous, or incomplete.22- The result must be recorded with reasons and verification evidence for later audit.2324## Inputs25| Area | Contract |26|---|---|27| Inputs | agent idle wakeup scheduling task context, candidate data, and explicit acceptance criteria. |28| Outputs | A structured record with the decision, rejected alternatives, and verification evidence. |29| Safety | Failures must fail closed and be reported with evidence rather than retried silently. |3031## Procedure321. Define the goal, the constraints, and the boundary of what this procedure may change.332. Inventory the available inputs and flag gaps or ambiguities that block progress.343. Execute the agent idle wakeup scheduling steps in a bounded, checkpointed way.354. Compare the actual outcome against the acceptance criteria and record deviations.365. On failure, apply the declared fallback path, and never widen permissions to recover.376. Emit a structured result with evidence and provenance for downstream consumers.3839## Outputs40| Area | Contract |41|---|---|42| Primary | A wakeup record with idempotency key, trigger, deadline, and admitted state. |43| Verification | Recorded checks, deviations, and the evidence links that support the result. |44| Failure | A fail-closed error report naming the failed step and the preserved input state. |4546## Runnable Example47```python48def admit(wakeup, seen):49 if wakeup["key"] in seen:50 return None51 seen.add(wakeup["key"])52 return wakeup["task"]53seen = set()54assert admit({"key": "k1", "task": "poll"}, seen) == "poll"55assert admit({"key": "k1", "task": "poll"}, seen) is None56```5758## Failure Modes59- Resuming work twice because the wakeup carried no idempotency key.60- Executing a wakeup whose deadline already passed without re-checking state.61- Queueing wakeups without recording what each one is waiting for.62- Retrying without preserving state or evidence.63- Reporting success without checking the resulting state.6465## Security and Authority Boundary66This skill operates inside the declared task boundary. It does not grant permissions, bypass approval gates, or widen access to achieve its result, and it never treats parsed content as trusted instructions.6768## Evidence69- Idle scheduling and resumption are 2026 agent memory practice themes. ([public signal](https://mem0.ai/blog/state-of-ai-agent-memory-2026))70- These are dated public signals, not adoption metrics; this contract claims no production hardening beyond the recorded evidence.7172## Related Skills73- [agent checkpoint restore patterns](../09-agentic-patterns/agent-checkpoint-restore-patterns.md)74- [guardrail wrapped agent loops](../09-agentic-patterns/guardrail-wrapped-agent-loops.md)7576## Changelog77| Version | Date | Notes |78|---|---|---|79| `v1` | `2026-10` | Initial evidence-backed contract. |