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
Bug: safe-outputs add-comment sanitizer not honoring mentions.allowed-teams #42225
We added safe-outputs.mentions.allowed-teams to the workflow:
safe-outputs:
mentions:
allowed-teams:
- my-team
The workflow correctly resolved the team during the run: logs show it fetched 31 members and included the person in the allowed mentions. The agent’s raw safeoutputs.jsonl payload also contained an unformatted @ mention of this person.
However the add_comment safe-output handler still posted the comment with @person, so the mention did not notify. The logs suggest the final comment sanitizer only allowed comment/context aliases and did not honor the globally resolved allowed-teams list during add_comment.
A similar thing happened when we tried allow-team-members; it didn't work either
Workflow config included safe-outputs.mentions.allowed-teams with one allowed team.
The safeoutputs runtime parsed it correctly as mentions.allowedTeams: ["<org>/<team>"].
The workflow correctly fetched the members of that team.
The mentioned user was present in the fetched team-member set / allowed mentions set.
The agent’s raw add_comment safe-output payload contained a bare @<allowed-login> mention.
The final posted GitHub comment converted that mention to inline code: `@<allowed-login>`.
Because of that conversion, GitHub did not send a notification.
Expected behavior
If <allowed-login> is a member of a configured mentions.allowed-teams team, add_comment should preserve the bare @<allowed-login> mention.
Actual behavior
add_comment accepted the payload, but final comment sanitization still escaped the allowed mention.
Most likely cause
The team-member resolution path works, but the final add_comment apply-time sanitizer does not use the resolved allowed-team login set when deciding whether to preserve mentions.
Activity
pelikhan commentedon Jun 29, 2026
Could you run the debug.md agent to generate an anonymized bug report?
ivancea commentedon Jun 29, 2026
Anonymized report:
safe-outputs.mentions.allowed-teamswith one allowed team.mentions.allowedTeams: ["<org>/<team>"].add_commentsafe-output payload contained a bare@<allowed-login>mention.`@<allowed-login>`.Expected behavior
If
<allowed-login>is a member of a configuredmentions.allowed-teamsteam,add_commentshould preserve the bare@<allowed-login>mention.Actual behavior
add_commentaccepted the payload, but final comment sanitization still escaped the allowed mention.Most likely cause
The team-member resolution path works, but the final
add_commentapply-time sanitizer does not use the resolved allowed-team login set when deciding whether to preserve mentions.Versions / related runtime info
[community] Update community contributions in README