Parent report: #35351
Problem
Three scheduled workflow runs failed in the last 6 hours with an identical, deterministic safe_outputs validation error:
##[error]✗ Message N (add_comment) failed: Target is "*" but no item_number/issue_number/pull_request_number/pr_number/pr/pull_number specified in add_comment item
The agent job ran to completion in every case; only the post-step safe_outputs job failed, which means the agent emitted add_comment items that the workflow's safe-outputs config marks as invalid. Because the failure is a hard validation (job exits non-zero), the entire workflow run is marked failure even though every other side effect succeeded.
Affected workflows and runs
| Workflow |
Run |
Started (UTC) |
Items rejected |
| PR Sous Chef |
§26546260854 |
2026-05-28 00:07 |
2 of 3 add_comment items |
| PR Sous Chef |
§26543349520 |
2026-05-27 22:49 |
2 of 3 add_comment items |
| Contribution Check |
§26539586973 |
2026-05-27 21:23 |
2 of 4 add_comment items |
Probable Root Cause
Both workflows declare safe-outputs.add-comment.target: "*" (.github/workflows/pr-sous-chef.md:132–135, .github/workflows/contribution-check.md:44–48). With target: "*" the safe-outputs processor requires every emitted item to carry an explicit target identifier (one of item_number, issue_number, pull_request_number, pr_number, pr, pull_number).
The agents in these workflows are emitting items that do not include any of those fields. Sample item from PR Sous Chef run §26546260854:
{
"body": "<!-- gh-aw-pr-sous-chef-nudge -->\n@copilot review all comments and address the unresolved review threads...",
"type": "add_comment",
"temporary_id": "aw_aBpnpZZN"
}
The PR Sous Chef agent appears to have lost the active PR number between the loop that selected the PR and the call that emitted the add_comment. The Contribution Check agent appears to have intended to comment on PRs (e.g. #35304, #35305, #35286) but emitted items without issue_number, despite line 182 of contribution-check.md explicitly instructing "emit one add_comment safe output using issue_number and body".
Proposed Remediation (pick one — or both)
- Workflow prompt tightening (preferred, lowest blast radius). Update the
add_comment instruction blocks in pr-sous-chef.md and contribution-check.md so each tool-call template explicitly includes pr_number (PR Sous Chef) / issue_number (Contribution Check) as a required field, ideally with a worked example that shows the target being read from the loop variable. The contribution-checker prompt at contribution-check.md:182 already says this — but the agent isn't following it. A more directive phrasing, plus an explicit "never emit add_comment without a numeric target" rule, would help.
- Defensive processor fallback. Optionally, allow the safe-outputs processor to inherit a target from the run's GitHub event context (
pull_request.number on PR events, issue.number on issue events) when target: "*" is set and no per-item target is provided, instead of hard-failing. This is broader-scope and risks masking real bugs, so it should only land if option 1 doesn't stabilise these workflows.
Verification Steps Before Closing
Success Criteria
add_comment validation errors stop appearing in the safe_outputs job logs of PR Sous Chef and Contribution Check.
- All scheduled runs of these two workflows return to
conclusion: success (modulo unrelated failures).
- A regression test or workflow-lint rule is in place to detect
add_comment items lacking a numeric target before they reach the safe-outputs processor (optional but recommended).
References
Generated by 🔍 [aw] Failure Investigator (6h) · opus47 17.4M · ◷
Parent report: #35351
Problem
Three scheduled workflow runs failed in the last 6 hours with an identical, deterministic
safe_outputsvalidation error:The
agentjob ran to completion in every case; only the post-stepsafe_outputsjob failed, which means the agent emittedadd_commentitems that the workflow'ssafe-outputsconfig marks as invalid. Because the failure is a hard validation (job exits non-zero), the entire workflow run is markedfailureeven though every other side effect succeeded.Affected workflows and runs
add_commentitemsadd_commentitemsadd_commentitemsProbable Root Cause
Both workflows declare
safe-outputs.add-comment.target: "*"(.github/workflows/pr-sous-chef.md:132–135,.github/workflows/contribution-check.md:44–48). Withtarget: "*"the safe-outputs processor requires every emitted item to carry an explicit target identifier (one ofitem_number,issue_number,pull_request_number,pr_number,pr,pull_number).The agents in these workflows are emitting items that do not include any of those fields. Sample item from PR Sous Chef run §26546260854:
{ "body": "<!-- gh-aw-pr-sous-chef-nudge -->\n@copilot review all comments and address the unresolved review threads...", "type": "add_comment", "temporary_id": "aw_aBpnpZZN" }The PR Sous Chef agent appears to have lost the active PR number between the loop that selected the PR and the call that emitted the
add_comment. The Contribution Check agent appears to have intended to comment on PRs (e.g. #35304, #35305, #35286) but emitted items withoutissue_number, despite line 182 ofcontribution-check.mdexplicitly instructing"emit one add_comment safe output using issue_number and body".Proposed Remediation (pick one — or both)
add_commentinstruction blocks inpr-sous-chef.mdandcontribution-check.mdso each tool-call template explicitly includespr_number(PR Sous Chef) /issue_number(Contribution Check) as a required field, ideally with a worked example that shows the target being read from the loop variable. The contribution-checker prompt atcontribution-check.md:182already says this — but the agent isn't following it. A more directive phrasing, plus an explicit "never emitadd_commentwithout a numeric target" rule, would help.pull_request.numberon PR events,issue.numberon issue events) whentarget: "*"is set and no per-item target is provided, instead of hard-failing. This is broader-scope and risks masking real bugs, so it should only land if option 1 doesn't stabilise these workflows.Verification Steps Before Closing
pr_number— i.e. whether the failing runs are a regression or a sporadic agent miss.safe_outputssucceeding.safe_outputsadd_commentrejections should appear inagenticworkflows logs --start_date -24hfor these workflow names.Success Criteria
add_commentvalidation errors stop appearing in thesafe_outputsjob logs ofPR Sous ChefandContribution Check.conclusion: success(modulo unrelated failures).add_commentitems lacking a numeric target before they reach the safe-outputs processor (optional but recommended).References
.github/workflows/pr-sous-chef.md,.github/workflows/contribution-check.md/tmp/gh-aw/aw-mcp/logs/run-2654{6260854,3349520}/workflow-logs/1_safe_outputs.txt,/tmp/gh-aw/aw-mcp/logs/run-26539586973/workflow-logs/1_safe_outputs.txtRelated to [aw-failures] Failure Investigator (6h) — 4 failures, safe_outputs add_comment validation breaks 3 workflows (2026-05-27 19:24 → 2026-05-28 01 [Content truncated due to length] #35351