Problem statement
The Issue Triage Agent workflow fails its safe_outputs job whenever it is invoked by a schedule event. The agent emits add_labels safe-output messages, but the safe-outputs handler rejects them because no issue or PR number is available in the trigger context — schedule events have no associated issue.
Unlike the rate-limit cluster, the agent in this case did not specify per-message issue numbers in the add_labels payload, so the handler defaulted to the trigger's issue.number / pull_request.number — which is empty for schedule.
Affected runs
| Run |
Started (UTC) |
Event |
Outcome |
| §25563171842 |
2026-05-08 15:08:50 |
schedule |
2× add_labels failed with No issue/PR number available |
Evidence
safe_outputs log (job §75040431175)
15:13:10 i️ Rate-limit headroom: 14697/15000 requests remaining (97%)
15:13:10 ##[error]✗ Message 1 (add_labels) failed: No issue/PR number available
15:13:10 ##[error]✗ Message 2 (add_labels) failed: No issue/PR number available
15:13:11 📝 Safe output summaries written to step summary
15:13:11 ##[error]2 safe output(s) failed
Note: rate-limit headroom was healthy (97%) — this is unrelated to the rate-limit cluster.
Probable root cause
One of the following:
- The Issue Triage Agent prompt instructs the agent to emit
add_labels for issues it discovers, but the agent emits messages without an explicit issue_number / pull_request_number field, expecting the handler to infer it.
- The safe-outputs schema for
add_labels in this workflow does not require an explicit issue number, but the handler implementation only resolves it from the trigger event payload — which is missing on schedule.
- The workflow was originally designed for
issue_comment / issues triggers and was later wired to schedule without updating the prompt / schema to require per-message issue numbers.
Proposed remediation
- Short-term: update the Issue Triage Agent prompt to require the agent to include the target
issue_number field in every add_labels safe-output message when triggered by schedule.
- Medium-term: in the
add_labels safe-outputs handler, fail validation at agent time (so the agent retries with a valid payload) instead of at the post-agent safe_outputs step (where the work is lost). The current behavior wastes an agent run.
- Long-term: clarify the
add_labels schema contract — either require explicit issue numbers in all events, or document that the handler will fall back to the trigger context only when present.
Verification / success criteria
- Issue Triage Agent runs on
schedule complete with safe_outputs conclusion = success.
- Any future
add_labels message without a resolvable target either succeeds (with explicit issue_number) or fails fast inside the agent loop, not in the post-agent push step.
Confidence & unknowns
- Confidence: high on the failure signature (explicit
No issue/PR number available error).
- Unknown: whether this is the first occurrence — the auto-generated
[aw] Issue Triage Agent failed issue is not present in the open list, so this run may not have triggered the failure-reporter (likely because safe_outputs succeeded enough to be ambiguous, or the workflow does not have report-failure-as-issue enabled).
References
Parent: #30961
Generated by [aw] Failure Investigator (6h) · ● 14.6M · ◷
Scope expansion — bug also affects daily-experiment-report (2026-05-09)
The same add_labels ↔ schedule failure mode is now reproduced on a second workflow, confirming this is a generic safe-outputs handler problem and not specific to Issue Triage Agent.
| Run |
Workflow |
Started (UTC) |
Event |
Outcome |
| §25596419525 |
daily-experiment-report |
2026-05-09 08:22:53 |
schedule |
safe_outputs job failed: Message 10 (add_labels) failed: No issue/PR number available |
Evidence from the failed safe_outputs step
safe_outputs job log (excerpt)
2026-05-09T08:38:09 ##[error]✗ Message 10 (add_labels) failed: No issue/PR number available
2026-05-09T08:38:09 ✓ Recorded noop message: Daily experiment report for 2026-05-09 complete: 5 experiments analysed across 5 workflows. ... Label experiment:active applied to `#30573`. ...
2026-05-09T08:38:09 Failed: 1
2026-05-09T08:38:09 ##[warning]1 message(s) failed to process
2026-05-09T08:38:09 ##[error]1 safe output(s) failed:
Note: the agent itself succeeded (63 turns, 4.99M tokens), so this is solely a safe-outputs-job regression — the agent's analysis output is published, but the label application is silently lost.
Why this strengthens the originally proposed fix
The original remediation proposes either (1) prompt-side guidance for the agent to include issue_number in every add_labels message, or (2) handler-side validation that fails at agent time so the agent retries.
With two workflows now affected — and presumably more schedule-triggered workflows that emit add_labels — option (2) is clearly the right level. Prompt-side fixes would require touching every workflow that uses add_labels on schedule. Centralising the validation in the safe-outputs handler fixes all current and future occurrences.
Cross-reference
Generated by [aw] Failure Investigator (6h) · ● 22.1M · ◷
Problem statement
The Issue Triage Agent workflow fails its
safe_outputsjob whenever it is invoked by ascheduleevent. The agent emitsadd_labelssafe-output messages, but the safe-outputs handler rejects them because no issue or PR number is available in the trigger context — schedule events have no associated issue.Unlike the rate-limit cluster, the agent in this case did not specify per-message issue numbers in the
add_labelspayload, so the handler defaulted to the trigger'sissue.number/pull_request.number— which is empty forschedule.Affected runs
scheduleadd_labelsfailed withNo issue/PR number availableEvidence
safe_outputs log (job §75040431175)
Note: rate-limit headroom was healthy (97%) — this is unrelated to the rate-limit cluster.
Probable root cause
One of the following:
add_labelsfor issues it discovers, but the agent emits messages without an explicitissue_number/pull_request_numberfield, expecting the handler to infer it.add_labelsin this workflow does not require an explicit issue number, but the handler implementation only resolves it from the trigger event payload — which is missing onschedule.issue_comment/issuestriggers and was later wired toschedulewithout updating the prompt / schema to require per-message issue numbers.Proposed remediation
issue_numberfield in everyadd_labelssafe-output message when triggered byschedule.add_labelssafe-outputs handler, fail validation at agent time (so the agent retries with a valid payload) instead of at the post-agentsafe_outputsstep (where the work is lost). The current behavior wastes an agent run.add_labelsschema contract — either require explicit issue numbers in all events, or document that the handler will fall back to the trigger context only when present.Verification / success criteria
schedulecomplete withsafe_outputsconclusion =success.add_labelsmessage without a resolvable target either succeeds (with explicitissue_number) or fails fast inside the agent loop, not in the post-agent push step.Confidence & unknowns
No issue/PR number availableerror).[aw] Issue Triage Agent failedissue is not present in the open list, so this run may not have triggered the failure-reporter (likely becausesafe_outputssucceeded enough to be ambiguous, or the workflow does not havereport-failure-as-issueenabled).References
Parent: #30961
Scope expansion — bug also affects
daily-experiment-report(2026-05-09)The same
add_labels↔schedulefailure mode is now reproduced on a second workflow, confirming this is a generic safe-outputs handler problem and not specific to Issue Triage Agent.daily-experiment-reportschedulesafe_outputsjob failed:Message 10 (add_labels) failed: No issue/PR number availableEvidence from the failed
safe_outputsstepsafe_outputs job log (excerpt)
Note: the agent itself succeeded (63 turns, 4.99M tokens), so this is solely a safe-outputs-job regression — the agent's analysis output is published, but the label application is silently lost.
Why this strengthens the originally proposed fix
The original remediation proposes either (1) prompt-side guidance for the agent to include
issue_numberin everyadd_labelsmessage, or (2) handler-side validation that fails at agent time so the agent retries.With two workflows now affected — and presumably more
schedule-triggered workflows that emitadd_labels— option (2) is clearly the right level. Prompt-side fixes would require touching every workflow that usesadd_labelsonschedule. Centralising the validation in the safe-outputs handler fixes all current and future occurrences.Cross-reference