Yield On Wait
Do not spend agent time watching a spinner. If the only remaining action is a
long wait, checkpoint the wait and move to other useful work.
A yield parks the current stage; it never completes the parent task. Retain the
existing continuation and owner so the parent delivery and cleanup obligations
stay tracked. See process-aware-done for the done standard and
ephemeral-workspace-lifecycle for the cleanup disposition.
Trigger
Use this skill when a wait is likely to exceed about two minutes:
- CI checks or release workflows
- image builds or package publishes
- infrastructure plan, apply, sync, or provisioning
- certificate, DNS, or load-balancer readiness
- runner pickup or job queue latency
- delegated work in another lane
- any process where the next action depends on an external status change
Checkpoint
Before switching away, write a durable checkpoint with:
- awaited artifact: PR, run, job, deploy, ticket, process ID, or URL
- where to check it
- current evidence and last known status
- resume condition for success
- failure condition and first diagnostic step
- exact next action after success or failure
- the existing item or continuation and owner responsible for the remainder
- owner and deadline if the wait can stall indefinitely
The checkpoint is the working memory. It must be specific enough that another
agent can resume without the original conversation.
Wait Identity
Prefer the existing native wait or push mechanism. Bind observation to the
producer's task, run, or job handle. When only process observation is available,
record the producer's PID and start time, including its wrapper/child relation
when relevant. A substring search can match the observer itself or miss a
wrapped producer; distinguish the watcher from the work it watches.
An observation timeout or watcher exit does not prove producer termination and
does not authorize a restart. Verify the producer's terminal result or actual
termination, then check the resulting artifact before advancing dependent work.
If the result remains unknown, preserve the existing run and checkpoint the
uncertainty instead of launching a duplicate or adding a polling service.
Yield
- For short waits, use a bounded in-turn poll.
- For longer waits, mark the current stage waiting using the existing queue or
continuation convention, with completed evidence and the checkpoint.
- Reuse the existing continuation and owner. Name the tail link or ID in the
current item before switching away when an existing tail owns the wait;
otherwise retain the checkpoint and owner in the current item. Create a
separate continuation only when needed by that queue's convention, not a new
issue or controller for every wait. Keep unmet parent work open.
- Switch to the next queued or unblocked work item.
- Prefer work that is independent of the parked wait.
- At natural boundaries, check parked waits through their existing handles.
- If a parked wait becomes the only remaining work, yield through its existing
continuation or native wait; retain the parent until its criteria are met.
Checkpoint As Queue Item
When a queue exists, the durable queue item is usually a better carrier than
the current turn's memory. Use this shape:
- update the existing item with evidence completed so far and waiting status
- retain its owner and priority, or use its existing continuation
- include the exact artifact link or ID, check command, success condition,
failure condition, and next action
- let the assigned worker resume from the checkpoint without the original thread
This prevents a wait from becoming "work in progress" that survives only in a
single process or conversation.
Resume
When the wait completes:
- read the checkpoint first
- verify the real artifact, not only the status label
- continue the recorded success or failure path
- update the checkpoint or close it with trajectory evidence
Anti-Patterns
- watching CI or deploy logs for long stretches without doing other work
- switching away without a checkpoint
- checkpointing only "waiting on CI" with no run link, resume condition, or
next action
- leaving parked waits without a stall alarm or bounded follow-up
- parking a wait and calling the parent delivery done with unmet criteria
- creating duplicate continuations, workers, or controllers for the same wait
- treating watcher exit or an observation timeout as the producer's completion
- treating green CI as a product or deploy verification when the user asked for
a real artifact
Done Standard
A checkpoint makes a wait resumable; it does not complete the awaited work.
Complete that work only after its terminal result and real artifact have been
verified. The parent delivery stays open until its own artifact and cleanup
receipts exist and its acceptance criteria are met.
1---2name: yield-on-wait3description: Use when CI, deploys, image builds, infrastructure applies, certificates, queues, or other long-running waits would otherwise stall an agent. Requires a durable checkpoint before switching work.4metadata:5 source: https://skillmd.com/skills/selamy-labs/yield-on-wait6---78# Yield On Wait910Do not spend agent time watching a spinner. If the only remaining action is a11long wait, checkpoint the wait and move to other useful work.1213A yield parks the current stage; it never completes the parent task. Retain the14existing continuation and owner so the parent delivery and cleanup obligations15stay tracked. See `process-aware-done` for the done standard and16`ephemeral-workspace-lifecycle` for the cleanup disposition.1718## Trigger1920Use this skill when a wait is likely to exceed about two minutes:2122- CI checks or release workflows23- image builds or package publishes24- infrastructure plan, apply, sync, or provisioning25- certificate, DNS, or load-balancer readiness26- runner pickup or job queue latency27- delegated work in another lane28- any process where the next action depends on an external status change2930## Checkpoint3132Before switching away, write a durable checkpoint with:3334- awaited artifact: PR, run, job, deploy, ticket, process ID, or URL35- where to check it36- current evidence and last known status37- resume condition for success38- failure condition and first diagnostic step39- exact next action after success or failure40- the existing item or continuation and owner responsible for the remainder41- owner and deadline if the wait can stall indefinitely4243The checkpoint is the working memory. It must be specific enough that another44agent can resume without the original conversation.4546## Wait Identity4748Prefer the existing native wait or push mechanism. Bind observation to the49producer's task, run, or job handle. When only process observation is available,50record the producer's PID and start time, including its wrapper/child relation51when relevant. A substring search can match the observer itself or miss a52wrapped producer; distinguish the watcher from the work it watches.5354An observation timeout or watcher exit does not prove producer termination and55does not authorize a restart. Verify the producer's terminal result or actual56termination, then check the resulting artifact before advancing dependent work.57If the result remains unknown, preserve the existing run and checkpoint the58uncertainty instead of launching a duplicate or adding a polling service.5960## Yield6162- For short waits, use a bounded in-turn poll.63- For longer waits, mark the current stage waiting using the existing queue or64 continuation convention, with completed evidence and the checkpoint.65- Reuse the existing continuation and owner. Name the tail link or ID in the66 current item before switching away when an existing tail owns the wait;67 otherwise retain the checkpoint and owner in the current item. Create a68 separate continuation only when needed by that queue's convention, not a new69 issue or controller for every wait. Keep unmet parent work open.70- Switch to the next queued or unblocked work item.71- Prefer work that is independent of the parked wait.72- At natural boundaries, check parked waits through their existing handles.73- If a parked wait becomes the only remaining work, yield through its existing74 continuation or native wait; retain the parent until its criteria are met.7576## Checkpoint As Queue Item7778When a queue exists, the durable queue item is usually a better carrier than79the current turn's memory. Use this shape:8081- update the existing item with evidence completed so far and waiting status82- retain its owner and priority, or use its existing continuation83- include the exact artifact link or ID, check command, success condition,84 failure condition, and next action85- let the assigned worker resume from the checkpoint without the original thread8687This prevents a wait from becoming "work in progress" that survives only in a88single process or conversation.8990## Resume9192When the wait completes:9394- read the checkpoint first95- verify the real artifact, not only the status label96- continue the recorded success or failure path97- update the checkpoint or close it with trajectory evidence9899## Anti-Patterns100101- watching CI or deploy logs for long stretches without doing other work102- switching away without a checkpoint103- checkpointing only "waiting on CI" with no run link, resume condition, or104 next action105- leaving parked waits without a stall alarm or bounded follow-up106- parking a wait and calling the parent delivery done with unmet criteria107- creating duplicate continuations, workers, or controllers for the same wait108- treating watcher exit or an observation timeout as the producer's completion109- treating green CI as a product or deploy verification when the user asked for110 a real artifact111112## Done Standard113114A checkpoint makes a wait resumable; it does not complete the awaited work.115Complete that work only after its terminal result and real artifact have been116verified. The parent delivery stays open until its own artifact and cleanup117receipts exist and its acceptance criteria are met.