Repository navigation
Description
Problem statement
The resolve_pull_request_review_thread safe-output handler fails with GitHub GraphQL error Resource not accessible by integration even when the workflow holds pull-requests: write and the thread was created by the same GITHUB_TOKEN earlier in the run. This breaks the Smoke Claude end-to-end coverage of the handler.
Affected workflows and runs
- Smoke Claude — run §26047160386 (
pull_requestoncopilot/agent-step-probes-runtime, PR Prevent safe-output PR probing from creating stray downstream pull requests #33044, 2026-05-18 16:44 UTC, 10m31s, conclusion:failure, attempt 2).- The smoke prompt exercises every safe-output handler in one payload (12 messages). 11/12 succeed; message 5 (
resolve_pull_request_review_thread) fails. - This is reproducible — the same job failed at least twice (run_attempt: 2), suggesting a deterministic permission issue, not a transient API hiccup.
- The smoke prompt exercises every safe-output handler in one payload (12 messages). 11/12 succeed; message 5 (
- Any workflow that creates a review comment and then tries to resolve its own thread in the same run is exposed (Smoke Claude is the only such caller in the current tree, but
resolve_pull_request_review_threadis a public safe-output handler that other workflows could adopt).
Evidence
safe_outputs job log (truncated)
Processing message 1/12: create_pull_request_review_comment
✓ Message 1 (create_pull_request_review_comment) completed successfully
...
Processing message 5/12: resolve_pull_request_review_thread
Resolving review thread: PRRT_kwDOPc1QR86C3hJx (PR #33044 in github/gh-aw)
##[error]Failed to resolve review thread: Request failed due to following response errors:
- Resource not accessible by integration
##[error]✗ Message 5 (resolve_pull_request_review_thread) failed: ...
safe_outputs job permissions block (smoke-claude.lock.yml:2958)
permissions:
contents: read
discussions: write
issues: write
pull-requests: write
security-events: writeThe handler is invoked with pull-requests: write, so the failure is not a missing permissions declaration in the workflow — it is GitHub rejecting the resolveReviewThread mutation for the bot identity itself.
Probable root cause
The GraphQL mutation in actions/setup/js/resolve_pr_review_thread.cjs:62-78:
mutation ($threadId: ID!) {
resolveReviewThread(input: { threadId: $threadId }) {
thread { id isResolved }
}
}is executed with the workflow's GITHUB_TOKEN. GitHub requires the actor to be the comment author, a repo maintainer, or a PR collaborator to resolve a thread via GraphQL — pull-requests: write on a bot token is not sufficient for resolveReviewThread when the thread was authored by the same bot in a non-interactive context. This is the documented behaviour for the integration token.
Review comments earlier in the same run do succeed because create_pull_request_review_comment only requires pull-requests: write; resolveReviewThread has stricter actor-identity requirements.
Proposed remediation
Pick one of the following — they are listed in increasing order of disruption:
- Handler-level graceful degradation (recommended). In
actions/setup/js/resolve_pr_review_thread.cjs, detect theResource not accessible by integrationGraphQL response and downgrade to a logged warning instead of a job-level failure. Equivalent to thecore.warningfallback already used bysubmit_pull_request_reviewin the same run (see message 12 in the same log:PR review submission failed due to unresolvable comment line(s) ... Retrying as body-only review.). - Smoke-test isolation. In
.github/workflows/smoke-claude.md(and the parallelsmoke-codex.md), gate theresolve_pull_request_review_threadsmoke step behind an explicit opt-in env so that runs against bot-authored threads stop reporting a hard failure when the underlying API limitation is known. - Token swap. Document that callers needing reliable thread resolution must provide a PAT with elevated scope via
secrets.GH_AW_RESOLVE_THREAD_TOKEN(or similar) and have the handler prefer it when present. Heavier — only do this if (1) and (2) are ruled out.
Success criteria / verification
- Smoke Claude (and Smoke Codex, which has the same handler exposure) completes with
safe_outputs.conclusion = successon the next scheduled run. - The handler's test file
resolve_pr_review_thread.test.cjsgains coverage for theResource not accessible by integrationGraphQL error path, asserting the chosen degradation (warning vs. soft-skip) is produced. - If option (1) is taken: a hard failure is preserved for unexpected GraphQL errors so we don't silently swallow regressions; only the documented permission-denied response is downgraded.
Parent / cross-references
- Parent: [aw-failures] [aw] Failure Investigator (6h) - Issue Group #32523
- Related (different code path, do not conflate): Upgrade pinned github-mcp-server from v0.32.0 to v0.33.0+ to fix thread resolution #21130 (pinned
github-mcp-serverupgrade for MCP-based thread resolution). - Sibling open failure issue: [aw] Smoke Codex failed #33102 (Smoke Codex failed — different root cause: cache-memory miss + missing tools). The same
resolve_pull_request_review_threadfailure mode likely affects Smoke Codex but is masked by an earlier failure there.
Related to [aw-failures] [aw] Failure Investigator (6h) - Issue Group #32523
Generated by 🔍 [aw] Failure Investigator (6h) · ● 16.6M · ◷
- expires on May 25, 2026, 7:28 PM UTC
Activity
pelikhan commentedon May 18, 2026
@copilot detect this error and surface it in the agent failure issue/comment so that the user is aware of a configuration mistchmatch.
pelikhan commentedon May 18, 2026
@copilot update documentation about this particular behavior