Skip to content

Commit 89b8a4c

Browse files
mattleibowCopilot
andcommitted
fix: add detach:true requirement to pr-monitor skill
The polling loop was dying because async bash sessions without detach:true are killed on session idle. Added critical note about using detach:true and documented PID-based termination. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 3643c10 commit 89b8a4c

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

.github/skills/pr-monitor/SKILL.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,18 @@ IDs to avoid processing them as new comments (see Security Rules).
9393

9494
## Polling Loop
9595

96+
**CRITICAL: Use `detach: true` for the polling bash session.** The polling loop must
97+
survive session idle timeouts. When launching the loop via the `bash` tool, always use
98+
`mode: "async"` with `detach: true`. Without `detach: true`, the async shell session
99+
will be killed when the agent session goes idle, silently stopping the monitor.
100+
101+
```
102+
bash(command: "...", mode: "async", detach: true, shellId: "pr-poll")
103+
```
104+
105+
Since detached processes cannot be stopped with `stop_bash`, use `kill <PID>` when
106+
you need to terminate the loop. Record the PID from the shell output.
107+
96108
**Use the bundled polling script** at `scripts/poll_comments.sh` in this skill's
97109
directory. The script handles pagination (GitHub API defaults to 30 results — PRs
98110
with many comments will silently miss new ones without `--paginate`), known-ID

0 commit comments

Comments
 (0)