Skip to content

Fix polling automation examples to gate agent startup#286

Open
neubig wants to merge 2 commits into
mainfrom
fix-polling-automation-no-work-gate
Open

Fix polling automation examples to gate agent startup#286
neubig wants to merge 2 commits into
mainfrom
fix-polling-automation-no-work-gate

Conversation

@neubig

@neubig neubig commented Jun 2, 2026

Copy link
Copy Markdown
Member
  • A human has tested these changes.

Why

Polling automation examples should not encourage prompt-preset runs that start an agent conversation on every cron tick. Local polling scenarios should perform deterministic API checks first and only create or resume a conversation when there is actionable work.

Summary

  • Update polling-related automation catalog prompts/examples to prefer webhooks where available and require custom polling scripts for local cron fallbacks.
  • Clarify GitHub/Slack monitor docs and READMEs: no matching work means save state, fire callback, and exit without starting a conversation.
  • Fix polling-script and custom-automation callback helpers to fall back to OPENHANDS_API_KEY when AUTOMATION_CALLBACK_API_KEY is not injected, with regression coverage.

Issue

Fixes #296

How to Test

  • uv run python scripts/sync_extensions.py --check
  • uv run pytest -q
  • uv run python -m py_compile skills/github-repo-monitor/scripts/main.py skills/slack-channel-monitor/scripts/main.py
  • JSON-load all files under automations/catalog/*.json

Video/Screenshots

N/A - documentation/template and script-helper changes only.

Notes

This PR was created by an AI agent (OpenHands) on behalf of the user.

sync_extensions.py --check reported the existing non-blocking coverage warning for ./plugins/issue-duplicate-checker not being in any marketplace.

This PR description update was created by an AI agent (OpenHands) on behalf of Graham Neubig.

Co-authored-by: openhands <openhands@all-hands.dev>
Co-authored-by: openhands <openhands@all-hands.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Track PR #286: Fix polling automation examples to gate agent startup

2 participants