Improve submit_pull_request_review event-field description to prevent action errors
Summary
A production reviewer workflow again called submit_pull_request_review with an action field instead of the schema's event field. The workflow prompt is correct (it only asks the agent to approve / comment / request changes), so this is a tool-description gap, not a prompt bug. This pattern was first seen on 2026-06-21 and folded as a secondary note into #40691 (now closed) with an explicit "escalate if it recurs." It has now recurred in a different production workflow — the escalation trigger is met.
Evidence
Recurrence — PR Code Quality Reviewer (copilot, PR #41916), run §28298505422:
{
"name": "submit_pull_request_review",
"arguments": { "action": "COMMENT", "body": "...", "pull_request_number": 41916 }
}
Rejected:
-32602 Invalid arguments: unknown parameter 'action' (closest: 'repo').
Supported parameters for this tool: 'body', 'event', 'pull_request_number', 'repo', 'secrecy', 'integrity'.
The agent recovered ~6s later with event: "COMMENT". Note pull_request_number was accepted in the same call — only action was wrong.
First sighting (2026-06-21): run §27913639218, a skills/docs reviewer passed action: "REQUEST_CHANGES".
→ 2 occurrences, 2 distinct production workflows, both copilot.
Root cause
The live event field description reads:
Review decision: APPROVE to approve the pull request, REQUEST_CHANGES to formally request changes before merging, or COMMENT for general feedback without a formal decision. Defaults to COMMENT when omitted.
The enum values (APPROVE / REQUEST_CHANGES / COMMENT) read like a review action verb, and GitHub's REST Submit a review API calls this the review event. The description never states the parameter is named event, NOT action, so the agent reaches for the more natural-sounding action.
Recommended fix
This is the same "named X, NOT Y" disambiguation class that is already accepted and live elsewhere — e.g. push_to_pull_request_branch's message field literally carries "This field is named message, NOT commit_message" (verified live in today's logs). Mirror it onto the event field:
- Current: "Review decision: APPROVE ... REQUEST_CHANGES ... COMMENT ... Defaults to COMMENT when omitted."
- Suggested: append → "This field is named
event, NOT action."
Apply to both copies (per the 2026-05-30 deployment-gap lesson — the runtime copy must not drift):
pkg/workflow/js/safe_outputs_tools.json
actions/setup/js/safe_outputs_tools.json
This is distinct from the declined #38219 (generalize the targeting-field prohibition) — that was about name / pull_request_number; this is a content/decision-field synonym, the same class as the accepted #35579 add_comment issue_number warning and the live commit_message note.
Secondary observation (tracked, not for action yet)
NEW, single occurrence — push_to_pull_request_branch + expected_head_sha. Design Decision Gate (claude, PR #41921), run §28298881067: the agent invented an optimistic-concurrency field (expected_head_sha, force-with-lease semantics). The tool auto-pins the branch HEAD itself, so no concurrency param is accepted. Rejected, recovered. Single occurrence → tracking only; escalate if a concurrency field recurs on this tool.
Out of scope this window
References
Generated by ⚡ Daily Safe Output Tool Optimizer · 402.4 AIC · ⌖ 31.2 AIC · ⊞ 9K · ◷
Improve
submit_pull_request_reviewevent-field description to preventactionerrorsSummary
A production reviewer workflow again called
submit_pull_request_reviewwith anactionfield instead of the schema'seventfield. The workflow prompt is correct (it only asks the agent to approve / comment / request changes), so this is a tool-description gap, not a prompt bug. This pattern was first seen on 2026-06-21 and folded as a secondary note into #40691 (now closed) with an explicit "escalate if it recurs." It has now recurred in a different production workflow — the escalation trigger is met.Evidence
Recurrence — PR Code Quality Reviewer (copilot, PR #41916), run §28298505422:
{ "name": "submit_pull_request_review", "arguments": { "action": "COMMENT", "body": "...", "pull_request_number": 41916 } }Rejected:
The agent recovered ~6s later with
event: "COMMENT". Notepull_request_numberwas accepted in the same call — onlyactionwas wrong.First sighting (2026-06-21): run §27913639218, a skills/docs reviewer passed
action: "REQUEST_CHANGES".→ 2 occurrences, 2 distinct production workflows, both copilot.
Root cause
The live
eventfield description reads:The enum values (
APPROVE/REQUEST_CHANGES/COMMENT) read like a review action verb, and GitHub's REST Submit a review API calls this the review event. The description never states the parameter is namedevent, NOTaction, so the agent reaches for the more natural-soundingaction.Recommended fix
This is the same "named X, NOT Y" disambiguation class that is already accepted and live elsewhere — e.g.
push_to_pull_request_branch's message field literally carries "This field is named message, NOT commit_message" (verified live in today's logs). Mirror it onto theeventfield:event, NOTaction."Apply to both copies (per the 2026-05-30 deployment-gap lesson — the runtime copy must not drift):
pkg/workflow/js/safe_outputs_tools.jsonactions/setup/js/safe_outputs_tools.jsonThis is distinct from the declined #38219 (generalize the targeting-field prohibition) — that was about
name/pull_request_number; this is a content/decision-field synonym, the same class as the accepted #35579 add_commentissue_numberwarning and the livecommit_messagenote.Secondary observation (tracked, not for action yet)
NEW, single occurrence —
push_to_pull_request_branch+expected_head_sha. Design Decision Gate (claude, PR #41921), run §28298881067: the agent invented an optimistic-concurrency field (expected_head_sha, force-with-lease semantics). The tool auto-pins the branch HEAD itself, so no concurrency param is accepted. Rejected, recovered. Single occurrence → tracking only; escalate if a concurrency field recurs on this tool.Out of scope this window
submit_pull_request_review+item_number×2 (Test Quality Sentinel) — already filed ([safeoutputs] submit_pull_request_review: live pull_request_number warning is insufficient — agents now substitute item_number #36539, closed); recovered withpull_request_number.pr_number,discussion_number,labels/temporary_idon create_discussion) — prompt-induced, not tool-description gaps.References
pkg/workflow/js/safe_outputs_tools.json+ runtimeactions/setup/js/safe_outputs_tools.json