Skip to content

Commit bb68e64

Browse files
iPythoningclaude
andcommitted
fix: OpenClaw 2026.4.1 compatibility — full exec permissions & open Telegram
- Set exec-approvals defaults to security=full during deploy (fixes gateway approval timeout) - Change Telegram dmPolicy default from "pairing" to "open" (fixes DM blocking) - Add allowFrom: ["*"] to Telegram channel config - Add tools.profile: "full" to generated openclaw.json - Auto-update OpenClaw & refresh gateway token on re-deploy (fixes stale embedded token) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 1303a20 commit bb68e64

File tree

3 files changed

+28
-1
lines changed

3 files changed

+28
-1
lines changed

deploy/config.sh.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ WHATSAPP_DEBOUNCE_MS=5000
4545
# ─── Channel: Telegram ───────────────────────────────────
4646
TELEGRAM_ENABLED=false
4747
TELEGRAM_BOT_TOKEN="" # Get from @BotFather
48-
TELEGRAM_DM_POLICY="pairing"
48+
TELEGRAM_DM_POLICY="open"
4949
TELEGRAM_GROUP_POLICY="open"
5050

5151
# ─── Admin Whitelist (comma-separated) ───────────────────

deploy/deploy.sh

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,30 @@ if echo "$OPENCLAW_INSTALLED" | grep -q "NOT_INSTALLED"; then
127127
fi
128128
else
129129
log "OpenClaw already installed: $(echo "$OPENCLAW_INSTALLED" | tail -1)"
130+
if [ "$INSTALL_OPENCLAW" = true ]; then
131+
info " Updating OpenClaw & refreshing gateway token..."
132+
remote "npm install -g openclaw@latest 2>&1 | tail -3"
133+
remote "openclaw gateway install --force 2>&1 | tail -3"
134+
log " OpenClaw updated, gateway token refreshed"
135+
fi
130136
fi
131137

138+
# Ensure exec-approvals are set to full (required since 2026.4.1)
139+
info " Setting exec approvals to full..."
140+
remote "cat > /root/.openclaw/exec-approvals.json << 'EAEOF'
141+
{
142+
\"version\": 1,
143+
\"defaults\": {
144+
\"security\": \"full\",
145+
\"ask\": \"off\",
146+
\"askFallback\": \"full\"
147+
},
148+
\"agents\": {}
149+
}
150+
EAEOF
151+
chmod 600 /root/.openclaw/exec-approvals.json"
152+
log " Exec approvals configured (security=full)"
153+
132154
# ─── Step 3: Check Node.js ───────────────────────────────
133155
info "Step 3/7: Checking Node.js..."
134156
NODE_CHECK=$(remote "node --version 2>/dev/null || echo 'NOT_INSTALLED'")

deploy/generate-config.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@ $PROVIDERS
161161
"telegram": {
162162
"enabled": $TELEGRAM_ENABLED,
163163
"dmPolicy": "$TELEGRAM_DM_POLICY",
164+
"allowFrom": ["*"],
164165
"botToken": "${TELEGRAM_BOT_TOKEN:-}",
165166
"groupPolicy": "$TELEGRAM_GROUP_POLICY"
166167
}
@@ -172,6 +173,10 @@ $PROVIDERS
172173
"auth": {"mode": "token", "token": "$GATEWAY_TOKEN"},
173174
"controlUi": {"allowedOrigins": ["*"]}
174175
},
176+
"tools": {
177+
"profile": "full",
178+
"sessions": {"visibility": "all"}
179+
},
175180
"skills": {"install": {"nodeManager": "npm"}},
176181
"hooks": {
177182
"internal": {

0 commit comments

Comments
 (0)