long-poll-wait
Skill5 starsChanged 2 months agoMITView on GitHub
Monitor an external process, CI run, or cloud job until an authoritative terminal result or explicit handoff. Excludes native Codex children and app tasks.
In this repository10 other files it gives its agents.
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 2 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 30
Read continuation and handoff when monitoring must transfer to another context, scheduling is needed, or an optional observer role is being …
- Distinctive: line 38
Stop observing at a terminal result, explicit stop, requested observation deadline, irreparable observation failure, or declared …
≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Long poll wait
Observe one external operation through its stable identity and authoritative status source. Use patient waiting for native children and the app's event-wait tool for Codex tasks or threads.
Bind the observation
Record the operation ID, source and handle, latest state and timestamp, success/failure conditions, relevant artifacts, and any real stop deadline. Bind handles to the originating tool, host, and operation; IDs from different layers are not interchangeable.
Reuse a verified existing observation. When choosing or recovering a path, use the first currently callable, configured, authorized option:
- A source-native event, watch, stream, or subscription.
- The exact existing process or terminal session's wait/resume tool.
- The authoritative pull endpoint.
Documentation alone does not make a path available. Do not restart the underlying job or create a duplicate monitor to recover observation.
Continue until the outcome is known
Continue in the active turn by default. Keep operation duration, tool blocking limits, user-update cadence, and provider pull timing separate. Use the longest supported wait that preserves host responsiveness and respects the next real decision or resource boundary. Yield and resume the same observation when needed.
Record material progress on wake and give decision-relevant updates. A local wake or user update does not authorize an extra provider pull. For pull-only sources, honor Retry-After and provider guidance; otherwise back off unchanged state and add jitter when monitors could synchronize. Preserve the next eligible observation time and reset backoff only after material progress.
On expiry, context change, observation loss, or parent intervention, revalidate the operation and handle. Reacquire or select another authorized path for the same operation. If none is usable, report an observation blocker with the last verified state; this does not establish job failure.
Read continuation and handoff when monitoring must transfer to another context, scheduling is needed, or an optional observer role is being configured. Do not assume live streams or process handles survive that transfer. Schedule only after verifying receiving-context capability, authorization, and sufficient durable state.
Respect the observer boundary
The observer does not restart, cancel, remediate, or modify the operation. Return intervention-required with the evidence and proposed action to the parent, which retains decision and execution authority.
Quiet periods are normal. A stall claim needs sustained lack of progress supported by independent signals, such as status and log movement. Repeated reads of one status are not independent evidence.
Stop observing at a terminal result, explicit stop, requested observation deadline, irreparable observation failure, or declared nonterminal handoff. Ending observation does not cancel the job. Report observation-stopped for a stop or deadline before termination, or needs-scheduled-handoff when required continuity cannot be established.
Report and retire the monitor
Report the outcome, operation ID, authoritative evidence, final timestamp, and material uncertainty. For nonterminal handoffs, preserve the handle, host/tool requirements, expiry and reacquisition method, provider timing, next observation time, and stop conditions using the handoff reference.
Job completion and monitor retirement are separate. Preserve remaining monitoring-continuation identities so the parent can retire exact owned continuations within existing authority. Report any unverified retirement as a residual blocker. Do not claim success from elapsed time, log silence, monitor exit, or a nonterminal status.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

