Skip to content

[safeoutputs] submit_pull_request_review: disambiguate event field against 'action' (recurring) — agents pass action: instead of [Content truncated due to length] #41947

Description

@github-actions

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 ·

  • expires on Jun 29, 2026, 1:28 PM UTC-08:00

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions