openclaw - 💡(How to fix) Fix Patches: Discord REST proxy, ACP platform binary, model config [1 participants]

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…
GitHub stats
openclaw/openclaw#60693Fetched 2026-04-08 02:48:14
View on GitHub
Comments
0
Participants
1
Timeline
0
Reactions
0
Author
Participants

Error Message

// Before: isDisallowedIntentsError: isDiscordDisallowedIntentsError // After: isDisallowedIntentsError: isDiscordDisallowedIntentsError, discordRestFetch

Fix Action

Fix / Workaround

Patches Applied (v2026.4.2)

Code Example

// Before:
isDisallowedIntentsError: isDiscordDisallowedIntentsError
// After:
isDisallowedIntentsError: isDiscordDisallowedIntentsError,
discordRestFetch

---

// Before:
autoDeploy: false,
eventQueue: eventQueueOpts
// After:
autoDeploy: false,
eventQueue: eventQueueOpts,
requestOptions: params.discordRestFetch ? { fetch: params.discordRestFetch } : void 0
RAW_BUFFERClick to expand / collapse

Patches Applied (v2026.4.2)

以下补丁在 v2026.4.2 上手动应用,建议在下次更新中合并到上游:

1. Discord REST API 不走代理(Critical)

问题: createDiscordMonitorClient 创建 Carbon Client 时没有传入 requestOptions: { fetch: discordRestFetch },导致所有 REST API 调用(斜杠命令注册、bot identity 获取)直连超时。WSS Gateway 正常因为已正确传入 wsAgent

补丁位置: dist/provider-BjLY5Kwt.js

改动 1 - line 18779: createDiscordMonitorClient 调用处添加 discordRestFetch 参数

// Before:
isDisallowedIntentsError: isDiscordDisallowedIntentsError
// After:
isDisallowedIntentsError: isDiscordDisallowedIntentsError,
discordRestFetch

改动 2 - line 18145: Client 构造函数使用 params.discordRestFetch

// Before:
autoDeploy: false,
eventQueue: eventQueueOpts
// After:
autoDeploy: false,
eventQueue: eventQueueOpts,
requestOptions: params.discordRestFetch ? { fetch: params.discordRestFetch } : void 0

根因: discordRestFetchcreateDiscordProvider 闭包内由 resolveDiscordRestFetch() 创建(使用 undici.ProxyAgent),但未传递给 createDiscordMonitorClient


2. codex-acp-darwin-x64 平台包丢失

问题: npx -y @zed-industries/[email protected] 使用的 npx 缓存中,package-lock.json 指向 npmmirror 且 darwin-x64 可选依赖解析为 "npm:null@*",导致平台二进制文件缺失。

建议:

  • 考虑将 codex-acp/claude-agent-acp 作为 bundledDependencies 打包,而非依赖 npx 按需下载
  • 或在 acpx 启动时检测 npx 缓存完整性,自动清理损坏的缓存

临时修复: npm install -g @zed-industries/[email protected] + 清理 ~/.npm/_npx/ 中损坏的缓存目录


3. per-agent model override 导致默认模型切换困难

问题: agents.list[*].model.primary 覆盖 agents.defaults.model,且 cron/jobs.json 中的 payload.model 也会覆盖。切换默认模型需要改三处(defaults、agents.list、cron jobs),容易遗漏。

建议:

  • 文档中明确说明模型优先级链:cron payload.model > agents.list[*].model.primary > agents.defaults.model
  • 考虑提供 CLI 命令一键切换所有模型:openclaw config set-model <model>

4. ACP allowedAgents 包含已禁用 agent

问题: acp.allowedAgents 中包含 "gemini",但该 agent 目录已重命名为 gemini.disabled.20260329,导致每次启动时 identity reconcile 失败。

建议: ACP 初始化时检查 allowedAgents 中的 agent 是否实际存在且未禁用,跳过不存在的 agent 并输出警告。


环境: macOS darwin-x64, ClashX Pro 代理 (mixed-port 7897), OpenClaw v2026.4.2

extent analysis

TL;DR

Apply the provided patches to fix issues with Discord REST API, codex-acp-darwin-x64 package loss, per-agent model override, and ACP allowedAgents containing disabled agents.

Guidance

  • For the Discord REST API issue, apply the patches to createDiscordMonitorClient and Client constructor to pass discordRestFetch parameter.
  • For the codex-acp-darwin-x64 package loss, consider bundling codex-acp and claude-agent-acp as bundledDependencies or detect and clean up corrupted npx cache at startup.
  • For the per-agent model override issue, document the model priority chain and consider providing a CLI command to switch all models at once.
  • For the ACP allowedAgents issue, check for existing and enabled agents during ACP initialization and skip non-existent agents with a warning.

Example

// Before:
isDisallowedIntentsError: isDiscordDisallowedIntentsError
// After:
isDisallowedIntentsError: isDiscordDisallowedIntentsError,
discordRestFetch

Notes

The provided patches and suggestions are specific to the issues described and may not be applicable to other environments or versions.

Recommendation

Apply the provided patches to fix the issues, as they address specific problems and provide improvements to the code.

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…

Still need to ship something?

×6

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

Back to top recommendations

TRENDING