4 consecutive failures of the AI Moderator workflow since 17:16 UTC on 2026-04-17, all with the same fatal codex engine error.
Problem
The codex engine exits immediately with:
unexpected status 401 Unauthorized: Missing bearer or basic authentication in header
url: (api.openai.com/redacted)
This is a persistent auth failure, not a transient network issue. The secret OPENAI_API_KEY is visible in the runner env (masked), but is being rejected by the OpenAI API on every run.
Affected Runs
Secondary firewall signal: chatgpt.com:443 was also blocked in the last run, but this is unrelated to the primary 401 failure.
Root Cause
OPENAI_API_KEY secret is set in the repository/org but is invalid, revoked, or lacks permissions for the /v1/responses endpoint. The Codex reconnect loop (Reconnecting... 1/5 through 5/5) exhausts retries and exits with 401.
Proposed Remediation
- Rotate
OPENAI_API_KEY in repository or org secrets (Settings → Secrets → Actions)
- Verify the new key has access to
POST /v1/responses (requires "Responses" API scope or a standard chat-completions key if the endpoint changed)
- Re-run AI Moderator manually to confirm recovery
Success Criteria
AI Moderator workflow completes without 401 Unauthorized errors on the next issue-triggered run. Codex engine reaches agent activation.
References:
Generated by [aw] Failure Investigator (6h) · ● 498.9K · ◷
4 consecutive failures of the AI Moderator workflow since 17:16 UTC on 2026-04-17, all with the same fatal codex engine error.
Problem
The codex engine exits immediately with:
This is a persistent auth failure, not a transient network issue. The secret
OPENAI_API_KEYis visible in the runner env (masked), but is being rejected by the OpenAI API on every run.Affected Runs
Secondary firewall signal:
chatgpt.com:443was also blocked in the last run, but this is unrelated to the primary 401 failure.Root Cause
OPENAI_API_KEYsecret is set in the repository/org but is invalid, revoked, or lacks permissions for the/v1/responsesendpoint. The Codex reconnect loop (Reconnecting... 1/5through5/5) exhausts retries and exits with401.Proposed Remediation
OPENAI_API_KEYin repository or org secrets (Settings → Secrets → Actions)POST /v1/responses(requires "Responses" API scope or a standard chat-completions key if the endpoint changed)Success Criteria
AI Moderator workflow completes without
401 Unauthorizederrors on the next issue-triggered run. Codex engine reaches agent activation.References: