{"id":144,"date":"2026-03-21T22:47:19","date_gmt":"2026-03-21T14:47:19","guid":{"rendered":"https:\/\/pa.yingzhi8.cn\/index.php\/2026\/03\/21\/gateway-troubleshooting\/"},"modified":"2026-03-21T23:28:59","modified_gmt":"2026-03-21T15:28:59","slug":"gateway-troubleshooting","status":"publish","type":"post","link":"https:\/\/pa.yingzhi8.cn\/index.php\/2026\/03\/21\/gateway-troubleshooting\/","title":{"rendered":"\u6545\u969c\u6392\u9664"},"content":{"rendered":"<h1>\u6545\u969c\u6392\u9664<\/h1>\n<h1>\u6545\u969c\u6392\u9664 \ud83d\udd27<\/h1>\n<p>\u5f53 OpenClaw \u51fa\u73b0\u5f02\u5e38\u65f6\uff0c\u4ee5\u4e0b\u662f\u89e3\u51b3\u65b9\u6cd5\u3002<\/p>\n<p>\u5982\u679c\u4f60\u53ea\u60f3\u5feb\u901f\u5206\u7c7b\u95ee\u9898\uff0c\u8bf7\u5148\u67e5\u770b\u5e38\u89c1\u95ee\u9898\u7684<a href=\"\/help\/faq#first-60-seconds-if-somethings-broken\">\u6700\u521d\u7684\u516d\u5341\u79d2<\/a>\u3002\u672c\u9875\u6df1\u5165\u4ecb\u7ecd\u8fd0\u884c\u65f6\u6545\u969c\u548c\u8bca\u65ad\u3002<\/p>\n<p>\u7279\u5b9a\u63d0\u4f9b\u5546\u7684\u5feb\u6377\u65b9\u5f0f\uff1a<a href=\"https:\/\/pa.yingzhi8.cn\/?p=39\">\/\u6e20\u9053s\/troubleshooting<\/a><\/p>\n<h2>\u72b6\u6001\u4e0e\u8bca\u65ad<\/h2>\n<p>\u5feb\u901f\u5206\u7c7b\u547d\u4ee4\uff08\u6309\u987a\u5e8f\uff09\uff1a<\/p>\n<table>\n<thead>\n<tr>\n<th>\u547d\u4ee4<\/th>\n<th>\u5b83\u544a\u8bc9\u4f60\u4ec0\u4e48<\/th>\n<th>\u4f55\u65f6\u4f7f\u7528<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>openclaw status<\/code><\/td>\n<td>\u672c\u5730\u6458\u8981\uff1a\u64cd\u4f5c\u7cfb\u7edf + \u66f4\u65b0\u3001Gateway \u7f51\u5173 \u7f51\u5173\u53ef\u8fbe\u6027\/\u6a21\u5f0f\u3001\u670d\u52a1\u3001\u667a\u80fd\u4f53\/\u4f1a\u8bdd\u3001\u63d0\u4f9b\u5546\u914d\u7f6e\u72b6\u6001<\/td>\n<td>\u9996\u6b21\u68c0\u67e5\uff0c\u5feb\u901f\u6982\u89c8<\/td>\n<\/tr>\n<tr>\n<td><code>openclaw status --all<\/code><\/td>\n<td>\u5b8c\u6574\u672c\u5730\u8bca\u65ad\uff08\u53ea\u8bfb\u3001\u53ef\u7c98\u8d34\u3001\u76f8\u5bf9\u5b89\u5168\uff09\u5305\u62ec\u65e5\u5fd7\u5c3e\u90e8<\/td>\n<td>\u5f53\u4f60\u9700\u8981\u5206\u4eab\u8c03\u8bd5\u62a5\u544a\u65f6<\/td>\n<\/tr>\n<tr>\n<td><code>openclaw status --deep<\/code><\/td>\n<td>\u8fd0\u884c Gateway \u7f51\u5173 \u7f51\u5173\u5065\u5eb7\u68c0\u67e5\uff08\u5305\u62ec\u63d0\u4f9b\u5546\u63a2\u6d4b\uff1b\u9700\u8981\u53ef\u8fbe\u7684 Gateway \u7f51\u5173 \u7f51\u5173\uff09<\/td>\n<td>\u5f53&#8221;\u5df2\u914d\u7f6e&#8221;\u4e0d\u610f\u5473\u7740&#8221;\u6b63\u5e38\u5de5\u4f5c&#8221;\u65f6<\/td>\n<\/tr>\n<tr>\n<td><code>openclaw gateway probe<\/code><\/td>\n<td>Gateway \u7f51\u5173 \u7f51\u5173\u53d1\u73b0 + \u53ef\u8fbe\u6027\uff08\u672c\u5730 + \u8fdc\u7a0b\u76ee\u6807\uff09<\/td>\n<td>\u5f53\u4f60\u6000\u7591\u6b63\u5728\u63a2\u6d4b\u9519\u8bef\u7684 Gateway \u7f51\u5173 \u7f51\u5173\u65f6<\/td>\n<\/tr>\n<tr>\n<td><code>openclaw channels status --probe<\/code><\/td>\n<td>\u5411\u8fd0\u884c\u4e2d\u7684 Gateway \u7f51\u5173 \u7f51\u5173\u67e5\u8be2\u6e20\u9053\u72b6\u6001\uff08\u5e76\u53ef\u9009\u63a2\u6d4b\uff09<\/td>\n<td>\u5f53 Gateway \u7f51\u5173 \u7f51\u5173\u53ef\u8fbe\u4f46\u6e20\u9053\u5f02\u5e38\u65f6<\/td>\n<\/tr>\n<tr>\n<td><code>openclaw gateway status<\/code><\/td>\n<td>\u76d1\u7ba1\u7a0b\u5e8f\u72b6\u6001\uff08launchd\/systemd\/schtasks\uff09\u3001\u8fd0\u884c\u65f6 PID\/\u9000\u51fa\u3001\u6700\u540e\u7684 Gateway \u7f51\u5173 \u7f51\u5173\u9519\u8bef<\/td>\n<td>\u5f53\u670d\u52a1&#8221;\u770b\u8d77\u6765\u5df2\u52a0\u8f7d&#8221;\u4f46\u6ca1\u6709\u8fd0\u884c\u65f6<\/td>\n<\/tr>\n<tr>\n<td><code>openclaw logs --follow<\/code><\/td>\n<td>\u5b9e\u65f6\u65e5\u5fd7\uff08\u8fd0\u884c\u65f6\u95ee\u9898\u7684\u6700\u4f73\u4fe1\u53f7\uff09<\/td>\n<td>\u5f53\u4f60\u9700\u8981\u5b9e\u9645\u7684\u6545\u969c\u539f\u56e0\u65f6<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><strong>\u5206\u4eab\u8f93\u51fa\uff1a<\/strong> \u4f18\u5148\u4f7f\u7528 <code>openclaw status --all<\/code>\uff08\u5b83\u4f1a\u9690\u85cf\u4ee4\u724c\uff09\u3002\u5982\u679c\u4f60\u7c98\u8d34 <code>openclaw status<\/code>\uff0c\u8003\u8651\u5148\u8bbe\u7f6e <code>OPENCLAW_SHOW_SECRETS=0<\/code>\uff08\u4ee4\u724c\u9884\u89c8\uff09\u3002<\/p>\n<p>\u53e6\u8bf7\u53c2\u9605\uff1a<a href=\"https:\/\/pa.yingzhi8.cn\/?p=126\">\u5065\u5eb7\u68c0\u67e5<\/a> \u548c <a href=\"https:\/\/pa.yingzhi8.cn\/?p=172\">\u65e5\u5fd7<\/a>\u3002<\/p>\n<h2>\u5e38\u89c1\u95ee\u9898<\/h2>\n<h3>No API key found for provider &#8220;anthropic&#8221;<\/h3>\n<p>\u8fd9\u610f\u5473\u7740<strong>\u667a\u80fd\u4f53\u7684\u8ba4\u8bc1\u5b58\u50a8\u4e3a\u7a7a<\/strong>\u6216\u7f3a\u5c11 Anthropic \u51ed\u8bc1\u3002<br \/>\n\u8ba4\u8bc1\u662f<strong>\u6bcf\u4e2a\u667a\u80fd\u4f53\u72ec\u7acb\u7684<\/strong>\uff0c\u6240\u4ee5\u65b0\u667a\u80fd\u4f53\u4e0d\u4f1a\u7ee7\u627f\u4e3b\u667a\u80fd\u4f53\u7684\u5bc6\u94a5\u3002<\/p>\n<p>\u4fee\u590d\u9009\u9879\uff1a<\/p>\n<ul>\n<li>\u91cd\u65b0\u8fd0\u884c\u65b0\u624b\u5f15\u5bfc\u5e76\u4e3a\u8be5\u667a\u80fd\u4f53\u9009\u62e9 <strong>Anthropic<\/strong>\u3002<\/li>\n<li>\u6216\u5728 <strong>Gateway \u7f51\u5173 \u7f51\u5173\u4e3b\u673a<\/strong>\u4e0a\u7c98\u8d34 setup-token\uff1a<br \/>\n  <code>bash  theme={\"theme\":{\"light\":\"min-light\",\"dark\":\"min-dark\"}}<br \/>\n  openclaw models auth setup-token --provider anthropic<\/code><\/li>\n<li>\u6216\u5c06 <code>auth-profiles.json<\/code> \u4ece\u4e3b\u667a\u80fd\u4f53\u76ee\u5f55\u590d\u5236\u5230\u65b0\u667a\u80fd\u4f53\u76ee\u5f55\u3002<\/li>\n<\/ul>\n<p>\u9a8c\u8bc1\uff1a<\/p>\n<p>&#8220;`bash  theme={&#8220;theme&#8221;:{&#8220;light&#8221;:&#8221;min-light&#8221;,&#8221;dark&#8221;:&#8221;min-dark&#8221;}}<br \/>\nopenclaw models status<\/p>\n<pre><code>\n### OAuth token refresh failed\uff08Anthropic Claude \u8ba2\u9605\uff09\n\n\u8fd9\u610f\u5473\u7740\u5b58\u50a8\u7684 Anthropic OAuth \u4ee4\u724c\u5df2\u8fc7\u671f\u4e14\u5237\u65b0\u5931\u8d25\u3002\n\u5982\u679c\u4f60\u4f7f\u7528 Claude \u8ba2\u9605\uff08\u65e0 API \u5bc6\u94a5\uff09\uff0c\u6700\u53ef\u9760\u7684\u4fee\u590d\u65b9\u6cd5\u662f\n\u5207\u6362\u5230 **Claude Code setup-token** \u5e76\u5728 **Gateway \u7f51\u5173\u4e3b\u673a**\u4e0a\u7c98\u8d34\u3002\n\n**\u63a8\u8350\uff08setup-token\uff09\uff1a**\n\n```bash  theme={&quot;theme&quot;:{&quot;light&quot;:&quot;min-light&quot;,&quot;dark&quot;:&quot;min-dark&quot;}}\n# \u5728 Gateway \u7f51\u5173\u4e3b\u673a\u4e0a\u8fd0\u884c\uff08\u7c98\u8d34 setup-token\uff09\nopenclaw models auth setup-token --provider anthropic\nopenclaw models status\n<\/code><\/pre>\n<p>\u5982\u679c\u4f60\u5728\u5176\u4ed6\u5730\u65b9\u751f\u6210\u4e86\u4ee4\u724c\uff1a<\/p>\n<p>&#8220;`bash  theme={&#8220;theme&#8221;:{&#8220;light&#8221;:&#8221;min-light&#8221;,&#8221;dark&#8221;:&#8221;min-dark&#8221;}}<br \/>\nopenclaw models auth paste-token &#8211;provider anthropic<br \/>\nopenclaw models status<\/p>\n<pre><code>\n\u66f4\u591a\u8be6\u60c5\uff1a[Anthropic](\/providers\/anthropic) \u548c [OAuth](\/concepts\/oauth)\u3002\n\n### Control UI \u5728 HTTP \u4e0a\u5931\u8d25\uff08&quot;device identity required&quot; \/ &quot;connect failed&quot;\uff09\n\n\u5982\u679c\u4f60\u901a\u8fc7\u7eaf HTTP \u6253\u5f00\u4eea\u8868\u677f\uff08\u4f8b\u5982 `http:\/\/&lt;lan-ip&gt;:18789\/` \u6216\n`http:\/\/&lt;tailscale-ip&gt;:18789\/`\uff09\uff0c\u6d4f\u89c8\u5668\u8fd0\u884c\u5728**\u975e\u5b89\u5168\u4e0a\u4e0b\u6587**\u4e2d\uff0c\n\u4f1a\u963b\u6b62 WebCrypto\uff0c\u56e0\u6b64\u65e0\u6cd5\u751f\u6210\u8bbe\u5907\u8eab\u4efd\u3002\n\n**\u4fee\u590d\uff1a**\n\n* \u4f18\u5148\u901a\u8fc7 [Tailscale Serve](\/gateway\/tailscale) \u4f7f\u7528 HTTPS\u3002\n* \u6216\u5728 Gateway \u7f51\u5173\u4e3b\u673a\u4e0a\u672c\u5730\u6253\u5f00\uff1a`http:\/\/127.0.0.1:18789\/`\u3002\n* \u5982\u679c\u5fc5\u987b\u4f7f\u7528 HTTP\uff0c\u542f\u7528 `gateway.controlUi.allowInsecureAuth: true` \u5e76\n  \u4f7f\u7528 Gateway \u7f51\u5173\u4ee4\u724c\uff08\u4ec5\u4ee4\u724c\uff1b\u65e0\u8bbe\u5907\u8eab\u4efd\/\u914d\u5bf9\uff09\u3002\u53c2\u89c1\n  [Control UI](\/web\/control-ui#insecure-http)\u3002\n\n### CI Secrets Scan Failed\n\n\u8fd9\u610f\u5473\u7740 `detect-secrets` \u53d1\u73b0\u4e86\u5c1a\u672a\u5728\u57fa\u7ebf\u4e2d\u7684\u65b0\u5019\u9009\u9879\u3002\n\u6309\u7167 [\u5bc6\u94a5\u626b\u63cf](\/gateway\/security#secret-scanning-detect-secrets) \u64cd\u4f5c\u3002\n\n### \u670d\u52a1\u5df2\u5b89\u88c5\u4f46\u6ca1\u6709\u8fd0\u884c\n\n\u5982\u679c Gateway \u7f51\u5173\u670d\u52a1\u5df2\u5b89\u88c5\u4f46\u8fdb\u7a0b\u7acb\u5373\u9000\u51fa\uff0c\u670d\u52a1\n\u53ef\u80fd\u663e\u793a&quot;\u5df2\u52a0\u8f7d&quot;\u4f46\u5b9e\u9645\u6ca1\u6709\u8fd0\u884c\u3002\n\n**\u68c0\u67e5\uff1a**\n\n```bash  theme={&quot;theme&quot;:{&quot;light&quot;:&quot;min-light&quot;,&quot;dark&quot;:&quot;min-dark&quot;}}\nopenclaw gateway status\nopenclaw doctor\n<\/code><\/pre>\n<p>Doctor\/service \u5c06\u663e\u793a\u8fd0\u884c\u65f6\u72b6\u6001\uff08PID\/\u6700\u540e\u9000\u51fa\uff09\u548c\u65e5\u5fd7\u63d0\u793a\u3002<\/p>\n<p><strong>\u65e5\u5fd7\uff1a<\/strong><\/p>\n<ul>\n<li>\u4f18\u5148\uff1a<code>openclaw logs --follow<\/code><\/li>\n<li>\u6587\u4ef6\u65e5\u5fd7\uff08\u59cb\u7ec8\uff09\uff1a<code>\/tmp\/openclaw\/openclaw-YYYY-MM-DD.log<\/code>\uff08\u6216\u4f60\u914d\u7f6e\u7684 <code>logging.file<\/code>\uff09<\/li>\n<li>macOS LaunchAgent\uff08\u5982\u679c\u5df2\u5b89\u88c5\uff09\uff1a<code>$OPENCLAW_STATE_DIR\/logs\/gateway.log<\/code> \u548c <code>gateway.err.log<\/code><\/li>\n<li>Linux systemd\uff08\u5982\u679c\u5df2\u5b89\u88c5\uff09\uff1a<code>journalctl --user -u openclaw-gateway[-&lt;profile&gt;].service -n 200 --no-pager<\/code><\/li>\n<li>Windows\uff1a<code>schtasks \/Query \/TN \"OpenClaw Gateway (&lt;profile&gt;)\" \/V \/FO LIST<\/code><\/li>\n<\/ul>\n<p><strong>\u542f\u7528\u66f4\u591a\u65e5\u5fd7\uff1a<\/strong><\/p>\n<ul>\n<li>\u63d0\u9ad8\u6587\u4ef6\u65e5\u5fd7\u8be6\u7ec6\u7a0b\u5ea6\uff08\u6301\u4e45\u5316 JSONL\uff09\uff1a<br \/>\n  <code>json  theme={\"theme\":{\"light\":\"min-light\",\"dark\":\"min-dark\"}}<br \/>\n  { \"logging\": { \"level\": \"debug\" } }<\/code><\/li>\n<li>\u63d0\u9ad8\u63a7\u5236\u53f0\u8be6\u7ec6\u7a0b\u5ea6\uff08\u4ec5 TTY \u8f93\u51fa\uff09\uff1a<br \/>\n  <code>json  theme={\"theme\":{\"light\":\"min-light\",\"dark\":\"min-dark\"}}<br \/>\n  { \"logging\": { \"consoleLevel\": \"debug\", \"consoleStyle\": \"pretty\" } }<\/code><\/li>\n<li>\u5feb\u901f\u63d0\u793a\uff1a<code>--verbose<\/code> \u4ec5\u5f71\u54cd<strong>\u63a7\u5236\u53f0<\/strong>\u8f93\u51fa\u3002\u6587\u4ef6\u65e5\u5fd7\u4ecd\u7531 <code>logging.level<\/code> \u63a7\u5236\u3002<\/li>\n<\/ul>\n<p>\u53c2\u89c1 <a href=\"https:\/\/pa.yingzhi8.cn\/?p=172\">\/logging<\/a> \u4e86\u89e3\u683c\u5f0f\u3001\u914d\u7f6e\u548c\u8bbf\u95ee\u7684\u5b8c\u6574\u6982\u8ff0\u3002<\/p>\n<h3>&#8220;Gateway \u7f51\u5173 start blocked: set \u7f51\u5173.mode=local&#8221;<\/h3>\n<p>\u8fd9\u610f\u5473\u7740\u914d\u7f6e\u5b58\u5728\u4f46 <code>gateway.mode<\/code> \u672a\u8bbe\u7f6e\uff08\u6216\u4e0d\u662f <code>local<\/code>\uff09\uff0c\u6240\u4ee5<br \/>\nGateway \u7f51\u5173 \u7f51\u5173\u62d2\u7edd\u542f\u52a8\u3002<\/p>\n<p><strong>\u4fee\u590d\uff08\u63a8\u8350\uff09\uff1a<\/strong><\/p>\n<ul>\n<li>\u8fd0\u884c\u5411\u5bfc\u5e76\u5c06 Gateway \u7f51\u5173 \u7f51\u5173\u8fd0\u884c\u6a21\u5f0f\u8bbe\u7f6e\u4e3a <strong>Local<\/strong>\uff1a<br \/>\n  <code>bash  theme={\"theme\":{\"light\":\"min-light\",\"dark\":\"min-dark\"}}<br \/>\n  openclaw configure<\/code><\/li>\n<li>\u6216\u76f4\u63a5\u8bbe\u7f6e\uff1a<br \/>\n  <code>bash  theme={\"theme\":{\"light\":\"min-light\",\"dark\":\"min-dark\"}}<br \/>\n  openclaw config set gateway.mode local<\/code><\/li>\n<\/ul>\n<p><strong>\u5982\u679c\u4f60\u6253\u7b97\u8fd0\u884c\u8fdc\u7a0b Gateway \u7f51\u5173 \u7f51\u5173\uff1a<\/strong><\/p>\n<ul>\n<li>\u8bbe\u7f6e\u8fdc\u7a0b URL \u5e76\u4fdd\u6301 <code>gateway.mode=remote<\/code>\uff1a<br \/>\n  <code>bash  theme={\"theme\":{\"light\":\"min-light\",\"dark\":\"min-dark\"}}<br \/>\n  openclaw config set gateway.mode remote<br \/>\n  openclaw config set gateway.remote.url \"wss:\/\/gateway.example.com\"<\/code><\/li>\n<\/ul>\n<p><strong>\u4ec5\u4e34\u65f6\/\u5f00\u53d1\u4f7f\u7528\uff1a<\/strong> \u4f20\u9012 <code>--allow-unconfigured<\/code> \u4ee5\u5728\u6ca1\u6709<br \/>\n<code>gateway.mode=local<\/code> \u7684\u60c5\u51b5\u4e0b\u542f\u52a8 Gateway \u7f51\u5173 \u7f51\u5173\u3002<\/p>\n<p><strong>\u8fd8\u6ca1\u6709\u914d\u7f6e\u6587\u4ef6\uff1f<\/strong> \u8fd0\u884c <code>openclaw setup<\/code> \u521b\u5efa\u521d\u59cb\u914d\u7f6e\uff0c\u7136\u540e\u91cd\u65b0\u8fd0\u884c<br \/>\nGateway \u7f51\u5173 \u7f51\u5173\u3002<\/p>\n<h3>\u670d\u52a1\u73af\u5883\uff08PATH + \u8fd0\u884c\u65f6\uff09<\/h3>\n<p>Gateway \u7f51\u5173 \u7f51\u5173\u670d\u52a1\u4f7f\u7528<strong>\u6700\u5c0f PATH<\/strong> \u8fd0\u884c\u4ee5\u907f\u514d shell\/\u7ba1\u7406\u5668\u7684\u5e72\u6270\uff1a<\/p>\n<ul>\n<li>macOS\uff1a<code>\/opt\/homebrew\/bin<\/code>\u3001<code>\/usr\/local\/bin<\/code>\u3001<code>\/usr\/bin<\/code>\u3001<code>\/bin<\/code><\/li>\n<li>Linux\uff1a<code>\/usr\/local\/bin<\/code>\u3001<code>\/usr\/bin<\/code>\u3001<code>\/bin<\/code><\/li>\n<\/ul>\n<p>\u8fd9\u6709\u610f\u6392\u9664\u7248\u672c\u7ba1\u7406\u5668\uff08nvm\/fnm\/volta\/asdf\uff09\u548c\u5305<br \/>\n\u7ba1\u7406\u5668\uff08pnpm\/npm\uff09\uff0c\u56e0\u4e3a\u670d\u52a1\u4e0d\u52a0\u8f7d\u4f60\u7684 shell \u521d\u59cb\u5316\u3002\u8fd0\u884c\u65f6<br \/>\n\u53d8\u91cf\u5982 <code>DISPLAY<\/code> \u5e94\u8be5\u653e\u5728 <code>~\/.openclaw\/.env<\/code> \u4e2d\uff08\u7531 Gateway \u7f51\u5173 \u7f51\u5173\u65e9\u671f\u52a0\u8f7d\uff09\u3002<br \/>\n\u5728 <code>host=gateway<\/code> \u4e0a\u7684 Exec \u8fd0\u884c\u4f1a\u5c06\u4f60\u7684\u767b\u5f55 shell <code>PATH<\/code> \u5408\u5e76\u5230 exec \u73af\u5883\u4e2d\uff0c<br \/>\n\u6240\u4ee5\u7f3a\u5c11\u7684\u5de5\u5177\u901a\u5e38\u610f\u5473\u7740\u4f60\u7684 shell \u521d\u59cb\u5316\u6ca1\u6709\u5bfc\u51fa\u5b83\u4eec\uff08\u6216\u8bbe\u7f6e<br \/>\n<code>tools.exec.pathPrepend<\/code>\uff09\u3002\u53c2\u89c1 <a href=\"https:\/\/pa.yingzhi8.cn\/?p=282\">\/tools\/exec<\/a>\u3002<\/p>\n<p>WhatsApp + Telegram \u6e20\u9053\u9700\u8981 <strong>Node<\/strong>\uff1b\u4e0d\u652f\u6301 Bun\u3002\u5982\u679c\u4f60\u7684<br \/>\n\u670d\u52a1\u662f\u7528 Bun \u6216\u7248\u672c\u7ba1\u7406\u7684 Node \u8def\u5f84\u5b89\u88c5\u7684\uff0c\u8fd0\u884c <code>openclaw doctor<\/code><br \/>\n\u8fc1\u79fb\u5230\u7cfb\u7edf Node \u5b89\u88c5\u3002<\/p>\n<h3>\u6c99\u7bb1\u4e2d Skill \u7f3a\u5c11 API \u5bc6\u94a5<\/h3>\n<p><strong>\u75c7\u72b6\uff1a<\/strong> Skill \u5728\u4e3b\u673a\u4e0a\u5de5\u4f5c\u4f46\u5728\u6c99\u7bb1\u4e2d\u56e0\u7f3a\u5c11 API \u5bc6\u94a5\u800c\u5931\u8d25\u3002<\/p>\n<p><strong>\u539f\u56e0\uff1a<\/strong> \u6c99\u7bb1 exec \u5728 Docker \u5185\u8fd0\u884c\uff0c<strong>\u4e0d<\/strong>\u7ee7\u627f\u4e3b\u673a <code>process.env<\/code>\u3002<\/p>\n<p><strong>\u4fee\u590d\uff1a<\/strong><\/p>\n<ul>\n<li>\u8bbe\u7f6e <code>agents.defaults.sandbox.docker.env<\/code>\uff08\u6216\u6bcf\u4e2a\u667a\u80fd\u4f53\u7684 <code>agents.list[].sandbox.docker.env<\/code>\uff09<\/li>\n<li>\u6216\u5c06\u5bc6\u94a5\u70d8\u7119\u5230\u4f60\u7684\u81ea\u5b9a\u4e49\u6c99\u7bb1\u955c\u50cf\u4e2d<\/li>\n<li>\u7136\u540e\u8fd0\u884c <code>openclaw sandbox recreate --agent &lt;id&gt;<\/code>\uff08\u6216 <code>--all<\/code>\uff09<\/li>\n<\/ul>\n<h3>\u670d\u52a1\u8fd0\u884c\u4f46\u7aef\u53e3\u672a\u76d1\u542c<\/h3>\n<p>\u5982\u679c\u670d\u52a1\u62a5\u544a<strong>\u6b63\u5728\u8fd0\u884c<\/strong>\u4f46 Gateway \u7f51\u5173 \u7f51\u5173\u7aef\u53e3\u4e0a\u6ca1\u6709\u76d1\u542c\uff0c<br \/>\nGateway \u7f51\u5173 \u7f51\u5173\u53ef\u80fd\u62d2\u7edd\u7ed1\u5b9a\u3002<\/p>\n<p><strong>\u8fd9\u91cc&#8221;\u6b63\u5728\u8fd0\u884c&#8221;\u7684\u542b\u4e49<\/strong><\/p>\n<ul>\n<li><code>Runtime: running<\/code> \u610f\u5473\u7740\u4f60\u7684\u76d1\u7ba1\u7a0b\u5e8f\uff08launchd\/systemd\/schtasks\uff09\u8ba4\u4e3a\u8fdb\u7a0b\u5b58\u6d3b\u3002<\/li>\n<li><code>RPC probe<\/code> \u610f\u5473\u7740 CLI \u5b9e\u9645\u4e0a\u80fd\u591f\u8fde\u63a5\u5230 Gateway \u7f51\u5173 \u7f51\u5173 WebSocket \u5e76\u8c03\u7528 <code>status<\/code>\u3002<\/li>\n<li>\u59cb\u7ec8\u4fe1\u4efb <code>Probe target:<\/code> + <code>Config (service):<\/code> \u4f5c\u4e3a&#8221;\u6211\u4eec\u5b9e\u9645\u5c1d\u8bd5\u4e86\u4ec0\u4e48\uff1f&#8221;\u7684\u4fe1\u606f\u884c\u3002<\/li>\n<\/ul>\n<p><strong>\u68c0\u67e5\uff1a<\/strong><\/p>\n<ul>\n<li><code>gateway.mode<\/code> \u5fc5\u987b\u4e3a <code>local<\/code> \u624d\u80fd\u8fd0\u884c <code>openclaw gateway<\/code> \u548c\u670d\u52a1\u3002<\/li>\n<li>\u5982\u679c\u4f60\u8bbe\u7f6e\u4e86 <code>gateway.mode=remote<\/code>\uff0c<strong>CLI \u9ed8\u8ba4<\/strong>\u4f7f\u7528\u8fdc\u7a0b URL\u3002\u670d\u52a1\u53ef\u80fd\u4ecd\u5728\u672c\u5730\u8fd0\u884c\uff0c\u4f46\u4f60\u7684 CLI \u53ef\u80fd\u5728\u63a2\u6d4b\u9519\u8bef\u7684\u4f4d\u7f6e\u3002\u4f7f\u7528 <code>openclaw gateway status<\/code> \u67e5\u770b\u670d\u52a1\u89e3\u6790\u7684\u7aef\u53e3 + \u63a2\u6d4b\u76ee\u6807\uff08\u6216\u4f20\u9012 <code>--url<\/code>\uff09\u3002<\/li>\n<li><code>openclaw gateway status<\/code> \u548c <code>openclaw doctor<\/code> \u5728\u670d\u52a1\u770b\u8d77\u6765\u6b63\u5728\u8fd0\u884c\u4f46\u7aef\u53e3\u5173\u95ed\u65f6\u4f1a\u663e\u793a\u65e5\u5fd7\u4e2d\u7684<strong>\u6700\u540e Gateway \u7f51\u5173 \u7f51\u5173\u9519\u8bef<\/strong>\u3002<\/li>\n<li>\u975e\u672c\u5730\u56de\u73af\u7ed1\u5b9a\uff08<code>lan<\/code>\/<code>tailnet<\/code>\/<code>custom<\/code>\uff0c\u6216\u672c\u5730\u56de\u73af\u4e0d\u53ef\u7528\u65f6\u7684 <code>auto<\/code>\uff09\u9700\u8981\u8ba4\u8bc1\uff1a<br \/>\n  <code>gateway.auth.token<\/code>\uff08\u6216 <code>OPENCLAW_GATEWAY_TOKEN<\/code>\uff09\u3002<\/li>\n<li><code>gateway.remote.token<\/code> \u4ec5\u7528\u4e8e\u8fdc\u7a0b CLI \u8c03\u7528\uff1b\u5b83<strong>\u4e0d<\/strong>\u542f\u7528\u672c\u5730\u8ba4\u8bc1\u3002<\/li>\n<li><code>gateway.token<\/code> \u88ab\u5ffd\u7565\uff1b\u4f7f\u7528 <code>gateway.auth.token<\/code>\u3002<\/li>\n<\/ul>\n<p><strong>\u5982\u679c <code>openclaw gateway status<\/code> \u663e\u793a\u914d\u7f6e\u4e0d\u5339\u914d<\/strong><\/p>\n<ul>\n<li><code>Config (cli): ...<\/code> \u548c <code>Config (service): ...<\/code> \u901a\u5e38\u5e94\u8be5\u5339\u914d\u3002<\/li>\n<li>\u5982\u679c\u4e0d\u5339\u914d\uff0c\u4f60\u51e0\u4e4e\u80af\u5b9a\u662f\u5728\u7f16\u8f91\u4e00\u4e2a\u914d\u7f6e\u800c\u670d\u52a1\u8fd0\u884c\u7684\u662f\u53e6\u4e00\u4e2a\u3002<\/li>\n<li>\u4fee\u590d\uff1a\u4ece\u4f60\u5e0c\u671b\u670d\u52a1\u4f7f\u7528\u7684\u76f8\u540c <code>--profile<\/code> \/ <code>OPENCLAW_STATE_DIR<\/code> \u91cd\u65b0\u8fd0\u884c <code>openclaw gateway install --force<\/code>\u3002<\/li>\n<\/ul>\n<p><strong>\u5982\u679c <code>openclaw gateway status<\/code> \u62a5\u544a\u670d\u52a1\u914d\u7f6e\u95ee\u9898<\/strong><\/p>\n<ul>\n<li>\u76d1\u7ba1\u7a0b\u5e8f\u914d\u7f6e\uff08launchd\/systemd\/schtasks\uff09\u7f3a\u5c11\u5f53\u524d\u9ed8\u8ba4\u503c\u3002<\/li>\n<li>\u4fee\u590d\uff1a\u8fd0\u884c <code>openclaw doctor<\/code> \u66f4\u65b0\u5b83\uff08\u6216 <code>openclaw gateway install --force<\/code> \u5b8c\u5168\u91cd\u5199\uff09\u3002<\/li>\n<\/ul>\n<p><strong>\u5982\u679c <code>Last gateway error:<\/code> \u63d0\u5230&#8221;refusing to bind \u2026 without auth&#8221;<\/strong><\/p>\n<ul>\n<li>\u4f60\u5c06 <code>gateway.bind<\/code> \u8bbe\u7f6e\u4e3a\u975e\u672c\u5730\u56de\u73af\u6a21\u5f0f\uff08<code>lan<\/code>\/<code>tailnet<\/code>\/<code>custom<\/code>\uff0c\u6216\u672c\u5730\u56de\u73af\u4e0d\u53ef\u7528\u65f6\u7684 <code>auto<\/code>\uff09\u4f46\u6ca1\u6709\u914d\u7f6e\u8ba4\u8bc1\u3002<\/li>\n<li>\u4fee\u590d\uff1a\u8bbe\u7f6e <code>gateway.auth.mode<\/code> + <code>gateway.auth.token<\/code>\uff08\u6216\u5bfc\u51fa <code>OPENCLAW_GATEWAY_TOKEN<\/code>\uff09\u5e76\u91cd\u542f\u670d\u52a1\u3002<\/li>\n<\/ul>\n<p><strong>\u5982\u679c <code>openclaw gateway status<\/code> \u663e\u793a <code>bind=tailnet<\/code> \u4f46\u672a\u627e\u5230 tailnet \u63a5\u53e3<\/strong><\/p>\n<ul>\n<li>Gateway \u7f51\u5173 \u7f51\u5173\u5c1d\u8bd5\u7ed1\u5b9a\u5230 Tailscale IP\uff08100.64.0.0\/10\uff09\u4f46\u5728\u4e3b\u673a\u4e0a\u672a\u68c0\u6d4b\u5230\u3002<\/li>\n<li>\u4fee\u590d\uff1a\u5728\u8be5\u673a\u5668\u4e0a\u542f\u52a8 Tailscale\uff08\u6216\u5c06 <code>gateway.bind<\/code> \u6539\u4e3a <code>loopback<\/code>\/<code>lan<\/code>\uff09\u3002<\/li>\n<\/ul>\n<p><strong>\u5982\u679c <code>Probe note:<\/code> \u8bf4\u63a2\u6d4b\u4f7f\u7528\u672c\u5730\u56de\u73af<\/strong><\/p>\n<ul>\n<li>\u5bf9\u4e8e <code>bind=lan<\/code> \u8fd9\u662f\u9884\u671f\u7684\uff1aGateway \u7f51\u5173 \u7f51\u5173\u76d1\u542c <code>0.0.0.0<\/code>\uff08\u6240\u6709\u63a5\u53e3\uff09\uff0c\u672c\u5730\u56de\u73af\u4ecd\u5e94\u672c\u5730\u8fde\u63a5\u3002<\/li>\n<li>\u5bf9\u4e8e\u8fdc\u7a0b\u5ba2\u6237\u7aef\uff0c\u4f7f\u7528\u771f\u5b9e\u7684 LAN IP\uff08\u4e0d\u662f <code>0.0.0.0<\/code>\uff09\u52a0\u7aef\u53e3\uff0c\u5e76\u8bf7\u786e\u4fdd\u914d\u7f6e\u4e86\u8ba4\u8bc1\u3002<\/li>\n<\/ul>\n<h3>\u5730\u5740\u5df2\u88ab\u4f7f\u7528\uff08\u7aef\u53e3 18789\uff09<\/h3>\n<p>\u8fd9\u610f\u5473\u7740\u67d0\u4e9b\u4e1c\u897f\u5df2\u7ecf\u5728 Gateway \u7f51\u5173 \u7f51\u5173\u7aef\u53e3\u4e0a\u76d1\u542c\u3002<\/p>\n<p><strong>\u68c0\u67e5\uff1a<\/strong><\/p>\n<p>&#8220;`bash  theme={&#8220;theme&#8221;:{&#8220;light&#8221;:&#8221;min-light&#8221;,&#8221;dark&#8221;:&#8221;min-dark&#8221;}}<br \/>\nopenclaw \u7f51\u5173 status<\/p>\n<pre><code>\n\u5b83\u5c06\u663e\u793a\u76d1\u542c\u5668\u548c\u53ef\u80fd\u7684\u539f\u56e0\uff08Gateway \u7f51\u5173\u5df2\u5728\u8fd0\u884c\u3001SSH \u96a7\u9053\uff09\u3002\n\u5982\u679c\u9700\u8981\uff0c\u505c\u6b62\u670d\u52a1\u6216\u9009\u62e9\u4e0d\u540c\u7684\u7aef\u53e3\u3002\n\n### \u68c0\u6d4b\u5230\u989d\u5916\u7684\u5de5\u4f5c\u533a\u6587\u4ef6\u5939\n\n\u5982\u679c\u4f60\u4ece\u65e7\u7248\u672c\u5347\u7ea7\uff0c\u4f60\u7684\u78c1\u76d8\u4e0a\u53ef\u80fd\u4ecd\u6709 `~\/openclaw`\u3002\n\u591a\u4e2a\u5de5\u4f5c\u533a\u76ee\u5f55\u53ef\u80fd\u5bfc\u81f4\u4ee4\u4eba\u56f0\u60d1\u7684\u8ba4\u8bc1\u6216\u72b6\u6001\u6f02\u79fb\uff0c\u56e0\u4e3a\n\u53ea\u6709\u4e00\u4e2a\u5de5\u4f5c\u533a\u662f\u6d3b\u52a8\u7684\u3002\n\n**\u4fee\u590d\uff1a** \u4fdd\u7559\u5355\u4e2a\u6d3b\u52a8\u5de5\u4f5c\u533a\u5e76\u5f52\u6863\/\u5220\u9664\u5176\u4f59\u7684\u3002\u53c2\u89c1\n[\u667a\u80fd\u4f53\u5de5\u4f5c\u533a](\/concepts\/agent-workspace#extra-workspace-folders)\u3002\n\n### \u4e3b\u804a\u5929\u5728\u6c99\u7bb1\u5de5\u4f5c\u533a\u4e2d\u8fd0\u884c\n\n\u75c7\u72b6\uff1a`pwd` \u6216\u6587\u4ef6\u5de5\u5177\u663e\u793a `~\/.openclaw\/sandboxes\/...` \u5373\u4f7f\u4f60\n\u671f\u671b\u7684\u662f\u4e3b\u673a\u5de5\u4f5c\u533a\u3002\n\n**\u539f\u56e0\uff1a** `agents.defaults.sandbox.mode: &quot;non-main&quot;` \u57fa\u4e8e `session.mainKey`\uff08\u9ed8\u8ba4 `&quot;main&quot;`\uff09\u5224\u65ad\u3002\n\u7fa4\u7ec4\/\u6e20\u9053\u4f1a\u8bdd\u4f7f\u7528\u5b83\u4eec\u81ea\u5df1\u7684\u952e\uff0c\u6240\u4ee5\u5b83\u4eec\u88ab\u89c6\u4e3a\u975e\u4e3b\u4f1a\u8bdd\u5e76\n\u83b7\u5f97\u6c99\u7bb1\u5de5\u4f5c\u533a\u3002\n\n**\u4fee\u590d\u9009\u9879\uff1a**\n\n* \u5982\u679c\u4f60\u60f3\u4e3a\u667a\u80fd\u4f53\u4f7f\u7528\u4e3b\u673a\u5de5\u4f5c\u533a\uff1a\u8bbe\u7f6e `agents.list[].sandbox.mode: &quot;off&quot;`\u3002\n* \u5982\u679c\u4f60\u60f3\u5728\u6c99\u7bb1\u5185\u8bbf\u95ee\u4e3b\u673a\u5de5\u4f5c\u533a\uff1a\u4e3a\u8be5\u667a\u80fd\u4f53\u8bbe\u7f6e `workspaceAccess: &quot;rw&quot;`\u3002\n\n### &quot;Agent was aborted&quot;\n\n\u667a\u80fd\u4f53\u5728\u54cd\u5e94\u4e2d\u9014\u88ab\u4e2d\u65ad\u3002\n\n**\u539f\u56e0\uff1a**\n\n* \u7528\u6237\u53d1\u9001\u4e86 `stop`\u3001`abort`\u3001`esc`\u3001`wait` \u6216 `exit`\n* \u8d85\u65f6\u8d85\u9650\n* \u8fdb\u7a0b\u5d29\u6e83\n\n**\u4fee\u590d\uff1a** \u53ea\u9700\u53d1\u9001\u53e6\u4e00\u6761\u6d88\u606f\u3002\u4f1a\u8bdd\u5c06\u7ee7\u7eed\u3002\n\n### &quot;Agent failed before reply: Unknown model: anthropic\/claude-haiku-3-5&quot;\n\nOpenClaw \u6709\u610f\u62d2\u7edd**\u8f83\u65e7\/\u4e0d\u5b89\u5168\u7684\u6a21\u578b**\uff08\u5c24\u5176\u662f\u90a3\u4e9b\u66f4\u5bb9\u6613\u53d7\u5230\u63d0\u793a\u8bcd\u6ce8\u5165\u653b\u51fb\u7684\u6a21\u578b\uff09\u3002\u5982\u679c\u4f60\u770b\u5230\u6b64\u9519\u8bef\uff0c\u8be5\u6a21\u578b\u540d\u79f0\u5df2\u4e0d\u518d\u652f\u6301\u3002\n\n**\u4fee\u590d\uff1a**\n\n* \u4e3a\u63d0\u4f9b\u5546\u9009\u62e9**\u6700\u65b0**\u6a21\u578b\u5e76\u66f4\u65b0\u4f60\u7684\u914d\u7f6e\u6216\u6a21\u578b\u522b\u540d\u3002\n* \u5982\u679c\u4f60\u4e0d\u786e\u5b9a\u54ea\u4e9b\u6a21\u578b\u53ef\u7528\uff0c\u8fd0\u884c `openclaw models list` \u6216\n  `openclaw models scan` \u5e76\u9009\u62e9\u4e00\u4e2a\u652f\u6301\u7684\u6a21\u578b\u3002\n* \u68c0\u67e5 Gateway \u7f51\u5173\u65e5\u5fd7\u4ee5\u83b7\u53d6\u8be6\u7ec6\u7684\u5931\u8d25\u539f\u56e0\u3002\n\n\u53e6\u8bf7\u53c2\u9605\uff1a[\u6a21\u578b CLI](\/cli\/models) \u548c [\u6a21\u578b\u63d0\u4f9b\u5546](\/concepts\/model-providers)\u3002\n\n### \u6d88\u606f\u672a\u89e6\u53d1\n\n**\u68c0\u67e5 1\uff1a** \u53d1\u9001\u8005\u662f\u5426\u5728\u767d\u540d\u5355\u4e2d\uff1f\n\n```bash  theme={&quot;theme&quot;:{&quot;light&quot;:&quot;min-light&quot;,&quot;dark&quot;:&quot;min-dark&quot;}}\nopenclaw status\n<\/code><\/pre>\n<p>\u5728\u8f93\u51fa\u4e2d\u67e5\u627e <code>AllowFrom: ...<\/code>\u3002<\/p>\n<p><strong>\u68c0\u67e5 2\uff1a<\/strong> \u5bf9\u4e8e\u7fa4\u804a\uff0c\u662f\u5426\u9700\u8981\u63d0\u53ca\uff1f<\/p>\n<p>&#8220;`bash  theme={&#8220;theme&#8221;:{&#8220;light&#8221;:&#8221;min-light&#8221;,&#8221;dark&#8221;:&#8221;min-dark&#8221;}}<\/p>\n<h1>\u6d88\u606f\u5fc5\u987b\u5339\u914d mentionPatterns \u6216\u663e\u5f0f\u63d0\u53ca\uff1b\u9ed8\u8ba4\u503c\u5728\u6e20\u9053 groups\/guilds \u4e2d\u3002<\/h1>\n<h1>\u591a\u667a\u80fd\u4f53\uff1a<code>agents.list[].groupChat.mentionPatterns<\/code> \u8986\u76d6\u5168\u5c40\u6a21\u5f0f\u3002<\/h1>\n<p>grep -n &#8220;agents|groupChat|mentionPatterns|\u6e20\u9053s.whatsapp.groups|\u6e20\u9053s.telegram.groups|\u6e20\u9053s.imessage.groups|\u6e20\u9053s.discord.guilds&#8221;<br \/>\n  &#8220;${OPENCLAW_CONFIG_PATH:-$HOME\/.openclaw\/openclaw.json}&#8221;<\/p>\n<pre><code>\n**\u68c0\u67e5 3\uff1a** \u68c0\u67e5\u65e5\u5fd7\n\n```bash  theme={&quot;theme&quot;:{&quot;light&quot;:&quot;min-light&quot;,&quot;dark&quot;:&quot;min-dark&quot;}}\nopenclaw logs --follow\n# \u6216\u8005\u5982\u679c\u4f60\u60f3\u5feb\u901f\u8fc7\u6ee4\uff1a\ntail -f &quot;$(ls -t \/tmp\/openclaw\/openclaw-*.log | head -1)&quot; | grep &quot;blocked\\|skip\\|unauthorized&quot;\n<\/code><\/pre>\n<h3>\u914d\u5bf9\u7801\u672a\u5230\u8fbe<\/h3>\n<p>\u5982\u679c <code>dmPolicy<\/code> \u662f <code>pairing<\/code>\uff0c\u672a\u77e5\u53d1\u9001\u8005\u5e94\u8be5\u6536\u5230\u4e00\u4e2a\u4ee3\u7801\uff0c\u4ed6\u4eec\u7684\u6d88\u606f\u5728\u6279\u51c6\u524d\u4f1a\u88ab\u5ffd\u7565\u3002<\/p>\n<p><strong>\u68c0\u67e5 1\uff1a<\/strong> \u662f\u5426\u5df2\u6709\u5f85\u5904\u7406\u7684\u8bf7\u6c42\u5728\u7b49\u5f85\uff1f<\/p>\n<p>&#8220;`bash  theme={&#8220;theme&#8221;:{&#8220;light&#8221;:&#8221;min-light&#8221;,&#8221;dark&#8221;:&#8221;min-dark&#8221;}}<br \/>\nopenclaw pairing list <\/p>\n<pre><code>\n\u5f85\u5904\u7406\u7684\u79c1\u4fe1\u914d\u5bf9\u8bf7\u6c42\u9ed8\u8ba4\u6bcf\u4e2a\u6e20\u9053\u4e0a\u9650\u4e3a **3 \u4e2a**\u3002\u5982\u679c\u5217\u8868\u5df2\u6ee1\uff0c\u65b0\u8bf7\u6c42\u5c06\u4e0d\u4f1a\u751f\u6210\u4ee3\u7801\uff0c\u76f4\u5230\u4e00\u4e2a\u88ab\u6279\u51c6\u6216\u8fc7\u671f\u3002\n\n**\u68c0\u67e5 2\uff1a** \u8bf7\u6c42\u662f\u5426\u5df2\u521b\u5efa\u4f46\u672a\u53d1\u9001\u56de\u590d\uff1f\n\n```bash  theme={&quot;theme&quot;:{&quot;light&quot;:&quot;min-light&quot;,&quot;dark&quot;:&quot;min-dark&quot;}}\nopenclaw logs --follow | grep &quot;pairing request&quot;\n<\/code><\/pre>\n<p><strong>\u68c0\u67e5 3\uff1a<\/strong> \u786e\u8ba4\u8be5\u6e20\u9053\u7684 <code>dmPolicy<\/code> \u4e0d\u662f <code>open<\/code>\/<code>allowlist<\/code>\u3002<\/p>\n<h3>\u56fe\u7247 + \u63d0\u53ca\u4e0d\u5de5\u4f5c<\/h3>\n<p>\u5df2\u77e5\u95ee\u9898\uff1a\u5f53\u4f60\u53d1\u9001\u53ea\u6709\u63d0\u53ca\u7684\u56fe\u7247\uff08\u6ca1\u6709\u5176\u4ed6\u6587\u5b57\uff09\u65f6\uff0cWhatsApp \u6709\u65f6\u4e0d\u5305\u542b\u63d0\u53ca\u5143\u6570\u636e\u3002<\/p>\n<p><strong>\u53d8\u901a\u65b9\u6cd5\uff1a<\/strong> \u5728\u63d0\u53ca\u65f6\u6dfb\u52a0\u4e00\u4e9b\u6587\u5b57\uff1a<\/p>\n<ul>\n<li>\u274c <code>@openclaw<\/code> + \u56fe\u7247<\/li>\n<li>\u2705 <code>@openclaw check this<\/code> + \u56fe\u7247<\/li>\n<\/ul>\n<h3>\u4f1a\u8bdd\u672a\u6062\u590d<\/h3>\n<p><strong>\u68c0\u67e5 1\uff1a<\/strong> \u4f1a\u8bdd\u6587\u4ef6\u662f\u5426\u5b58\u5728\uff1f<\/p>\n<p>&#8220;`bash  theme={&#8220;theme&#8221;:{&#8220;light&#8221;:&#8221;min-light&#8221;,&#8221;dark&#8221;:&#8221;min-dark&#8221;}}<br \/>\nls -la ~\/.openclaw\/agents\/\/sessions\/<\/p>\n<pre><code>\n**\u68c0\u67e5 2\uff1a** \u91cd\u7f6e\u7a97\u53e3\u662f\u5426\u592a\u77ed\uff1f\n\n```json  theme={&quot;theme&quot;:{&quot;light&quot;:&quot;min-light&quot;,&quot;dark&quot;:&quot;min-dark&quot;}}\n{\n  &quot;session&quot;: {\n    &quot;reset&quot;: {\n      &quot;mode&quot;: &quot;daily&quot;,\n      &quot;atHour&quot;: 4,\n      &quot;idleMinutes&quot;: 10080 \/\/ 7 \u5929\n    }\n  }\n}\n<\/code><\/pre>\n<p><strong>\u68c0\u67e5 3\uff1a<\/strong> \u662f\u5426\u6709\u4eba\u53d1\u9001\u4e86 <code>\/new<\/code>\u3001<code>\/reset<\/code> \u6216\u91cd\u7f6e\u89e6\u53d1\u5668\uff1f<\/p>\n<h3>\u667a\u80fd\u4f53\u8d85\u65f6<\/h3>\n<p>\u9ed8\u8ba4\u8d85\u65f6\u662f 30 \u5206\u949f\u3002\u5bf9\u4e8e\u957f\u4efb\u52a1\uff1a<\/p>\n<p>&#8220;`json  theme={&#8220;theme&#8221;:{&#8220;light&#8221;:&#8221;min-light&#8221;,&#8221;dark&#8221;:&#8221;min-dark&#8221;}}<br \/>\n{<br \/>\n  &#8220;reply&#8221;: {<br \/>\n    &#8220;timeoutSeconds&#8221;: 3600 \/\/ 1 \u5c0f\u65f6<br \/>\n  }<br \/>\n}<\/p>\n<pre><code>\n\u6216\u4f7f\u7528 `process` \u5de5\u5177\u5728\u540e\u53f0\u8fd0\u884c\u957f\u547d\u4ee4\u3002\n\n### WhatsApp \u65ad\u5f00\u8fde\u63a5\n\n```bash  theme={&quot;theme&quot;:{&quot;light&quot;:&quot;min-light&quot;,&quot;dark&quot;:&quot;min-dark&quot;}}\n# \u68c0\u67e5\u672c\u5730\u72b6\u6001\uff08\u51ed\u8bc1\u3001\u4f1a\u8bdd\u3001\u6392\u961f\u4e8b\u4ef6\uff09\nopenclaw status\n# \u63a2\u6d4b\u8fd0\u884c\u4e2d\u7684 Gateway \u7f51\u5173 + \u6e20\u9053\uff08WA \u8fde\u63a5 + Telegram + Discord API\uff09\nopenclaw status --deep\n\n# \u67e5\u770b\u6700\u8fd1\u7684\u8fde\u63a5\u4e8b\u4ef6\nopenclaw logs --limit 200 | grep &quot;connection\\|disconnect\\|logout&quot;\n<\/code><\/pre>\n<p><strong>\u4fee\u590d\uff1a<\/strong> \u901a\u5e38\u5728 Gateway \u7f51\u5173 \u7f51\u5173\u8fd0\u884c\u540e\u4f1a\u81ea\u52a8\u91cd\u8fde\u3002\u5982\u679c\u5361\u4f4f\uff0c\u91cd\u542f Gateway \u7f51\u5173 \u7f51\u5173\u8fdb\u7a0b\uff08\u65e0\u8bba\u4f60\u5982\u4f55\u76d1\u7ba1\u5b83\uff09\uff0c\u6216\u4f7f\u7528\u8be6\u7ec6\u8f93\u51fa\u624b\u52a8\u8fd0\u884c\uff1a<\/p>\n<p>&#8220;`bash  theme={&#8220;theme&#8221;:{&#8220;light&#8221;:&#8221;min-light&#8221;,&#8221;dark&#8221;:&#8221;min-dark&#8221;}}<br \/>\nopenclaw \u7f51\u5173 &#8211;verbose<\/p>\n<pre><code>\n\u5982\u679c\u4f60\u5df2\u767b\u51fa\/\u53d6\u6d88\u5173\u8054\uff1a\n\n```bash  theme={&quot;theme&quot;:{&quot;light&quot;:&quot;min-light&quot;,&quot;dark&quot;:&quot;min-dark&quot;}}\nopenclaw channels logout\ntrash &quot;${OPENCLAW_STATE_DIR:-$HOME\/.openclaw}\/credentials&quot; # \u5982\u679c logout \u65e0\u6cd5\u5b8c\u5168\u6e05\u9664\u6240\u6709\u5185\u5bb9\nopenclaw channels login --verbose       # \u91cd\u65b0\u626b\u63cf\u4e8c\u7ef4\u7801\n<\/code><\/pre>\n<h3>\u5a92\u4f53\u53d1\u9001\u5931\u8d25<\/h3>\n<p><strong>\u68c0\u67e5 1\uff1a<\/strong> \u6587\u4ef6\u8def\u5f84\u662f\u5426\u6709\u6548\uff1f<\/p>\n<p>&#8220;`bash  theme={&#8220;theme&#8221;:{&#8220;light&#8221;:&#8221;min-light&#8221;,&#8221;dark&#8221;:&#8221;min-dark&#8221;}}<br \/>\nls -la \/path\/to\/your\/image.jpg<\/p>\n<pre><code>\n**\u68c0\u67e5 2\uff1a** \u662f\u5426\u592a\u5927\uff1f\n\n* \u56fe\u7247\uff1a\u6700\u5927 6MB\n* \u97f3\u9891\/\u89c6\u9891\uff1a\u6700\u5927 16MB\n* \u6587\u6863\uff1a\u6700\u5927 100MB\n\n**\u68c0\u67e5 3\uff1a** \u68c0\u67e5\u5a92\u4f53\u65e5\u5fd7\n\n```bash  theme={&quot;theme&quot;:{&quot;light&quot;:&quot;min-light&quot;,&quot;dark&quot;:&quot;min-dark&quot;}}\ngrep &quot;media\\|fetch\\|download&quot; &quot;$(ls -t \/tmp\/openclaw\/openclaw-*.log | head -1)&quot; | tail -20\n<\/code><\/pre>\n<h3>\u9ad8\u5185\u5b58\u4f7f\u7528<\/h3>\n<p>OpenClaw \u5728\u5185\u5b58\u4e2d\u4fdd\u7559\u5bf9\u8bdd\u5386\u53f2\u3002<\/p>\n<p><strong>\u4fee\u590d\uff1a<\/strong> \u5b9a\u671f\u91cd\u542f\u6216\u8bbe\u7f6e\u4f1a\u8bdd\u9650\u5236\uff1a<\/p>\n<p>&#8220;`json  theme={&#8220;theme&#8221;:{&#8220;light&#8221;:&#8221;min-light&#8221;,&#8221;dark&#8221;:&#8221;min-dark&#8221;}}<br \/>\n{<br \/>\n  &#8220;session&#8221;: {<br \/>\n    &#8220;historyLimit&#8221;: 100 \/\/ \u4fdd\u7559\u7684\u6700\u5927\u6d88\u606f\u6570<br \/>\n  }<br \/>\n}<\/p>\n<pre><code>\n## \u5e38\u89c1\u6545\u969c\u6392\u9664\n\n### &quot;Gateway won't start \u2014 configuration invalid&quot;\n\n\u5f53\u914d\u7f6e\u5305\u542b\u672a\u77e5\u952e\u3001\u683c\u5f0f\u9519\u8bef\u7684\u503c\u6216\u65e0\u6548\u7c7b\u578b\u65f6\uff0cOpenClaw \u73b0\u5728\u62d2\u7edd\u542f\u52a8\u3002\n\u8fd9\u662f\u4e3a\u4e86\u5b89\u5168\u800c\u6545\u610f\u8bbe\u8ba1\u7684\u3002\n\n\u7528 Doctor \u4fee\u590d\uff1a\n\n```bash  theme={&quot;theme&quot;:{&quot;light&quot;:&quot;min-light&quot;,&quot;dark&quot;:&quot;min-dark&quot;}}\nopenclaw doctor\nopenclaw doctor --fix\n<\/code><\/pre>\n<p>\u6ce8\u610f\u4e8b\u9879\uff1a<\/p>\n<ul>\n<li><code>openclaw doctor<\/code> \u62a5\u544a\u6bcf\u4e2a\u65e0\u6548\u6761\u76ee\u3002<\/li>\n<li><code>openclaw doctor --fix<\/code> \u5e94\u7528\u8fc1\u79fb\/\u4fee\u590d\u5e76\u91cd\u5199\u914d\u7f6e\u3002<\/li>\n<li>\u8bca\u65ad\u547d\u4ee4\u5982 <code>openclaw logs<\/code>\u3001<code>openclaw health<\/code>\u3001<code>openclaw status<\/code>\u3001<code>openclaw gateway status<\/code> \u548c <code>openclaw gateway probe<\/code> \u5373\u4f7f\u914d\u7f6e\u65e0\u6548\u4e5f\u80fd\u8fd0\u884c\u3002<\/li>\n<\/ul>\n<h3>&#8220;All models failed&#8221; \u2014 \u6211\u5e94\u8be5\u9996\u5148\u68c0\u67e5\u4ec0\u4e48\uff1f<\/h3>\n<ul>\n<li><strong>\u51ed\u8bc1<\/strong>\u5b58\u5728\u4e8e\u6b63\u5728\u5c1d\u8bd5\u7684\u63d0\u4f9b\u5546\uff08\u8ba4\u8bc1\u914d\u7f6e\u6587\u4ef6 + \u73af\u5883\u53d8\u91cf\uff09\u3002<\/li>\n<li><strong>\u6a21\u578b\u8def\u7531<\/strong>\uff1a\u786e\u8ba4 <code>agents.defaults.model.primary<\/code> \u548c\u56de\u9000\u662f\u4f60\u53ef\u4ee5\u8bbf\u95ee\u7684\u6a21\u578b\u3002<\/li>\n<li><code>\/tmp\/openclaw\/\u2026<\/code> \u4e2d\u7684 <strong>Gateway \u7f51\u5173 \u7f51\u5173\u65e5\u5fd7<\/strong>\u4ee5\u83b7\u53d6\u786e\u5207\u7684\u63d0\u4f9b\u5546\u9519\u8bef\u3002<\/li>\n<li><strong>\u6a21\u578b\u72b6\u6001<\/strong>\uff1a\u4f7f\u7528 <code>\/model status<\/code>\uff08\u804a\u5929\uff09\u6216 <code>openclaw models status<\/code>\uff08CLI\uff09\u3002<\/li>\n<\/ul>\n<h3>\u6211\u5728\u6211\u7684\u4e2a\u4eba WhatsApp \u53f7\u7801\u4e0a\u8fd0\u884c \u2014 \u4e3a\u4ec0\u4e48\u81ea\u804a\u5929\u5f88\u5947\u602a\uff1f<\/h3>\n<p>\u542f\u7528\u81ea\u804a\u5929\u6a21\u5f0f\u5e76\u5c06\u4f60\u81ea\u5df1\u7684\u53f7\u7801\u52a0\u5165\u767d\u540d\u5355\uff1a<\/p>\n<p>&#8220;`json5  theme={&#8220;theme&#8221;:{&#8220;light&#8221;:&#8221;min-light&#8221;,&#8221;dark&#8221;:&#8221;min-dark&#8221;}}<br \/>\n{<br \/>\n  \u6e20\u9053s: {<br \/>\n    whatsapp: {<br \/>\n      selfChatMode: true,<br \/>\n      dmPolicy: &#8220;allowlist&#8221;,<br \/>\n      allowFrom: [&#8220;+15555550123&#8221;],<br \/>\n    },<br \/>\n  },<br \/>\n}<\/p>\n<pre><code>\n\u53c2\u89c1 [WhatsApp \u8bbe\u7f6e](\/channels\/whatsapp)\u3002\n\n### WhatsApp \u5c06\u6211\u767b\u51fa\u3002\u5982\u4f55\u91cd\u65b0\u8ba4\u8bc1\uff1f\n\n\u518d\u6b21\u8fd0\u884c\u767b\u5f55\u547d\u4ee4\u5e76\u626b\u63cf\u4e8c\u7ef4\u7801\uff1a\n\n```bash  theme={&quot;theme&quot;:{&quot;light&quot;:&quot;min-light&quot;,&quot;dark&quot;:&quot;min-dark&quot;}}\nopenclaw channels login\n<\/code><\/pre>\n<h3><code>main<\/code> \u4e0a\u7684\u6784\u5efa\u9519\u8bef \u2014 \u6807\u51c6\u4fee\u590d\u8def\u5f84\u662f\u4ec0\u4e48\uff1f<\/h3>\n<ol>\n<li><code>git pull origin main &amp;&amp; pnpm install<\/code><\/li>\n<li><code>openclaw doctor<\/code><\/li>\n<li>\u68c0\u67e5 GitHub issues \u6216 Discord<\/li>\n<li>\u4e34\u65f6\u53d8\u901a\u65b9\u6cd5\uff1a\u68c0\u51fa\u8f83\u65e7\u7684\u63d0\u4ea4<\/li>\n<\/ol>\n<h3>npm install \u5931\u8d25\uff08allow-build-scripts \/ \u7f3a\u5c11 tar \u6216 yargs\uff09\u3002\u73b0\u5728\u600e\u4e48\u529e\uff1f<\/h3>\n<p>\u5982\u679c\u4f60\u4ece\u6e90\u4ee3\u7801\u8fd0\u884c\uff0c\u4f7f\u7528\u4ed3\u5e93\u7684\u5305\u7ba1\u7406\u5668\uff1a<strong>pnpm<\/strong>\uff08\u9996\u9009\uff09\u3002<br \/>\n\u4ed3\u5e93\u58f0\u660e\u4e86 <code>packageManager: \"pnpm@\u2026\"<\/code>\u3002<\/p>\n<p>\u5178\u578b\u6062\u590d\uff1a<\/p>\n<p>&#8220;`bash  theme={&#8220;theme&#8221;:{&#8220;light&#8221;:&#8221;min-light&#8221;,&#8221;dark&#8221;:&#8221;min-dark&#8221;}}<br \/>\ngit status   # \u8bf7\u786e\u4fdd\u4f60\u5728\u4ed3\u5e93\u6839\u76ee\u5f55<br \/>\npnpm install<br \/>\npnpm build<br \/>\nopenclaw doctor<br \/>\nopenclaw \u7f51\u5173 restart<\/p>\n<pre><code>\n\u539f\u56e0\uff1apnpm \u662f\u6b64\u4ed3\u5e93\u914d\u7f6e\u7684\u5305\u7ba1\u7406\u5668\u3002\n\n### \u5982\u4f55\u5728 git \u5b89\u88c5\u548c npm \u5b89\u88c5\u4e4b\u95f4\u5207\u6362\uff1f\n\n\u4f7f\u7528**\u7f51\u7ad9\u5b89\u88c5\u7a0b\u5e8f**\u5e76\u901a\u8fc7\u6807\u5fd7\u9009\u62e9\u5b89\u88c5\u65b9\u6cd5\u3002\u5b83\n\u539f\u5730\u5347\u7ea7\u5e76\u91cd\u5199 Gateway \u7f51\u5173\u670d\u52a1\u4ee5\u6307\u5411\u65b0\u5b89\u88c5\u3002\n\n\u5207\u6362**\u5230 git \u5b89\u88c5**\uff1a\n\n```bash  theme={&quot;theme&quot;:{&quot;light&quot;:&quot;min-light&quot;,&quot;dark&quot;:&quot;min-dark&quot;}}\ncurl -fsSL https:\/\/openclaw.ai\/install.sh | bash -s -- --install-method git --no-onboard\n<\/code><\/pre>\n<p>\u5207\u6362<strong>\u5230 npm \u5168\u5c40<\/strong>\uff1a<\/p>\n<p>&#8220;`bash  theme={&#8220;theme&#8221;:{&#8220;light&#8221;:&#8221;min-light&#8221;,&#8221;dark&#8221;:&#8221;min-dark&#8221;}}<br \/>\ncurl -fsSL https:\/\/openclaw.ai\/install.sh | bash<\/p>\n<pre><code>\n\u6ce8\u610f\u4e8b\u9879\uff1a\n\n* git \u6d41\u7a0b\u4ec5\u5728\u4ed3\u5e93\u5e72\u51c0\u65f6\u624d rebase\u3002\u5148\u63d0\u4ea4\u6216 stash \u66f4\u6539\u3002\n* \u5207\u6362\u540e\uff0c\u8fd0\u884c\uff1a\n  ```bash  theme={&quot;theme&quot;:{&quot;light&quot;:&quot;min-light&quot;,&quot;dark&quot;:&quot;min-dark&quot;}}\n  openclaw doctor\n  openclaw gateway restart\n  ```\n\n### Telegram \u5206\u5757\u6d41\u5f0f\u4f20\u8f93\u6ca1\u6709\u5728\u5de5\u5177\u8c03\u7528\u4e4b\u95f4\u5206\u5272\u6587\u672c\u3002\u4e3a\u4ec0\u4e48\uff1f\n\n\u5206\u5757\u6d41\u5f0f\u4f20\u8f93\u53ea\u53d1\u9001**\u5df2\u5b8c\u6210\u7684\u6587\u672c\u5757**\u3002\u4f60\u770b\u5230\u5355\u6761\u6d88\u606f\u7684\u5e38\u89c1\u539f\u56e0\uff1a\n\n* `agents.defaults.blockStreamingDefault` \u4ecd\u7136\u662f `&quot;off&quot;`\u3002\n* `channels.telegram.blockStreaming` \u8bbe\u7f6e\u4e3a `false`\u3002\n* `channels.telegram.streamMode` \u662f `partial` \u6216 `block` **\u4e14\u8349\u7a3f\u6d41\u5f0f\u4f20\u8f93\u5904\u4e8e\u6d3b\u52a8\u72b6\u6001**\n  \uff08\u79c1\u804a + \u8bdd\u9898\uff09\u3002\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u8349\u7a3f\u6d41\u5f0f\u4f20\u8f93\u4f1a\u7981\u7528\u5206\u5757\u6d41\u5f0f\u4f20\u8f93\u3002\n* \u4f60\u7684 `minChars` \/ coalesce \u8bbe\u7f6e\u592a\u9ad8\uff0c\u6240\u4ee5\u5757\u88ab\u5408\u5e76\u4e86\u3002\n* \u6a21\u578b\u53d1\u51fa\u4e00\u4e2a\u5927\u7684\u6587\u672c\u5757\uff08\u6ca1\u6709\u4e2d\u95f4\u56de\u590d\u5237\u65b0\u70b9\uff09\u3002\n\n\u4fee\u590d\u6e05\u5355\uff1a\n\n1. \u5c06\u5206\u5757\u6d41\u5f0f\u4f20\u8f93\u8bbe\u7f6e\u653e\u5728 `agents.defaults` \u4e0b\uff0c\u800c\u4e0d\u662f\u6839\u76ee\u5f55\u3002\n2. \u5982\u679c\u4f60\u60f3\u8981\u771f\u6b63\u7684\u591a\u6d88\u606f\u5206\u5757\u56de\u590d\uff0c\u8bbe\u7f6e `channels.telegram.streamMode: &quot;off&quot;`\u3002\n3. \u8c03\u8bd5\u65f6\u4f7f\u7528\u8f83\u5c0f\u7684 chunk\/coalesce \u9608\u503c\u3002\n\n\u53c2\u89c1 [\u6d41\u5f0f\u4f20\u8f93](\/concepts\/streaming)\u3002\n\n### \u5373\u4f7f\u8bbe\u7f6e\u4e86 `requireMention: false`\uff0cDiscord \u4e5f\u4e0d\u5728\u6211\u7684\u670d\u52a1\u5668\u4e2d\u56de\u590d\u3002\u4e3a\u4ec0\u4e48\uff1f\n\n`requireMention` \u53ea\u63a7\u5236\u6e20\u9053\u901a\u8fc7\u767d\u540d\u5355**\u4e4b\u540e**\u7684\u63d0\u53ca\u95e8\u63a7\u3002\n\u9ed8\u8ba4\u60c5\u51b5\u4e0b `channels.discord.groupPolicy` \u662f **allowlist**\uff0c\u6240\u4ee5\u5fc5\u987b\u663e\u5f0f\u542f\u7528 guild\u3002\n\u5982\u679c\u4f60\u8bbe\u7f6e\u4e86 `channels.discord.guilds.&lt;guildId&gt;.channels`\uff0c\u53ea\u5141\u8bb8\u5217\u51fa\u7684\u9891\u9053\uff1b\u7701\u7565\u5b83\u4ee5\u5141\u8bb8 guild \u4e2d\u7684\u6240\u6709\u9891\u9053\u3002\n\n\u4fee\u590d\u6e05\u5355\uff1a\n\n1. \u8bbe\u7f6e `channels.discord.groupPolicy: &quot;open&quot;` **\u6216**\u6dfb\u52a0 guild \u767d\u540d\u5355\u6761\u76ee\uff08\u5e76\u53ef\u9009\u6dfb\u52a0\u9891\u9053\u767d\u540d\u5355\uff09\u3002\n2. \u5728 `channels.discord.guilds.&lt;guildId&gt;.channels` \u4e2d\u4f7f\u7528**\u6570\u5b57\u9891\u9053 ID**\u3002\n3. \u5c06 `requireMention: false` \u653e\u5728 `channels.discord.guilds` **\u4e0b\u9762**\uff08\u5168\u5c40\u6216\u6bcf\u4e2a\u9891\u9053\uff09\u3002\n   \u9876\u7ea7 `channels.discord.requireMention` \u4e0d\u662f\u652f\u6301\u7684\u952e\u3002\n4. \u786e\u4fdd\u673a\u5668\u4eba\u6709 **Message Content Intent** \u548c\u9891\u9053\u6743\u9650\u3002\n5. \u8fd0\u884c `openclaw channels status --probe` \u83b7\u53d6\u5ba1\u8ba1\u63d0\u793a\u3002\n\n\u6587\u6863\uff1a[Discord](\/channels\/discord)\u3001[\u6e20\u9053\u6545\u969c\u6392\u9664](\/channels\/troubleshooting)\u3002\n\n### Cloud Code Assist API \u9519\u8bef\uff1ainvalid tool schema\uff08400\uff09\u3002\u73b0\u5728\u600e\u4e48\u529e\uff1f\n\n\u8fd9\u51e0\u4e4e\u603b\u662f**\u5de5\u5177\u6a21\u5f0f\u517c\u5bb9\u6027**\u95ee\u9898\u3002Cloud Code Assist\n\u7aef\u70b9\u63a5\u53d7 JSON Schema \u7684\u4e25\u683c\u5b50\u96c6\u3002OpenClaw \u5728\u5f53\u524d `main` \u4e2d\u6e05\u7406\/\u89c4\u8303\u5316\u5de5\u5177\n\u6a21\u5f0f\uff0c\u4f46\u4fee\u590d\u5c1a\u672a\u5305\u542b\u5728\u6700\u540e\u4e00\u4e2a\u7248\u672c\u4e2d\uff08\u622a\u81f3\n2026 \u5e74 1 \u6708 13 \u65e5\uff09\u3002\n\n\u4fee\u590d\u6e05\u5355\uff1a\n\n1. **\u66f4\u65b0 OpenClaw**\uff1a\n   * \u5982\u679c\u4f60\u53ef\u4ee5\u4ece\u6e90\u4ee3\u7801\u8fd0\u884c\uff0c\u62c9\u53d6 `main` \u5e76\u91cd\u542f Gateway \u7f51\u5173\u3002\n   * \u5426\u5219\uff0c\u7b49\u5f85\u5305\u542b\u6a21\u5f0f\u6e05\u7406\u5668\u7684\u4e0b\u4e00\u4e2a\u7248\u672c\u3002\n2. \u907f\u514d\u4e0d\u652f\u6301\u7684\u5173\u952e\u5b57\u5982 `anyOf\/oneOf\/allOf`\u3001`patternProperties`\u3001\n   `additionalProperties`\u3001`minLength`\u3001`maxLength`\u3001`format` \u7b49\u3002\n3. \u5982\u679c\u4f60\u5b9a\u4e49\u81ea\u5b9a\u4e49\u5de5\u5177\uff0c\u4fdd\u6301\u9876\u7ea7\u6a21\u5f0f\u4e3a `type: &quot;object&quot;` \u5e76\u4f7f\u7528\n   `properties` \u548c\u7b80\u5355\u679a\u4e3e\u3002\n\n\u53c2\u89c1 [\u5de5\u5177](\/tools) \u548c [TypeBox \u6a21\u5f0f](\/concepts\/typebox)\u3002\n\n## macOS \u7279\u5b9a\u95ee\u9898\n\n### \u6388\u4e88\u6743\u9650\uff08\u8bed\u97f3\/\u9ea6\u514b\u98ce\uff09\u65f6\u5e94\u7528\u5d29\u6e83\n\n\u5982\u679c\u5728\u4f60\u70b9\u51fb\u9690\u79c1\u63d0\u793a\u7684&quot;\u5141\u8bb8&quot;\u65f6\u5e94\u7528\u6d88\u5931\u6216\u663e\u793a&quot;Abort trap 6&quot;\uff1a\n\n**\u4fee\u590d 1\uff1a\u91cd\u7f6e TCC \u7f13\u5b58**\n\n```bash  theme={&quot;theme&quot;:{&quot;light&quot;:&quot;min-light&quot;,&quot;dark&quot;:&quot;min-dark&quot;}}\ntccutil reset All bot.molt.mac.debug\n<\/code><\/pre>\n<p><strong>\u4fee\u590d 2\uff1a\u5f3a\u5236\u4f7f\u7528\u65b0\u7684 Bundle ID<\/strong><br \/>\n\u5982\u679c\u91cd\u7f6e\u4e0d\u8d77\u4f5c\u7528\uff0c\u5728 <a href=\"https:\/\/github.com\/openclaw\/openclaw\/blob\/main\/scripts\/package-mac-app.sh\"><code>scripts\/package-mac-app.sh<\/code><\/a> \u4e2d\u66f4\u6539 <code>BUNDLE_ID<\/code>\uff08\u4f8b\u5982\uff0c\u6dfb\u52a0 <code>.test<\/code> \u540e\u7f00\uff09\u5e76\u91cd\u65b0\u6784\u5efa\u3002\u8fd9\u4f1a\u5f3a\u5236 macOS \u5c06\u5176\u89c6\u4e3a\u65b0\u5e94\u7528\u3002<\/p>\n<h3>Gateway \u7f51\u5173 \u7f51\u5173\u5361\u5728&#8221;Starting&#8230;&#8221;<\/h3>\n<p>\u5e94\u7528\u8fde\u63a5\u5230\u7aef\u53e3 <code>18789<\/code> \u4e0a\u7684\u672c\u5730 Gateway \u7f51\u5173 \u7f51\u5173\u3002\u5982\u679c\u4e00\u76f4\u5361\u4f4f\uff1a<\/p>\n<p><strong>\u4fee\u590d 1\uff1a\u505c\u6b62\u76d1\u7ba1\u7a0b\u5e8f\uff08\u9996\u9009\uff09<\/strong><br \/>\n\u5982\u679c Gateway \u7f51\u5173 \u7f51\u5173\u7531 launchd \u76d1\u7ba1\uff0c\u6740\u6b7b PID \u53ea\u4f1a\u91cd\u65b0\u751f\u6210\u5b83\u3002\u5148\u505c\u6b62\u76d1\u7ba1\u7a0b\u5e8f\uff1a<\/p>\n<p>&#8220;`bash  theme={&#8220;theme&#8221;:{&#8220;light&#8221;:&#8221;min-light&#8221;,&#8221;dark&#8221;:&#8221;min-dark&#8221;}}<br \/>\nopenclaw \u7f51\u5173 status<br \/>\nopenclaw \u7f51\u5173 stop<\/p>\n<h1>\u6216\uff1alaunchctl bootout gui\/$UID\/bot.molt.\u7f51\u5173\uff08\u7528 bot.molt. \u66ff\u6362\uff1b\u65e7\u7248 com.openclaw.* \u4ecd\u7136\u6709\u6548\uff09<\/h1>\n<pre><code>\n**\u4fee\u590d 2\uff1a\u7aef\u53e3\u88ab\u5360\u7528\uff08\u67e5\u627e\u76d1\u542c\u5668\uff09**\n\n```bash  theme={&quot;theme&quot;:{&quot;light&quot;:&quot;min-light&quot;,&quot;dark&quot;:&quot;min-dark&quot;}}\nlsof -nP -iTCP:18789 -sTCP:LISTEN\n<\/code><\/pre>\n<p>\u5982\u679c\u662f\u672a\u88ab\u76d1\u7ba1\u7684\u8fdb\u7a0b\uff0c\u5148\u5c1d\u8bd5\u4f18\u96c5\u505c\u6b62\uff0c\u7136\u540e\u5347\u7ea7\uff1a<\/p>\n<p>&#8220;`bash  theme={&#8220;theme&#8221;:{&#8220;light&#8221;:&#8221;min-light&#8221;,&#8221;dark&#8221;:&#8221;min-dark&#8221;}}<br \/>\nkill -TERM<br \/>\nsleep 1<br \/>\nkill -9  # \u6700\u540e\u624b\u6bb5<\/p>\n<pre><code>\n**\u4fee\u590d 3\uff1a\u68c0\u67e5 CLI \u5b89\u88c5**\n\u786e\u4fdd\u5168\u5c40 `openclaw` CLI \u5df2\u5b89\u88c5\u4e14\u4e0e\u5e94\u7528\u7248\u672c\u5339\u914d\uff1a\n\n```bash  theme={&quot;theme&quot;:{&quot;light&quot;:&quot;min-light&quot;,&quot;dark&quot;:&quot;min-dark&quot;}}\nopenclaw --version\nnpm install -g openclaw@&lt;version&gt;\n<\/code><\/pre>\n<h2>\u8c03\u8bd5\u6a21\u5f0f<\/h2>\n<p>\u83b7\u53d6\u8be6\u7ec6\u65e5\u5fd7\uff1a<\/p>\n<p>&#8220;`bash  theme={&#8220;theme&#8221;:{&#8220;light&#8221;:&#8221;min-light&#8221;,&#8221;dark&#8221;:&#8221;min-dark&#8221;}}<\/p>\n<h1>\u5728\u914d\u7f6e\u4e2d\u6253\u5f00\u8ddf\u8e2a\u65e5\u5fd7\uff1a<\/h1>\n<h1>${OPENCLAW_CONFIG_PATH:-$HOME\/.openclaw\/openclaw.json} -&gt; { logging: { level: &#8220;trace&#8221; } }<\/h1>\n<h1><\/h1>\n<h1>\u7136\u540e\u8fd0\u884c\u8be6\u7ec6\u547d\u4ee4\u5c06\u8c03\u8bd5\u8f93\u51fa\u955c\u50cf\u5230\u6807\u51c6\u8f93\u51fa\uff1a<\/h1>\n<p>openclaw \u7f51\u5173 &#8211;verbose<br \/>\nopenclaw \u6e20\u9053s login &#8211;verbose<\/p>\n<pre><code>\n## \u65e5\u5fd7\u4f4d\u7f6e\n\n| \u65e5\u5fd7                   | \u4f4d\u7f6e                                                                                                                                                                                                                                                                                                         |\n| -------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| Gateway \u7f51\u5173\u6587\u4ef6\u65e5\u5fd7\uff08\u7ed3\u6784\u5316\uff09  | `\/tmp\/openclaw\/openclaw-YYYY-MM-DD.log`\uff08\u6216 `logging.file`\uff09                                                                                                                                                                                                                                                  |\n| Gateway \u7f51\u5173\u670d\u52a1\u65e5\u5fd7\uff08\u76d1\u7ba1\u7a0b\u5e8f\uff09 | macOS\uff1a`$OPENCLAW_STATE_DIR\/logs\/gateway.log` + `gateway.err.log`\uff08\u9ed8\u8ba4\uff1a`~\/.openclaw\/logs\/...`\uff1b\u914d\u7f6e\u6587\u4ef6\u4f7f\u7528 `~\/.openclaw-&lt;profile&gt;\/logs\/...`\uff09&lt;br \/&gt;Linux\uff1a`journalctl --user -u openclaw-gateway[-&lt;profile&gt;].service -n 200 --no-pager`&lt;br \/&gt;Windows\uff1a`schtasks \/Query \/TN &quot;OpenClaw Gateway (&lt;profile&gt;)&quot; \/V \/FO LIST` |\n| \u4f1a\u8bdd\u6587\u4ef6                 | `$OPENCLAW_STATE_DIR\/agents\/&lt;agentId&gt;\/sessions\/`                                                                                                                                                                                                                                                           |\n| \u5a92\u4f53\u7f13\u5b58                 | `$OPENCLAW_STATE_DIR\/media\/`                                                                                                                                                                                                                                                                               |\n| \u51ed\u8bc1                   | `$OPENCLAW_STATE_DIR\/credentials\/`                                                                                                                                                                                                                                                                         |\n\n## \u5065\u5eb7\u68c0\u67e5\n\n```bash  theme={&quot;theme&quot;:{&quot;light&quot;:&quot;min-light&quot;,&quot;dark&quot;:&quot;min-dark&quot;}}\n# \u76d1\u7ba1\u7a0b\u5e8f + \u63a2\u6d4b\u76ee\u6807 + \u914d\u7f6e\u8def\u5f84\nopenclaw gateway status\n# \u5305\u62ec\u7cfb\u7edf\u7ea7\u626b\u63cf\uff08\u65e7\u7248\/\u989d\u5916\u670d\u52a1\u3001\u7aef\u53e3\u76d1\u542c\u5668\uff09\nopenclaw gateway status --deep\n\n# Gateway \u7f51\u5173\u662f\u5426\u53ef\u8fbe\uff1f\nopenclaw health --json\n# \u5982\u679c\u5931\u8d25\uff0c\u4f7f\u7528\u8fde\u63a5\u8be6\u60c5\u91cd\u65b0\u8fd0\u884c\uff1a\nopenclaw health --verbose\n\n# \u9ed8\u8ba4\u7aef\u53e3\u4e0a\u662f\u5426\u6709\u4e1c\u897f\u5728\u76d1\u542c\uff1f\nlsof -nP -iTCP:18789 -sTCP:LISTEN\n\n# \u6700\u8fd1\u6d3b\u52a8\uff08RPC \u65e5\u5fd7\u5c3e\u90e8\uff09\nopenclaw logs --follow\n# \u5982\u679c RPC \u5b95\u673a\u7684\u5907\u7528\u65b9\u6848\ntail -20 \/tmp\/openclaw\/openclaw-*.log\n<\/code><\/pre>\n<h2>\u91cd\u7f6e\u6240\u6709\u5185\u5bb9<\/h2>\n<p>\u6838\u9009\u9879\uff1a<\/p>\n<p>&#8220;`bash  theme={&#8220;theme&#8221;:{&#8220;light&#8221;:&#8221;min-light&#8221;,&#8221;dark&#8221;:&#8221;min-dark&#8221;}}<br \/>\nopenclaw \u7f51\u5173 stop<\/p>\n<h1>\u5982\u679c\u4f60\u5b89\u88c5\u4e86\u670d\u52a1\u5e76\u60f3\u8981\u5e72\u51c0\u5b89\u88c5\uff1a<\/h1>\n<h1>openclaw \u7f51\u5173 uninstall<\/h1>\n<p>trash &#8220;${OPENCLAW_STATE_DIR:-$HOME\/.openclaw}&#8221;<br \/>\nopenclaw \u6e20\u9053s login         # \u91cd\u65b0\u914d\u5bf9 WhatsApp<br \/>\nopenclaw \u7f51\u5173 restart           # \u6216\uff1aopenclaw \u7f51\u5173<\/p>\n<pre><code>\n\u26a0\ufe0f \u8fd9\u4f1a\u4e22\u5931\u6240\u6709\u4f1a\u8bdd\u5e76\u9700\u8981\u91cd\u65b0\u914d\u5bf9 WhatsApp\u3002\n\n## \u83b7\u53d6\u5e2e\u52a9\n\n1. \u9996\u5148\u68c0\u67e5\u65e5\u5fd7\uff1a`\/tmp\/openclaw\/`\uff08\u9ed8\u8ba4\uff1a`openclaw-YYYY-MM-DD.log`\uff0c\u6216\u4f60\u914d\u7f6e\u7684 `logging.file`\uff09\n2. \u5728 GitHub \u4e0a\u641c\u7d22\u73b0\u6709\u95ee\u9898\n3. \u63d0\u4ea4\u65b0\u95ee\u9898\u65f6\u5305\u542b\uff1a\n   * OpenClaw \u7248\u672c\n   * \u76f8\u5173\u65e5\u5fd7\u7247\u6bb5\n   * \u91cd\u73b0\u6b65\u9aa4\n   * \u4f60\u7684\u914d\u7f6e\uff08\u9690\u85cf\u5bc6\u94a5\uff01\uff09\n\n***\n\n*&quot;\u4f60\u8bd5\u8fc7\u5173\u6389\u518d\u5f00\u5417\uff1f&quot;* \u2014 \u6bcf\u4e2a IT \u4eba\u5458\u90fd\u8fd9\u4e48\u8bf4\n\n\ud83e\udd9e\ud83d\udd27\n\n### \u6d4f\u89c8\u5668\u65e0\u6cd5\u542f\u52a8\uff08Linux\uff09\n\n\u5982\u679c\u4f60\u770b\u5230 `&quot;Failed to start Chrome CDP on port 18800&quot;`\uff1a\n\n**\u6700\u53ef\u80fd\u7684\u539f\u56e0\uff1a** Ubuntu \u4e0a\u7684 Snap \u6253\u5305\u7684 Chromium\u3002\n\n**\u5feb\u901f\u4fee\u590d\uff1a** \u6539\u4e3a\u5b89\u88c5 Google Chrome\uff1a\n\n```bash  theme={&quot;theme&quot;:{&quot;light&quot;:&quot;min-light&quot;,&quot;dark&quot;:&quot;min-dark&quot;}}\nwget https:\/\/dl.google.com\/linux\/direct\/google-chrome-stable_current_amd64.deb\nsudo dpkg -i google-chrome-stable_current_amd64.deb\n<\/code><\/pre>\n<p>\u7136\u540e\u5728\u914d\u7f6e\u4e2d\u8bbe\u7f6e\uff1a<\/p>\n<p><code>json  theme={\"theme\":{\"light\":\"min-light\",\"dark\":\"min-dark\"}}<br \/>\n{<br \/>\n  \"browser\": {<br \/>\n    \"executablePath\": \"\/usr\/bin\/google-chrome-stable\"<br \/>\n  }<br \/>\n}<\/code><\/p>\n<p><strong>\u5b8c\u6574\u6307\u5357\uff1a<\/strong> \u53c2\u89c1 <a href=\"https:\/\/pa.yingzhi8.cn\/?p=277\">browser-linux-troubleshooting<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6545\u969c\u6392\u9664 \u6545\u969c\u6392\u9664 \ud83d\udd27 \u5f53 OpenClaw \u51fa\u73b0\u5f02\u5e38\u65f6\uff0c\u4ee5\u4e0b\u662f\u89e3\u51b3\u65b9\u6cd5\u3002 \u5982\u679c\u4f60\u53ea\u60f3\u5feb\u901f\u5206\u7c7b\u95ee\u9898\uff0c\u8bf7\u5148\u67e5\u770b\u5e38 [&hellip;]<\/p>\n","protected":false},"author":0,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-144","post","type-post","status-publish","format-standard","hentry","category-docs"],"_links":{"self":[{"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/posts\/144","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"replies":[{"embeddable":true,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/comments?post=144"}],"version-history":[{"count":2,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/posts\/144\/revisions"}],"predecessor-version":[{"id":827,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/posts\/144\/revisions\/827"}],"wp:attachment":[{"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/media?parent=144"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/categories?post=144"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/tags?post=144"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}