openclaw - 💡(How to fix) Fix [Bug]: Discord control path can become unavailable during gateway/provider auth failures

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

OpenClaw can become unusable from Discord while reporting access/pairing, provider auth, and Codex app-server connection errors, requiring operator intervention outside Discord to recover.

Error Message

When the Discord control path is available, OpenClaw should keep the operator-facing channel usable enough to report the failing layer and avoid switching an OAuth-backed OpenAI Codex route into a direct OpenAI API-key error path unless that is the configured route. The observed error message indicates that at least one failing path resolved to a direct OpenAI API-key requirement: A useful mitigation would be an operator-facing way to reduce or disable startup provider auth prewarm work, and to keep OAuth-backed OpenAI Codex routing from falling back into direct OpenAI API-key error paths without clear reporting.

Root Cause

Severity: High for affected operators because the Discord control path becomes unreliable and recovery requires direct server access.

Fix Action

Fix / Workaround

A useful mitigation would be an operator-facing way to reduce or disable startup provider auth prewarm work, and to keep OAuth-backed OpenAI Codex routing from falling back into direct OpenAI API-key error paths without clear reporting.

Code Example

OpenClaw: access not configured.

Your Discord user id: <redacted>
Pairing code:
<redacted>

Ask the bot owner to approve with:
openclaw pairing approve discord <redacted>

Missing API key for OpenAI on the gateway. Use openai/gpt-5.5 with the Codex OAuth profile, or set OPENAI_API_KEY for direct OpenAI API-key runs.

Codex app-server connection closed before this turn finished. OpenClaw retried once when the stdio turn was still replay-safe; please try again if this keeps happening.

---

Missing API key for OpenAI on the gateway. Use openai/gpt-5.5 with the Codex OAuth profile, or set OPENAI_API_KEY for direct OpenAI API-key runs.

---

OpenClaw: access not configured.

Your Discord user id: <redacted>
Pairing code:
<redacted>

Ask the bot owner to approve with:
openclaw pairing approve discord <redacted>

Missing API key for OpenAI on the gateway. Use openai/gpt-5.5 with the Codex OAuth profile, or set OPENAI_API_KEY for direct OpenAI API-key runs.

Codex app-server connection closed before this turn finished. OpenClaw retried once when the stdio turn was still replay-safe; please try again if this keeps happening.
RAW_BUFFERClick to expand / collapse

Bug type

Behavior bug (incorrect output/state without crash)

Beta release blocker

No

Summary

OpenClaw can become unusable from Discord while reporting access/pairing, provider auth, and Codex app-server connection errors, requiring operator intervention outside Discord to recover.

Steps to reproduce

  1. Run OpenClaw with a Discord channel integration and an OpenAI Codex OAuth-backed provider route.
  2. Send messages to the OpenClaw Discord bot while the gateway/provider/auth path is in a degraded state.
  3. Observe Discord responses reporting access configuration, missing OpenAI API key on the gateway, or Codex app-server connection closure.
  4. Attempt to continue controlling or repairing OpenClaw from Discord.

The exact deterministic trigger is NOT_ENOUGH_INFO. The observed failure state was reproduced across multiple Discord attempts in the same operator session.

Expected behavior

When the Discord control path is available, OpenClaw should keep the operator-facing channel usable enough to report the failing layer and avoid switching an OAuth-backed OpenAI Codex route into a direct OpenAI API-key error path unless that is the configured route.

Actual behavior

The Discord bot returned one or more of the following operator-visible errors and did not provide a reliable recovery path from Discord:

OpenClaw: access not configured.

Your Discord user id: <redacted>
Pairing code:
<redacted>

Ask the bot owner to approve with:
openclaw pairing approve discord <redacted>

Missing API key for OpenAI on the gateway. Use openai/gpt-5.5 with the Codex OAuth profile, or set OPENAI_API_KEY for direct OpenAI API-key runs.

Codex app-server connection closed before this turn finished. OpenClaw retried once when the stdio turn was still replay-safe; please try again if this keeps happening.

In practice, the operator had to inspect or repair the OpenClaw server directly instead of resolving the problem through Discord.

OpenClaw version

NOT_ENOUGH_INFO

Operating system

Ubuntu Linux server

Install method

NOT_ENOUGH_INFO

Model

openai/gpt-5.5

Provider / routing chain

OpenClaw Discord channel -> OpenClaw gateway -> OpenAI provider route using Codex OAuth profile

Additional provider/model setup details

The intended OpenAI route is OAuth-backed through the Codex profile, not a direct OPENAI_API_KEY-only setup.

The observed error message indicates that at least one failing path resolved to a direct OpenAI API-key requirement:

Missing API key for OpenAI on the gateway. Use openai/gpt-5.5 with the Codex OAuth profile, or set OPENAI_API_KEY for direct OpenAI API-key runs.

No API keys, OAuth tokens, Discord identifiers, pairing codes, or auth profile contents are included in this report.

Logs, screenshots, and evidence

OpenClaw: access not configured.

Your Discord user id: <redacted>
Pairing code:
<redacted>

Ask the bot owner to approve with:
openclaw pairing approve discord <redacted>

Missing API key for OpenAI on the gateway. Use openai/gpt-5.5 with the Codex OAuth profile, or set OPENAI_API_KEY for direct OpenAI API-key runs.

Codex app-server connection closed before this turn finished. OpenClaw retried once when the stdio turn was still replay-safe; please try again if this keeps happening.

Impact and severity

Affected: Operators using OpenClaw through Discord with an OpenAI Codex OAuth-backed provider route.

Severity: High for affected operators because the Discord control path becomes unreliable and recovery requires direct server access.

Frequency: Intermittent based on observed Discord attempts in one operator session. Exact frequency is NOT_ENOUGH_INFO.

Consequence: The operator cannot reliably use Discord to diagnose or recover OpenClaw, and may need to SSH into the server to inspect or repair gateway/provider/auth state.

Identifiers, pairing codes, and auth material are intentionally redacted.

Additional information

Possibly related prior reports and fixes:

  • #77995: gateway status handler stalls, event loop degraded, Discord heartbeat timeouts
  • #74325: gateway restart blocks main thread and reports ready before channels are online
  • #72929: gateway startup/status can self-DoS and reports ready before channels are online
  • #78104: Discord channel hangs on awaiting gateway readiness
  • #85272: provider auth prewarm was deferred after startup

This report does not claim that all listed symptoms share one root cause. The observed issue is that Discord remains a fragile recovery surface when gateway/provider/auth state degrades.

A useful mitigation would be an operator-facing way to reduce or disable startup provider auth prewarm work, and to keep OAuth-backed OpenAI Codex routing from falling back into direct OpenAI API-key error paths without clear reporting.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

When the Discord control path is available, OpenClaw should keep the operator-facing channel usable enough to report the failing layer and avoid switching an OAuth-backed OpenAI Codex route into a direct OpenAI API-key error path unless that is the configured route.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING