published fresh until

Not authorized to perform sts:AssumeRoleWithWebIdentity: CI fix?

Summary As of October 2026, GitHub Actions AWS OIDC denial needs a trust-and-claims check; credentials-provider failure needs a valid login or removal of a cleanup-only action; self-hosted runner communication loss needs host and network evidence. These are separate failures, not one permissions fix (checked 2026-10-20).

Not for running an AI agent as a workflow, see github-agentic-workflows-gh-aw; choosing a PR reviewer, see bugbot-vs-own-cursor-agent-review-workflow

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

The problem

Match the GitHub Actions error before changing permissions or restarting. Checked 2026-10-20.

Versions, checked 2026-10-20

ComponentVerified scopeLicence and cost scope
aws-actions/configure-aws-credentialsReports use v4; examples use v4.3.1 release, dated 2025-08-04. Not claimed latest.Licence fetch failed; no licence or price claim.
Self-hosted actions/runnerAffected release unspecified; inspect Runner logs. No upgrade prescribed as a cure.MIT; hosting and Actions charges not assessed.

Pick by failure

Exact symptomFirst boundary to inspectSuccess condition
AssumeRoleWithWebIdentity deniedIAM role trust versus GitHub OIDC claimsIntended role assumed
Credentials could not be loadedWhich credential provider this step actually suppliesLogin works or cleanup-only action removed
Runner lost communicationRunner process, resources and outbound connectivityJob completes while connected

Not authorized to perform sts:AssumeRoleWithWebIdentity

The exact message is Error: Not authorized to perform sts:AssumeRoleWithWebIdentity (primary report).

Trust can reject issuer, audience or subject. Older default subject examples are repo:ORG/REPO:ref:refs/heads/main, repo:ORG/REPO:pull_request, and repo:ORG/REPO:environment:sandbox; an environment takes precedence over branch/PR context.

GitHub's OIDC reference documents immutable subjects with owner/repository IDs for repositories created after 2026-07-15 (excluding GitHub Enterprise Server). Renames/transfers and custom templates also matter. Check actual OIDC settings and job environment (checked 2026-10-20).

From an authenticated administrator session, inspect trust:

aws iam get-role --role-name YOUR_ROLE --query 'Role.AssumeRolePolicyDocument'

Prepare the complete trust-policy.json, preserving intended statements. Match the GitHub federated principal, allow sts:AssumeRoleWithWebIdentity, and restrict audience (sts.amazonaws.com in standard AWS) and subject to the intended job. Apply after review:

aws iam update-assume-role-policy --role-name YOUR_ROLE --policy-document file://trust-policy.json

Give the job id-token permission write and contents permission read if checkout needs it. Use the credential step below; verify with aws sts get-caller-identity. Redact account details.

Do not add AdministratorAccess, wildcard the subject or print/upload a JWT. Apply environment deployment rules; its subject alone does not restrict branches.

Official guidance: GitHub AWS OIDC guide, AWS role trust guide; commands: get-role, update trust, identity check. Checked 2026-10-20.

Credentials could not be loaded

The exact message is Error: Credentials could not be loaded, please check your action inputs: Could not load credentials from any providers.

The verified case invokes the action again with unset-current-credentials enabled but no replacement provider. The flag prepares login, not logout. Missing OIDC permission or empty credential inputs can also leave no provider.

For OIDC login, use aws-actions/configure-aws-credentials@v4.3.1 with role-to-assume, aws-region and the OIDC permission above. Use unset-current-credentials only to clear stale credentials before that login. Verify:

aws sts get-caller-identity

For cleanup only, remove the second action invocation. The maintainer endorses clearing variables manually. In a Bash workflow step:

printf '%s\n' 'AWS_ACCESS_KEY_ID=' 'AWS_SECRET_ACCESS_KEY=' 'AWS_SESSION_TOKEN=' 'AWS_REGION=' 'AWS_DEFAULT_REGION=' >> "$GITHUB_ENV"

Environment-file changes affect subsequent steps. This does not revoke STS sessions, clear files/outputs or block instance roles. Isolate code that must not share the authenticated environment.

Do not add static keys for cleanup, mask auth failure with continue-on-error, or treat cleanup as isolation.

Maintainer explanation in issue #1308; v4.3.1 authentication flow. Checked 2026-10-20.

Self-hosted runner lost communication

The exact reported prefix is The self-hosted runner: xxx lost communication with the server. xxx is a redacted runner name.

Process termination, CPU/memory starvation or blocked networking can cause this liveness symptom; no single cause is confirmed. On a Linux systemd runner, from its installation directory:

cat .service
systemctl status "$(cat .service)" --no-pager
journalctl -u "$(cat .service)" -n 100 --no-pager
ls -t _diag/Runner_*.log _diag/Worker_*.log

Read logs around the failure. If stopped, fix the termination cause and restart during an idle maintenance window using sudo systemctl restart "$(cat .service)". For evidenced resource starvation, reduce parallelism or add capacity. For failed connectivity, repair DNS/proxy/firewall/certificates against GitHub's domain list and outbound HTTPS requirements. These are conditional repairs.

Do not disable antivirus/TLS verification or restart before preserving logs. Escalate completion-only failures with evidence; do not assume insufficient RAM.

Official diagnostics: runner monitoring and communication requirements. Checked 2026-10-20.

Community evidence

  • MJ Ghani's Stack Overflow report: Matching the sandbox environment subject fixed the author's trust mismatch.
  • jwr0's credential-action issue #1308 reproduces cleanup-only failure; member lehmanmj explains the flag and endorses manual cleanup.
  • Subharanjan2055's runner issue #2624 has independent reports; tuxillo reports recurrence. simonmcl supplies a completion-failure log, not a universal fix. Engagement checked 2026-10-20.

A prompt to give your agent

Read the linked official sources and maintainer answers before proposing commands; do not guess. Match my failing step and action ref. Compare OIDC trust with actual audience/subject, including environments, immutable IDs and templates. Distinguish login from cleanup. For disconnects, inspect redacted runner/service logs. Show evidence, the smallest diff and verification command; request no secrets or cloud/host changes yet.

Limits

No workflow or cloud/host commands were run. All three supplied strings verified; none dropped. Unverified strings include alternate SDK suffixes, translations and runner-name variants beyond the source placeholder. Runner release and universal fix unknown. No reproduction, latest-release survey, action licence, price or capacity checks.

Started from a post by @jwr0, packaged by the editor. Original post

Subjects

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# Not authorized to perform sts:AssumeRoleWithWebIdentity: CI fix?
Summary: As of October 2026, GitHub Actions AWS OIDC denial needs a trust-and-claims check; credentials-provider failure needs a valid login or removal of a cleanup-only action; self-hosted runner communication loss needs host and network evidence. These are separate failures, not one permissions fix (checked 2026-10-20).
Copy for agent
get the whatworks thread github-actions-oidc-credentials-runner-communication-errors and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread github-actions-oidc-credentials-runner-communication-errors
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp/login and sign me in so I have an account. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp/login && claude mcp login whatworks
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp/login && codex mcp login whatworks