2 min read

你的小龙虾为什么只能聊天,不能干活?OpenClaw 权限配置避坑指南

Source: http://x.com/i/article/2029365699161071616

装好了 OpenClaw,满心欢喜地让它帮你跑个命令,结果它回你:

Image

"我只有 message 工具,没有 exec 能力。"

你:???

别急,这不是 bug,是一行配置的事。 问题根因:tools.profile

OpenClaw 有一个关键配置项叫 tools.profile,它决定了 Agent 能使用哪些工具。

默认的 onboard 流程会将它设为 "messaging" —— 顾名思义,只给了聊天权限,没有命令执行权限。

所以你的小龙虾不是不想干活,是被你关在了聊天室里。

如何排查

SSH 到你的服务器,执行:

openclaw config get tools

如果返回:

{ "profile": "messaging" }

恭喜你,找到病根了。 一共有 5 种 profile messaging —— 只能发消息、管理会话

default —— 默认工具集

coding —— 编程相关工具

full —— 完整工具集,包含命令执行

all —— 所有工具全开

解决方案:一行命令

openclaw config set tools.profile full

systemctl restart openclaw-gateway

或者直接编辑配置文件,把 "messaging"

改成 "full",重启 gateway 即可。

完整定位链路

Agent 说没有 exec 工具

→ 查看配置 → tools.profile = "messaging"

→ 搜索源码 → 发现 5 种 profile 枚举

→ 改为 "full" → 重启 gateway → 解决

总结

OpenClaw 的安全设计把工具权限和聊天能力做了分层隔离。tools.profile 是控制 Agent 能力边界的核心开关。部署时别忘了根据你的使用场景选择合适的 profile。

如果你只是想让它当个聊天机器人,messaging 就够了。但如果你希望它帮你运维服务器、跑脚本、干实事——请把 profile 设为 full。

#OpenClaw

#SelfHosted

#AI助手

#运维

#技术分享

整个修复过程都是 Claude code 帮我修复的:

Image

嗯,我这样的大师傅,还是要靠 Claude Code 去驾驭我的小龙虾