You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
source-control:pull-request monitor: the inline Monitor poll script is refused by Claude Code's removal safety check #16353
/source-control:pull-request monitor arms its watch by passing the provider reference's REST poll script inline as the Monitor tool's command (monitor.md 3.0.1). In an auto-mode session on Claude Code the call was denied by the built-in check that guards recursive deletes:
What was flagged: This command passes a shell -c script that runs rm, and Claude Code could not check the script for dangerous removals.
The script contains no rm; it uses mv for the snapshot file. Why the check reads it as a removal is UNVERIFIED. The denial is not retried (a denied action is reported, not reshaped), so the session has no watch that reports comments and review-thread changes, only checks.
Evidence
One session, source-control plugin 11.14.4, first arming call with no BASELINE_FILE. Not re-tried, so a second sign is missing.
Workaround used
One background command of gh run watch <id> -i 60 per run, then a single read of comments and threads when the runs finish.
Options
Ship the poll script as a file under the skill's scripts/ and pass bash <path> to Monitor, so no long inline script reaches the check.
Drop the mv-based snapshot write from the inline form.
Done when
A monitor <n> run in an auto-mode session arms its watch without a safety-check denial, shown by a behavior probe or a recorded session.
Size: Medium
Complexity: Low
Uncertainty: Knowable
Flags: none
Blocked by: none
Blast radius: the source-control pull-request skill's monitor reference, its provider reference, and a new poll script with its test; read by anyone running /source-control:pull-request monitor.
Reversible: yes; revert the change and the inline script returns.
Open questions: none
Understood: the inline poll script passed to Monitor is refused by Claude Code's removal safety check in auto mode, so the watch never arms. The report proposes moving the script to a file.
Decision comment, quoted:
Decision recorded. The acceptance checklist below adopts intake's recommended answers to the refinement's four questions, under the owner's answer to the batch question for issues with only implementation questions.
The answers adopted are the RECOMMENDED lines of the refinement:
Move the poll script to a file, scripts/monitor-poll.sh under the pull-request skill, and pass bash <path> to Monitor.
The criteria are file-based; the live auto-mode arming probe is a check a person runs after merge, so it is not a criterion below.
Ship the file form without first isolating the flagged construct; the post-merge probe result is recorded on this issue, and a follow-up isolates the construct if the call is still denied.
The script takes its settings as environment variables or flags on the bash <path> command, with the triangular-flow override as an explicit base-repository argument.
[quote truncated; the full decision is at the link]
This decision settles the open questions. The live auto-mode probe is a post-merge check by a person, not a criterion. No duplicate or merged fix was found.
Not admitted to the issue lane yet: no trusted-human acceptance criteria: a listed human must put the confirmed - [ ] criteria in the body or post them as their own comment, or, on an issue a listed human filed, intake's newest refinement comment must hold them unedited; intake's refinement of this body is due and may supply them.
melodic-automation-lanes commented on Nov 15, 2026
Refinement. A read-only run explored this repository, searched its issues and pull requests, and read the allowed docs to draft what follows. On an issue a listed human filed, it counts as the issue's spec once posted, while unedited; it is still model text, so check it.
Intended outcome: Ship the REST poll script as a file under the pull-request skill's scripts/ and have monitor.md 3.0.1 pass bash <path> to Monitor, so no long inline script reaches the removal safety check.
Which option ships: move the poll script to a file such as scripts/monitor-poll.sh and pass bash <path> to Monitor, or keep it inline and drop the mv snapshot write?
RECOMMENDED: Move it to a file. The inline script already has no rm (monitor.md:208 records an earlier denial over rm, issue #16201), so mv is not shown to be the trigger. A file takes the whole long bash -c body out of the check. Basis: plugins/source-control/reference/providers/github/pull-request/monitor.md:208
The done-when needs a live auto-mode Claude Code session to show the arming call is not denied, and an unattended run cannot do that. May the unattended criteria be file-based, with the auto-mode arming probe left as a check a person runs after merge?
RECOMMENDED: Yes. Criteria a run can check: the script file exists and passes its test suite, and monitor.md and the provider reference pass bash <path> with no inline script. The live probe stays a manual check. Basis: judgment
The cause is unverified and only one session showed the denial. Is shipping the file form acceptable without first isolating the flagged construct, given the check might still inspect the script a bash <path> call runs?
RECOMMENDED: Yes. Ship the file form and record the post-merge probe result on the issue. If it is still denied, a follow-up isolates the construct. Basis: judgment
How should the file take its settings, since the inline block has placeholders (<skill-dir>, <scripts-dir>, <checkout>, PR_NUMBER, INTERVAL, BASELINE_FILE, SNAPSHOT_FILE) that the agent fills in at arming time?
RECOMMENDED: Pass them as environment variables or flags on the bash <path> command, and keep the triangular-flow override as an explicit base-repository argument. monitor-poll.test.sh:36-43 currently extracts the block from the reference with sed, so it must run the file directly instead. Basis: plugins/source-control/skills/pull-request/scripts/monitor-poll.test.sh:36
Sources read
/home/runner/work/claude-code-plugins/claude-code-plugins/refine-data/context.json: issue 16353, thin because it has no task list, no comments, no duplicate or fixed-by candidate
plugins/source-control/reference/providers/github/pull-request/monitor.md:43-206: the inline poll script, including the mv snapshot write at lines 138-139 and read_into with $'\037' at lines 79-86
plugins/source-control/reference/providers/github/pull-request/monitor.md:208: a note that an earlier denial involved rm, issue #16201, and the script was kept free of rm
plugins/source-control/skills/pull-request/reference/monitor.md:131-171: 3.0.1 passes the poll script inline as the Monitor command
plugins/source-control/skills/pull-request/scripts/monitor-poll.test.sh:36-43: the test extracts the script from the reference markdown and runs it against a stubbed gh
plugins/source-control/skills/pull-request/scripts/: no monitor-poll.sh exists yet
To answer, post a comment that starts with this line:
**Decision recorded.** <answer>
Automated refinement by the lanes App. Answer with a comment whose first line is **Decision recorded.**.
Decision recorded. The acceptance checklist below adopts intake's recommended answers to the refinement's four questions, under the owner's answer to the batch question for issues with only implementation questions.
A (recommended, chosen): an agent session posts a **Decision recorded.** comment on each, adopting triage's own answers as the acceptance checklist, so admission takes them.
B: the owner reviews each first.
Owner's answer, 2026-11-17, typed in an agent session, verbatim: "Go with recommendations."
The owner approved this agent session posting triage's answers as the checklist; he did not answer each implementation question himself. Triage flagged nothing (triage). The answers adopted are the RECOMMENDED lines of the refinement:
Move the poll script to a file, scripts/monitor-poll.sh under the pull-request skill, and pass bash <path> to Monitor.
The criteria are file-based; the live auto-mode arming probe is a check a person runs after merge, so it is not a criterion below.
Ship the file form without first isolating the flagged construct; the post-merge probe result is recorded on this issue, and a follow-up isolates the construct if the call is still denied.
The script takes its settings as environment variables or flags on the bash <path> command, with the triangular-flow override as an explicit base-repository argument.
Acceptance criteria
plugins/source-control/skills/pull-request/scripts/monitor-poll.sh exists and holds the REST poll script that monitor.md passed inline.
The script takes PR_NUMBER, INTERVAL, BASELINE_FILE, SNAPSHOT_FILE and the other values the inline block filled in at arming time as environment variables or flags, and the triangular-flow override as an explicit base-repository argument.
plugins/source-control/skills/pull-request/scripts/monitor-poll.test.sh runs monitor-poll.sh directly instead of extracting the block from the reference markdown with sed, and passes.
plugins/source-control/skills/pull-request/reference/monitor.md (3.0.1) and plugins/source-control/reference/providers/github/pull-request/monitor.md pass bash <path> to Monitor and carry no inline poll script.
Activity
github-actions commentedon Nov 15, 2026
Size: Medium
Complexity: Low
Uncertainty: Knowable
Flags: none
Blocked by: none
Blast radius: the source-control pull-request skill's monitor reference, its provider reference, and a new poll script with its test; read by anyone running
/source-control:pull-request monitor.Reversible: yes; revert the change and the inline script returns.
Open questions: none
Understood: the inline poll script passed to Monitor is refused by Claude Code's removal safety check in auto mode, so the watch never arms. The report proposes moving the script to a file.
Decision comment, quoted:
#16353 (comment)
This decision settles the open questions. The live auto-mode probe is a post-merge check by a person, not a criterion. No duplicate or merged fix was found.
Automated triage. A maintainer reviews it.
melodic-automation-lanes commentedon Nov 15, 2026
Not admitted to the issue lane yet: no trusted-human acceptance criteria: a listed human must put the confirmed
- [ ]criteria in the body or post them as their own comment, or, on an issue a listed human filed, intake's newest refinement comment must hold them unedited; intake's refinement of this body is due and may supply them.melodic-automation-lanes commentedon Nov 15, 2026
Refinement. A read-only run explored this repository, searched its issues and pull requests, and read the allowed docs to draft what follows. On an issue a listed human filed, it counts as the issue's spec once posted, while unedited; it is still model text, so check it.
Intended outcome: Ship the REST poll script as a file under the pull-request skill's scripts/ and have monitor.md 3.0.1 pass
bash <path>to Monitor, so no long inline script reaches the removal safety check.Related work
Open questions
bash <path>to Monitor, or keep it inline and drop themvsnapshot write?RECOMMENDED: Move it to a file. The inline script already has no
rm(monitor.md:208 records an earlier denial overrm, issue #16201), somvis not shown to be the trigger. A file takes the whole longbash -cbody out of the check. Basis: plugins/source-control/reference/providers/github/pull-request/monitor.md:208RECOMMENDED: Yes. Criteria a run can check: the script file exists and passes its test suite, and monitor.md and the provider reference pass
bash <path>with no inline script. The live probe stays a manual check. Basis: judgmentbash <path>call runs?RECOMMENDED: Yes. Ship the file form and record the post-merge probe result on the issue. If it is still denied, a follow-up isolates the construct. Basis: judgment
<skill-dir>,<scripts-dir>,<checkout>,PR_NUMBER,INTERVAL,BASELINE_FILE,SNAPSHOT_FILE) that the agent fills in at arming time?RECOMMENDED: Pass them as environment variables or flags on the
bash <path>command, and keep the triangular-flow override as an explicit base-repository argument. monitor-poll.test.sh:36-43 currently extracts the block from the reference with sed, so it must run the file directly instead. Basis: plugins/source-control/skills/pull-request/scripts/monitor-poll.test.sh:36Sources read
mvsnapshot write at lines 138-139 andread_intowith $'\037' at lines 79-86rm, issue #16201, and the script was kept free ofrmcommandTo answer, post a comment that starts with this line:
Automated refinement by the lanes App. Answer with a comment whose first line is
**Decision recorded.**.kyle-sexton commentedon Nov 17, 2026
Decision recorded. The acceptance checklist below adopts intake's recommended answers to the refinement's four questions, under the owner's answer to the batch question for issues with only implementation questions.
Question as put to the owner (Q42, covering #15499, #16352, #16353, #16524, #16579 and #16748): six issues with only implementation questions.
**Decision recorded.**comment on each, adopting triage's own answers as the acceptance checklist, so admission takes them.Owner's answer, 2026-11-17, typed in an agent session, verbatim: "Go with recommendations."
The owner approved this agent session posting triage's answers as the checklist; he did not answer each implementation question himself. Triage flagged nothing (triage). The answers adopted are the RECOMMENDED lines of the refinement:
scripts/monitor-poll.shunder the pull-request skill, and passbash <path>to Monitor.bash <path>command, with the triangular-flow override as an explicit base-repository argument.Acceptance criteria
plugins/source-control/skills/pull-request/scripts/monitor-poll.shexists and holds the REST poll script thatmonitor.mdpassed inline.PR_NUMBER,INTERVAL,BASELINE_FILE,SNAPSHOT_FILEand the other values the inline block filled in at arming time as environment variables or flags, and the triangular-flow override as an explicit base-repository argument.plugins/source-control/skills/pull-request/scripts/monitor-poll.test.shrunsmonitor-poll.shdirectly instead of extracting the block from the reference markdown withsed, and passes.plugins/source-control/skills/pull-request/reference/monitor.md(3.0.1) andplugins/source-control/reference/providers/github/pull-request/monitor.mdpassbash <path>to Monitor and carry no inline poll script.Posted by an agent session.
github-actions commentedon Nov 17, 2026
A listed human released the issue's Work status hold, so it goes back to intake triage.
melodic-automation-lanes commentedon Nov 17, 2026
{"v":1,"actor_id":337595936,"title_sha256":"983952e7f6df98cef43244b23d5a1568e9c4e364dfb489fb119573550c350171","body_sha256":"97fc11b637debd81dab561aa33f959a657130898b73465c554c791338e484476"}
github-actions commentedon Nov 17, 2026