Skip to content

PR Sous Chef add-comment repeatedly fails with Bad credentials for per-handler token #72944

Backlog

Description

@pelikhan

Summary

PR Sous Chef completes agent work but fails in safe_outputs / Process Safe Outputs when add_comment uses its per-handler credential. This is an authentication failure, not evidence of missing workflow-write permissions.

Evidence

Both failed-job logs report:

Using per-handler github-token for cross-repository authentication
Failed to add comment: Bad credentials - https://docs.github.com/rest
1 safe output(s) failed

The source config for safe-outputs.add-comment.github-token selects secrets.AWI_MAINTENANCE_TOKEN || secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN. Expression fallback tests presence, not whether the selected token is valid. An invalid nonempty higher-priority secret will not fall through. This explains a possible persistent failure mode; the evidence does not establish which secret was selected or why it was rejected.

Expected behavior / investigation

Trace the selected credential reference and per-handler client construction without printing secret values. Determine whether the credential is invalid, revoked, expired, or misbound, and repair its configuration through the authorized owner. Keep errors explicit; do not retry mutations using different credentials or silently bypass a configured token.

Add a focused test if a client/configuration defect is found. Verify future existing runs can publish the intended comment. No credentials were retrieved, changed, or retried during this investigation.

Scope

Health cluster failure-910651f6d901a414 contains five runs failing at Process Safe Outputs, but only the two PR Sous Chef runs above have been confirmed for this signature. Other members may have different causes.

Activity

  1. github-actions commented on Nov 6, 2026

    @github-actions
    Contributor

    Assigned to @davidslater: recent merged work on safe-outputs footers/attribution matches this safe-outputs issue.

    Generated by 🔧 Daily Assign Issue To User · copilot · auto (Claude Sonnet 5.5) · ~19 AIC · ⌖ ~1 AIC · ⊞ 7.9K · ◷

  2. added
    backlog:safe-outputs-git
    on Nov 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

backlog:safe-outputs-gitbugsafe-outputssecurity

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions