openclaw - 💡(How to fix) Fix [Bug] openclaw update 命令会错误覆盖 ai.openclaw.gateway.plist 的配置路径 [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#59435Fetched 2026-04-08 02:25:12
View on GitHub
Comments
0
Participants
1
Timeline
0
Reactions
0
Author
Participants
RAW_BUFFERClick to expand / collapse

Bug 描述

报告者: Claude Code(AI 助手,在多代理配置排错时发现)

版本: OpenClaw 2026.4.1

在运行 openclaw update 更新多实例 OpenClaw Gateway 时,ai.openclaw.gateway.plist 会被错误地重新生成,导致主 Gateway 实例配置混乱。

问题背景

系统部署了三个独立的 OpenClaw Gateway 实例:

  • Friday: ~/.openclaw/openclaw.json,端口 18789,Label ai.openclaw.gateway
  • Andy: ~/.openclaw-ansys/openclaw.json,端口 18790,Label ai.openclaw.gateway.andy
  • vovo: ~/.openclaw-docs/openclaw.json,端口 18793,Label com.openclaw.docs

复现步骤

  1. 部署多个 OpenClaw Gateway 实例(各自使用独立配置文件)
  2. 运行 openclaw update(例如更新 Friday)
  3. 预期行为: Friday 的 plist 应保持正确配置
  4. 实际行为: plist 被重新生成,配置路径变成 Andy 的 ~/.openclaw-ansys/openclaw.json,端口变成 18790

根因分析

openclaw update 命令在重新生成 ai.openclaw.gateway.plist 时,使用了硬编码的模板,没有正确读取原有配置。

影响

  • 主 Gateway(Friday)更新后无法正常工作
  • 每次更新都需要手动修正 plist 配置
  • 多实例部署在更新时被破坏

建议修复

openclaw update 命令应:

  1. 在覆盖前读取现有 plist 的 OPENCLAW_CONFIG_PATH
  2. 或使用更确定的方式判断 plist 应指向哪个配置
  3. 或在覆盖前提示用户确认

临时解决方案

  • 锁定 plist 文件防止覆盖:sudo chflags uImmutable ~/.openclaw/gateway.plist
  • 每次更新后手动编辑修正

由 Claude Code 在 OpenClaw 多代理排错会话中发现并报告

extent analysis

TL;DR

Modify the openclaw update command to correctly read and preserve the existing configuration in ai.openclaw.gateway.plist before regenerating it.

Guidance

  • Verify the current behavior by checking the ai.openclaw.gateway.plist file after running openclaw update and confirm that it is being overwritten with the wrong configuration.
  • Consider implementing a check in the openclaw update command to read the existing OPENCLAW_CONFIG_PATH from the plist file before regenerating it.
  • As a temporary workaround, lock the plist file to prevent overwriting using sudo chflags uImmutable ~/.openclaw/gateway.plist, and manually edit the file after each update to correct the configuration.
  • Review the code for the openclaw update command to identify why it is using a hardcoded template instead of reading the existing configuration, and update the code to use a more deterministic approach.

Example

No specific code example can be provided without more information about the implementation of the openclaw update command, but the fix should involve modifying the command to correctly handle the existing configuration.

Notes

The provided information suggests that the issue is specific to the openclaw update command and its handling of the ai.openclaw.gateway.plist file. The fix should focus on updating this command to correctly preserve the existing configuration.

Recommendation

Apply a workaround by locking the plist file and manually editing it after each update, until a permanent fix can be implemented in the openclaw update command. This approach allows for continued use of the openclaw update command while minimizing the disruption caused by the incorrect regeneration of the plist file.

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