con un clic
background-watch-hook
// Use `vibe watch` to run a managed Harness waiter that returns to the same conversation later. Best for reviews, CI, files, logs, and other wait-now-continue-later workflows.
// Use `vibe watch` to run a managed Harness waiter that returns to the same conversation later. Best for reviews, CI, files, logs, and other wait-now-continue-later workflows.
Safely inspect and modify local Vibe Remote configuration, routing, runtime settings, watches, scheduled tasks, Vibe Cloud remote access, and operational state.
Use the official Sentry CLI to investigate issues, events, traces, and logs for Vibe Remote without committing Sentry credentials into the repository.
| name | background-watch-hook |
| slug | background-watch-hook |
| description | Use `vibe watch` to run a managed Harness waiter that returns to the same conversation later. Best for reviews, CI, files, logs, and other wait-now-continue-later workflows. |
| version | 0.7.0 |
Use this skill when the job is "wait now, continue later in the same conversation".
What it gives the agent:
Good trigger scenarios:
Prefer vibe watch when the wait should be inspectable, pausable, resumable, or removable later.
vibe watch add
Main entrypoint. Starts a managed background watch and creates a follow-up Agent Run after the waiter succeeds or reaches a terminal failure.vibe watch list, vibe watch show, vibe watch update, vibe watch pause, vibe watch resume, vibe watch remove
Use these to inspect and manage the watch after creation.scripts/wait_pr.py
Bundled waiter example for one common case: GitHub PR review activity.vibe watch FirstUse vibe watch add first. Most tasks only need:
Generic shape:
vibe watch add \
--session-id "<session-id>" \
--message "<what the next Agent Run should do>" \
--name "<optional label>" \
-- \
<waiter command ...>
Default behavior:
Use --forever when the same waiter should re-arm after each detected event instead of exiting after one follow-up.
vibe watch Parameters To Remember--session-id: which Agent Session the follow-up should continue--message: the instruction template for the follow-up Agent Run created from waiter output--prefix: legacy alias for older watch instructions; prefer --message in new watches--name: optional label for later management--forever: re-arm after each detected event--timeout: per-cycle timeout--lifetime-timeout: whole-watch lifetime cap, mainly for forever watchesManagement commands:
vibe watch listvibe watch show <watch-id>vibe watch update <watch-id> --name '...'vibe watch pause <watch-id>vibe watch resume <watch-id>vibe watch remove <watch-id> hides the watch while keeping prior run historyWrite waiters to follow this contract:
exit 0: event detected; final summary printed to stdoutexit 124: timeout; still send a timeout follow-upKeep the output split clean:
stdout: final summary for the next turnstderr: polling logs and diagnosticsDelay:
vibe watch add \
--session-id "sesk8m4q2p7x" \
--name "Delay callback" \
--message "The delayed check completed. Continue from the result below." \
-- \
bash -lc 'sleep 120; echo "Timer finished after 120 seconds."'
File appears:
vibe watch add \
--session-id "sesk8m4q2p7x" \
--name "Wait for export file" \
--message "The export file is ready. Inspect it and continue." \
-- \
bash -lc 'while [ ! -f /tmp/export.json ]; do sleep 10; done; echo "Detected /tmp/export.json"'
Log match:
vibe watch add \
--session-id "sesk8m4q2p7x" \
--name "Watch app log" \
--message "The expected log pattern appeared. Inspect the event and continue." \
--forever \
-- \
bash -lc 'tail -Fn0 /tmp/app.log | while read -r line; do case "$line" in *READY*) echo "$line"; break;; esac; done'
Use the current Vibe Remote context:
--session-id controls which Agent Session Vibe Remote will continue using--post-to channel only when the follow-up should keep the same Agent Session but publish in the parent channelFor vibe watch add:
--timeout is the waiter timeout for one cycle21600 seconds0 means no per-cycle timeout--forever means re-arm after each detected event--retry-exit-code; other failures stop the watch and send a failure follow-up--lifetime-timeout limits the whole long-running watch; default is 0 meaning run until killedThis separation matters: a forever watch can still use a bounded timeout for each cycle.
This skill ships bundled GitHub waiters:
scripts/wait_pr.py
Waits for GitHub PR review activity, including reviews, inline review comments, PR conversation comments, PR status transitions such as draft -> open, open -> merged, or open -> closed, and the special Codex +1 reaction on the PR body. It can also wait for newly opened PRs in a repository.scripts/wait_issue.py
Waits for GitHub issue activity, either newly opened issues in a repository or new comments on a single issue.scripts/wait_action.py
Waits for selected GitHub Actions workflow runs on a specific commit SHA to finish. Workflow failures are reported as an event so the follow-up turn can inspect and handle them.Use bundled waiters as examples or as ready-to-run building blocks. The main skill is still vibe watch; the waiter is only the thing that blocks until the condition is met.
When running a bundled script through uv, prefer uv run --no-project ... so the script does not accidentally attach itself to an unrelated parent project.
Bundled GitHub waiters use exit code 75 for retryable startup errors such as temporary network failures or GitHub 408/429/5xx responses.
Use the bundled GitHub waiter only when the watched thing is PR review activity.
One-shot watch:
vibe watch add \
--session-id "sesk8m4q2p7x" \
--name "Watch PR 151 reviews" \
--message "PR #151 has new review activity. Fetch the latest review state, summarize actionable items, and continue handling them if needed." \
-- \
uv run --no-project scripts/wait_pr.py \
--repo cyhhao/vibe-remote \
--pr 151 \
--interval 60
Catch up on existing activity first:
vibe watch add \
--session-id "sesk8m4q2p7x" \
--name "Catch up PR 151 reviews" \
--message "PR #151 already has review activity. Fetch the latest review state and continue handling it if needed." \
-- \
uv run --no-project scripts/wait_pr.py \
--repo cyhhao/vibe-remote \
--pr 151 \
--catch-up
Stay armed for future activity:
vibe watch add \
--session-id "sesk8m4q2p7x" \
--name "Monitor PR 151 reviews" \
--forever \
--timeout 21600 \
--lifetime-timeout 86400 \
--message "PR #151 has new review activity. Fetch the latest review state, summarize actionable items, and continue handling them if needed." \
-- \
uv run --no-project scripts/wait_pr.py \
--repo cyhhao/vibe-remote \
--pr 151 \
--interval 60
GitHub-specific notes:
--catch-up reports activity that already exists at startup--catch-up, the waiter snapshots current PR activity as the baselinechatgpt-codex-connector[bot] leaves a +1 reaction on the PR body instead of posting a comment--include-self-comments to keep themNew PRs in a repository:
vibe watch add \
--session-id "sesk8m4q2p7x" \
--name "Watch new PRs" \
--message "The repository has new pull requests. Review the new PRs and continue as needed." \
-- \
uv run --no-project scripts/wait_pr.py \
--repo cyhhao/vibe-remote \
--new-prs \
--interval 60
New issues or issue comments:
uv run --no-project scripts/wait_issue.py --repo cyhhao/vibe-remote --new-issues --interval 60
uv run --no-project scripts/wait_issue.py --repo cyhhao/vibe-remote --issue 157 --interval 60
GitHub Actions for a pushed commit:
vibe watch add \
--session-id "sesk8m4q2p7x" \
--name "Watch CI" \
--message "GitHub Actions finished. Inspect the result below and continue with the deployment or fix failures." \
-- \
uv run --no-project scripts/wait_action.py \
--repo cyhhao/sub2api \
--branch main \
--sha "$HEAD_SHA" \
--workflow CI \
--workflow "Security Scan" \
--interval 60
vibe watch add, read vibe watch add --help first; the help text explains both argument syntax and runtime behavior such as how --message and waiter stdout become the follow-up Agent Run input.vibe watch over ad-hoc detached shells when the wait should survive the current turn cleanly.