openclaw - 💡(How to fix) Fix [Bug]: Matrix channel missing skills injection, pathPrepend, and OPENCLAW_SHELL compared to WebChat [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#78249Fetched 2026-05-07 03:39:14
View on GitHub
Comments
1
Participants
2
Timeline
2
Reactions
2
Timeline (top)
commented ×1labeled ×1

On OpenClaw v2026.4.23 / macOS 15.5, the Matrix channel has three consistent behavioral differences from WebChat when routed to the same agent:

  1. <available_skills> is empty in the system prompt (including bundled skills)
  2. tools.exec.pathPrepend has no effect — configured paths are not prepended to PATH
  3. OPENCLAW_SHELL is not injected into the exec environment

WebChat works correctly for all three. Both channels are routed to the same main agent via bindings.

Root Cause

On OpenClaw v2026.4.23 / macOS 15.5, the Matrix channel has three consistent behavioral differences from WebChat when routed to the same agent:

  1. <available_skills> is empty in the system prompt (including bundled skills)
  2. tools.exec.pathPrepend has no effect — configured paths are not prepended to PATH
  3. OPENCLAW_SHELL is not injected into the exec environment

WebChat works correctly for all three. Both channels are routed to the same main agent via bindings.

Fix Action

Workaround

None found for pathPrepend and OPENCLAW_SHELL. For skills: /new in the Matrix session resolves the empty skills list, but requires discarding conversation history.

Code Example

/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin

---

/opt/anaconda3/bin:/Users/mac/.local/bin:/opt/homebrew/bin:...

---

(empty — variable not set)

---

exec

---

(empty — no skills listed in <available_skills>)

---



---

{
  "bindings": [
    {
      "type": "route",
      "agentId": "main",
      "match": {
        "channel": "matrix",
        "accountId": "nixu"
      }
    }
  ]
}

---

{
  "id": "main",
  "workspace": "/Users/mac/.openclaw/workspace/main",
  "tools": {
    "exec": {
      "pathPrepend": ["/opt/anaconda3/bin"]
    }
  }
}

---

{
  "tools": {
    "profile": "coding",
    "exec": {
      "pathPrepend": ["/opt/anaconda3/bin"]
    }
  }
}
RAW_BUFFERClick to expand / collapse

Bug type

Behavior bug (incorrect output/state without crash)

Beta release blocker

No

Summary

On OpenClaw v2026.4.23 / macOS 15.5, the Matrix channel has three consistent behavioral differences from WebChat when routed to the same agent:

  1. <available_skills> is empty in the system prompt (including bundled skills)
  2. tools.exec.pathPrepend has no effect — configured paths are not prepended to PATH
  3. OPENCLAW_SHELL is not injected into the exec environment

WebChat works correctly for all three. Both channels are routed to the same main agent via bindings.

Steps to reproduce

Steps to reproduce

  1. Configure a main agent with tools.exec.pathPrepend pointing to a custom binary (e.g. /opt/anaconda3/bin/topydo)
  2. Connect Matrix channel and route it to main agent via bindings
  3. Send a message from Matrix asking the agent to run echo $PATH, echo $OPENCLAW_SHELL, and list available skills

Expected behavior

  • PATH includes entries from tools.exec.pathPrepend
  • OPENCLAW_SHELL=exec is set in the exec environment
  • <available_skills> in the system prompt lists bundled and configured skills
  • Behavior is consistent with WebChat on the same agent

Actual behavior

Matrix channel — echo $PATH:

/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin

/opt/anaconda3/bin is absent. pathPrepend has no effect.

WebChat — echo $PATH:

/opt/anaconda3/bin:/Users/mac/.local/bin:/opt/homebrew/bin:...

Full PATH including pathPrepend entries is present.

Matrix channel — echo $OPENCLAW_SHELL:

(empty — variable not set)

WebChat — echo $OPENCLAW_SHELL:

exec

Matrix channel — available skills:

(empty — no skills listed in <available_skills>)

WebChat — available skills: All bundled and configured skills are listed normally.

OpenClaw version

2026.4.23

Operating system

macOs 15.5

Install method

npm global

Model

claude-sonnet-4.5

Provider / routing chain

openclaw -> claude-sonnet-4.5

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Impact and severity

No response

Additional information

Environment

FieldValue
OpenClaw versionv2026.4.23
OSmacOS 15.5
Node.jsv22.16
Install methodopenclaw onboard wizard
Matrix plugininstalled via onboard wizard
Agentmain

Configuration

Matrix channel is routed to the main agent via a binding:

{
  "bindings": [
    {
      "type": "route",
      "agentId": "main",
      "match": {
        "channel": "matrix",
        "accountId": "nixu"
      }
    }
  ]
}

main agent config:

{
  "id": "main",
  "workspace": "/Users/mac/.openclaw/workspace/main",
  "tools": {
    "exec": {
      "pathPrepend": ["/opt/anaconda3/bin"]
    }
  }
}

Top-level tools config:

{
  "tools": {
    "profile": "coding",
    "exec": {
      "pathPrepend": ["/opt/anaconda3/bin"]
    }
  }
}

Matrix channel allowFrom: ["*"], dmPolicy configured, sender is approved.


Additional observations

  • The exec tool call itself succeeds (tool name exec is invoked, not blocked)
  • The tool call arguments are well-formed: {"name": "exec", "arguments": {"command": "echo $PATH", ...}}
  • openclaw config get tools.exec correctly shows pathPrepend
  • openclaw skills list shows skills as ready on the gateway host
  • env.shellEnv.enabled: true was tested — no change in Matrix channel behavior
  • Removing the agent-level tools block (inheriting top-level config) — no change
  • session.dmScope was tested as both main and per-peer — no change
  • /new in the Matrix channel session resolves the empty skills issue, but does not fix pathPrepend or OPENCLAW_SHELL

Hypothesis

The Matrix channel's agent run appears to use a different initialization path than WebChat. Specifically, the exec environment setup (including pathPrepend application and OPENCLAW_SHELL injection) and the skills snapshot injection into the system prompt do not execute fully for Matrix-originated runs, while they work correctly for WebChat runs on the same agent and session store.

This may be related to the architectural note in the channel routing docs:

"sandbox and tool policy use a derived per-account direct-chat runtime key for external DMs so channel-originated messages are not treated like local main-session runs"

If this derived runtime key also bypasses exec environment initialization and skills injection, it would explain all three symptoms simultaneously.


Workaround

None found for pathPrepend and OPENCLAW_SHELL. For skills: /new in the Matrix session resolves the empty skills list, but requires discarding conversation history.

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

  • PATH includes entries from tools.exec.pathPrepend
  • OPENCLAW_SHELL=exec is set in the exec environment
  • <available_skills> in the system prompt lists bundled and configured skills
  • Behavior is consistent with WebChat on the same agent

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]: Matrix channel missing skills injection, pathPrepend, and OPENCLAW_SHELL compared to WebChat [1 comments, 2 participants]