openclaw - 💡(How to fix) Fix [Bug]: [Exec] Exec approval registration fails with "pairing required" error despite having paired devices [1 comments, 2 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#59969Fetched 2026-04-08 02:38:10
View on GitHub
Comments
1
Participants
2
Timeline
3
Reactions
0
Timeline (top)
labeled ×2commented ×1

Error Message

{ "tools": { "profile": "coding", "web": { "search": { "enabled": true, "provider": "duckduckgo" } } } }

Paired Devices (sanitized)

{ "<DEVICE_ID_1>": { "deviceId": "<DEVICE_ID_1>", "platform": "linux", "clientId": "gateway-client", "clientMode": "backend", "role": "operator", "tokens": { "operator": { "token": "<OPERATOR_TOKEN_1>" } } }, "<DEVICE_ID_2>": { "deviceId": "<DEVICE_ID_2>", "platform": "Win32", "clientId": "openclaw-control-ui", "clientMode": "webchat", "role": "operator", "tokens": { "operator": { "token": "<OPERATOR_TOKEN_2>" } } } }

Environment Variable (sanitized)

export OPENCLAW_TOKEN="<OPERATOR_TOKEN_1>"

Additional Context

What Works

• Gateway service starts and runs normally • CLI can connect to Gateway (verified with openclaw status) • safeBins commands execute successfully through exec tool • Direct WSL execution works for all commands

What Doesn't Work

• Any command not in safeBins list fails when executed through exec tool • No Telegram approval card is shown • Error suggests pairing is required, but devices are already paired

Steps to reproduce

  1. Start Gateway: sudo systemctl start openclaw
  2. Verify Gateway is running: systemctl status openclaw
  3. Set token: export OPENCLAW_TOKEN="<OPERATOR_TOKEN_1>"
  4. Test safeBins command (works): echo "test"
  5. Test command requiring approval (fails): ls /root/

Expected behavior

Commands in safeBins list should execute without approval, and other commands should trigger a Telegram approval card.

Actual behavior

• ✅ safeBins commands work: echo, ls, cat, pwd, whoami, date, etc. • ❌ Commands requiring approval fail with error: Exec approval registration failed: Error: gateway closed (1008): pairing required Gateway target: ws://127.0.0.1:18789 Source: local loopback

OpenClaw version

2026.4.01

Operating system

windows11 /wsl ubuntu 24.04

Install method

npm global

Model

qwen 3.5 plus

Provider / routing chain

qwen

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Code Example

{
  "tools": {
    "profile": "coding",
    "web": {
      "search": {
        "enabled": true,
        "provider": "duckduckgo"
      }
    }
  }
}

Paired Devices (sanitized)

{
  "<DEVICE_ID_1>": {
    "deviceId": "<DEVICE_ID_1>",
    "platform": "linux",
    "clientId": "gateway-client",
    "clientMode": "backend",
    "role": "operator",
    "tokens": {
      "operator": {
        "token": "<OPERATOR_TOKEN_1>"
      }
    }
  },
  "<DEVICE_ID_2>": {
    "deviceId": "<DEVICE_ID_2>",
    "platform": "Win32",
    "clientId": "openclaw-control-ui",
    "clientMode": "webchat",
    "role": "operator",
    "tokens": {
      "operator": {
        "token": "<OPERATOR_TOKEN_2>"
      }
    }
  }
}

Environment Variable (sanitized)

export OPENCLAW_TOKEN="<OPERATOR_TOKEN_1>"

Additional Context

What Works

Gateway service starts and runs normally
CLI can connect to Gateway (verified with openclaw status)
• safeBins commands execute successfully through exec tool
Direct WSL execution works for all commands

What Doesn't Work

Any command not in safeBins list fails when executed through exec tool
No Telegram approval card is shown
Error suggests pairing is required, but devices are already paired

### Steps to reproduce

1. Start Gateway: sudo systemctl start openclaw
2. Verify Gateway is running: systemctl status openclaw
3. Set token: export OPENCLAW_TOKEN="<OPERATOR_TOKEN_1>"
4. Test safeBins command (works): echo "test"
5. Test command requiring approval (fails): ls /root/

### Expected behavior

Commands in safeBins list should execute without approval, and other commands should trigger a Telegram approval card.

### Actual behavior

• ✅ safeBins commands work: echo, ls, cat, pwd, whoami, date, etc.
Commands requiring approval fail with error:
Exec approval registration failed: Error: gateway closed (1008): pairing required
Gateway target: ws://127.0.0.1:18789
Source: local loopback

### OpenClaw version

2026.4.01

### Operating system

windows11 /wsl ubuntu 24.04

### Install method

npm global

### Model

qwen 3.5 plus

### Provider / routing chain

qwen

### Additional provider/model setup details

_No response_

### Logs, screenshots, and evidence
RAW_BUFFERClick to expand / collapse

Bug type

Behavior bug (incorrect output/state without crash)

Beta release blocker

No

Summary

Bug Description

When executing commands that require approval through the exec tool, I consistently get a "pairing required" error, even though:

  • Gateway is running normally
  • CLI can connect to Gateway (safeBins commands work)
  • Devices are properly paired in ~/.openclaw/devices/paired.json
  • OPENCLAW_TOKEN environment variable is set correctly

Environment

  • OpenClaw Version: 2026.4.1
  • OS: WSL2 (Ubuntu on Windows)
  • Node.js: v22.x.x
  • Channel: Telegram
  • Gateway Mode: local (loopback)

Configuration

openclaw.json (tools section)

{
  "tools": {
    "profile": "coding",
    "web": {
      "search": {
        "enabled": true,
        "provider": "duckduckgo"
      }
    }
  }
}

Paired Devices (sanitized)

{
  "<DEVICE_ID_1>": {
    "deviceId": "<DEVICE_ID_1>",
    "platform": "linux",
    "clientId": "gateway-client",
    "clientMode": "backend",
    "role": "operator",
    "tokens": {
      "operator": {
        "token": "<OPERATOR_TOKEN_1>"
      }
    }
  },
  "<DEVICE_ID_2>": {
    "deviceId": "<DEVICE_ID_2>",
    "platform": "Win32",
    "clientId": "openclaw-control-ui",
    "clientMode": "webchat",
    "role": "operator",
    "tokens": {
      "operator": {
        "token": "<OPERATOR_TOKEN_2>"
      }
    }
  }
}

Environment Variable (sanitized)

export OPENCLAW_TOKEN="<OPERATOR_TOKEN_1>"

Additional Context

What Works

• Gateway service starts and runs normally
• CLI can connect to Gateway (verified with openclaw status)
• safeBins commands execute successfully through exec tool
• Direct WSL execution works for all commands

What Doesn't Work

• Any command not in safeBins list fails when executed through exec tool
• No Telegram approval card is shown
• Error suggests pairing is required, but devices are already paired

### Steps to reproduce

1. Start Gateway: sudo systemctl start openclaw
2. Verify Gateway is running: systemctl status openclaw
3. Set token: export OPENCLAW_TOKEN="<OPERATOR_TOKEN_1>"
4. Test safeBins command (works): echo "test"
5. Test command requiring approval (fails): ls /root/

### Expected behavior

Commands in safeBins list should execute without approval, and other commands should trigger a Telegram approval card.

### Actual behavior

• ✅ safeBins commands work: echo, ls, cat, pwd, whoami, date, etc.
• ❌ Commands requiring approval fail with error:
Exec approval registration failed: Error: gateway closed (1008): pairing required
Gateway target: ws://127.0.0.1:18789
Source: local loopback

### OpenClaw version

2026.4.01

### Operating system

windows11 /wsl ubuntu 24.04

### Install method

npm global

### Model

qwen 3.5 plus

### Provider / routing chain

qwen

### Additional provider/model setup details

_No response_

### Logs, screenshots, and evidence

```shell
Gateway Logs

<DATE> <HOSTNAME> systemd[1]: Started openclaw.service - OpenClaw Gateway.
<DATE> <HOSTNAME> node[<PID>]: <TIMESTAMP> [gateway] already running under systemd; waiting 5000ms before retrying startup

exec-approvals.json (sanitized)

{
  "version": 1,
  "socket": {
    "path": "/home/<USER>/.openclaw/exec-approvals.sock",
    "token": "<SOCKET_TOKEN>"
  },
  "defaults": {
    "allow": ["ls", "cat", "grep", "find", "head", "tail", "wc", "pwd", "whoami", "date", "echo", "hostname", "uname"]
  },
  "agents": {
    "main": {
      "allow": ["*"],
      "security": "allowlist"
    }
  }
}

Note: The socket file ~/.openclaw/exec-approvals.sock does not exist, which may be related to the issue.

Impact and severity

No response

Additional information

No response

extent analysis

TL;DR

The "pairing required" error when executing commands through the exec tool may be resolved by ensuring the existence and correct configuration of the ~/.openclaw/exec-approvals.sock socket file, which seems to be missing.

Guidance

  1. Verify the existence of the socket file: Check if the ~/.openclaw/exec-approvals.sock file exists. If it doesn't, this could be the primary cause of the "pairing required" error.
  2. Review exec-approvals.json configuration: Ensure that the exec-approvals.json file is correctly configured, especially the socket and defaults sections, to allow the necessary commands.
  3. Check Gateway and client configurations: Confirm that the Gateway and client (including the openclaw.json and environment variables like OPENCLAW_TOKEN) are correctly set up and matched, as discrepancies could lead to authentication or pairing issues.
  4. Inspect system and Gateway logs: Look for any errors or warnings in the system logs (e.g., systemd logs for the OpenClaw service) and Gateway logs that might indicate issues with socket creation, token validation, or other potential causes of the pairing error.

Example

No specific code example is provided due to the nature of the issue, which seems related to configuration and file existence rather than code syntax.

Notes

The absence of the ~/.openclaw/exec-approvals.sock socket file is a significant clue, suggesting that the issue might be related to the setup or initialization of the exec approvals mechanism rather than a deeper code or logic flaw. Ensuring this file exists and is correctly configured could resolve the issue.

Recommendation

Apply a workaround by manually creating the ~/.openclaw/exec-approvals.sock file if it's missing and ensure its configuration aligns with the exec-approvals.json settings. This might involve restarting the Gateway service and reattempting the commands that previously failed due to the "pairing required" error.

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…

FAQ

Expected behavior

Commands in safeBins list should execute without approval, and other commands should trigger a Telegram approval card.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix [Bug]: [Exec] Exec approval registration fails with "pairing required" error despite having paired devices [1 comments, 2 participants]