一、升级前:必须做备份(不要跳过)
OpenClaw 当前版本在升级过程中并不保证完全向后兼容,尤其是:
配置文件(openclaw.json) agents / memory plugins 状态
所以第一步一定是:
cp -r ~/.openclaw ~/.openclaw-2026.3.12建议:
用带日期的备份目录 每次升级都保留一份(不要覆盖)
👉 这是你唯一的回滚手段
二、执行升级
官方提供了直接升级命令:
openclaw update
执行后会:
拉取新版本 更新 plugins
三、检查服务是否正常
升级之后,第一优先是确认主服务是否正常。
openclaw doctor
如果有问题,可以直接:
openclaw doctor --fix或者更直接一点:
👉 让 OpenClaw 自己解决
在 dashboard / chat 里问:
“gateway有问题,帮我修一下”
如果dashboard打不开了,可以用命令行来跟它交互
openclaw tui四、检查 plugins(重点坑位)
很多问题其实出在 plugins,而不是主服务。尤其是这次升级破坏了SDK兼容性。
执行:
openclaw plugins doctor
如果异常:
👉 同样不要自己折腾,直接让 OpenClaw 处理:
“plugins有问题,帮我修一下”
五、版本避坑
⚠️ 不要使用 2026.2.22
这个版本问题很多,最重要的是dashboard UI打不开了
👉 推荐版本:2026.2.23-1。整体稳定性明显更好。或者再等等后续版本。
六、微信插件ClawBot
微信反应慢,还没有推出更新版本,所以OpenClaw升级之后插件不能用了。
同样的,让OpenClaw来修复了一下,并把所有修复的内容总结到下面,如果你等不及微信官方,可以试试让OpenClaw自己修复试试。
Here is the complete record of changes made to fix the `openclaw-weixin` plugin (v1.0.3).---## Summary of Changes### ProblemPlugin `openclaw-weixin` v1.0.3 — published ~14 hours before this session — was **broken at compile time** against OpenClaw SDK 2026.3.23. The SDK had undergone a significant migration (bundled plugin SDK → public `openclaw/plugin-sdk/*` subpaths), and the plugin's imports were not updated to match.---### Changes Made#### 1. SDK Import Path Fixes (6 locations)The SDK root (`openclaw/plugin-sdk`) no longer re-exported most subpath modules. All six imports had to be redirected to their correct subpaths.| File | Old Import | New Import ||---|---|---|| `src/channel.ts` | `normalizeAccountId` from `"openclaw/plugin-sdk"` | `openclaw/plugin-sdk/account-id` || `src/auth/accounts.ts` | `normalizeAccountId` from `"openclaw/plugin-sdk"` | `openclaw/plugin-sdk/account-id` || `src/messaging/send.ts` | `stripMarkdown` from `"openclaw/plugin-sdk"` | `openclaw/plugin-sdk/text-runtime` || `src/messaging/process-message.ts` | `createTypingCallbacks` from `"openclaw/plugin-sdk"` | `openclaw/plugin-sdk/channel-runtime` || `src/messaging/process-message.ts` | `resolveSenderCommandAuthorizationWithRuntime`, `resolveDirectDmAuthorizationOutcome` from `"openclaw/plugin-sdk"` | `openclaw/plugin-sdk/command-auth` || `index.ts` | `buildChannelConfigSchema` from `"openclaw/plugin-sdk"` | `openclaw/plugin-sdk/channel-config-schema` |#### 2. Removed SDK Function Replacement (3 locations)`resolvePreferredOpenClawTmpDir` was removed from the SDK with no replacement. Replaced with `os.tmpdir()` in:- `src/channel.ts` — `MEDIA_OUTBOUND_TEMP_DIR` path resolution- `src/util/logger.ts` — main log directory path- `src/messaging/process-message.ts` — same temp dir for media- `src/log-upload.ts` — log upload temp dir#### 3. Missing SDK Function: `withFileLock``src/auth/pairing.ts` imported `withFileLock` from `"openclaw/plugin-sdk"` which no longer exists. Implemented locally inline with the same signature and retry/stale-lock semantics as the removed internal SDK function.#### 4. Missing Dependency: `silk-wasm`The plugin referenced `silk-wasm` as an undeclared dependency (only included transitively). Installed it explicitly:```bashcd ~/.openclaw/extensions/openclaw-weixin && npm install silk-wasm```#### 5. Entry Point RedirectThe plugin's `package.json` pointed to `"./index.ts"` which could not be hot-reloaded reliably by the gateway. Changed to `"./dist/index.js"` (the TypeScript-compiled output) so the gateway can load the fixed code instead of the broken source.#### 6. TypeScript ConfigurationAdded `tsconfig.json` with `exactOptionalPropertyTypes: false` and `skipLibCheck: true`. The plugin had ~100+ strict-optional-type mismatches against the new SDK types — these are type-level incompatibilities, not runtime bugs, and are safe to suppress for a third-party plugin.#### 7. Package `plugins.installs` Entry RemovedThe `plugins.installs` config told OpenClaw to reinstall the plugin from npm on every restart, overwriting all local fixes. Removed with:```bashopenclaw config unset plugins.installs.openclaw-weixin```---### References- OpenClaw SDK migration notice: https://docs.openclaw.ai/plugins/sdk-migration- OpenClaw plugin SDK overview: https://docs.openclaw.ai/plugins/sdk-overview- `openclaw plugin-sdk` exports checked via runtime `node --input-type=module -e "import('openclaw/plugin-sdk/<subpath>')"` in the plugin's node_modules context- npm package: https://www.npmjs.com/package/@tencent-weixin/openclaw-weixin- Maintainers: Tencent employees (amikara, pumpkinxing, jfengjiang, yubingluo, unixliang)- Original bug: `TypeError: (0, _pluginSdk.resolvePreferredOpenClawTmpDir) is not a function`---### Files Modified```~/.openclaw/extensions/openclaw-weixin/src/channel.ts~/.openclaw/extensions/openclaw-weixin/src/auth/accounts.ts~/.openclaw/extensions/openclaw-weixin/src/auth/pairing.ts~/.openclaw/extensions/openclaw-weixin/src/messaging/send.ts~/.openclaw/extensions/openclaw-weixin/src/messaging/process-message.ts~/.openclaw/extensions/openclaw-weixin/src/util/logger.ts~/.openclaw/extensions/openclaw-weixin/src/log-upload.ts~/.openclaw/extensions/openclaw-weixin/index.ts~/.openclaw/extensions/openclaw-weixin/package.json~/.openclaw/extensions/openclaw-weixin/tsconfig.json```### CaveatThese fixes are in `~/.openclaw/extensions/openclaw-weixin/`. If `plugins.installs.openclaw-weixin` is ever restored (e.g., via a config reset), npm will overwrite everything on the next reinstall and the plugin will break again. To prevent this, either keep `plugins.installs` unset, or contribute these changes back to the maintainers so they ship a fixed v1.0.4 on npm.
祝好运!
夜雨聆风