Skip to content

openclaw gateway install --force still embeds OPENCLAW_GATEWAY_TOKEN in LaunchAgent plist; openclaw channels list throws TypeError: fetch failed with no channels configured #67595

@chouti

Description

@chouti

Version

OpenClaw 2026.4.14 (323493f)

Environment

  • macOS 26.4.1 (arm64)
  • node 25.9.0
  • Gateway mode: local
  • LaunchAgent-managed gateway
  • Gateway bind: loopback
  • Gateway port: 18789

Issue 1

openclaw gateway install --force reports success, but the generated LaunchAgent plist still embeds OPENCLAW_GATEWAY_TOKEN as a plaintext environment variable.

Command

openclaw gateway install --force

Output

Installed LaunchAgent: /Users/fengzhao/Library/LaunchAgents/ai.openclaw.gateway.plist
Logs: /Users/fengzhao/.openclaw/logs/gateway.log

Verification

grep -n "OPENCLAW_GATEWAY_TOKEN" ~/Library/LaunchAgents/ai.openclaw.gateway.plist

Output:

35: <key>OPENCLAW_GATEWAY_TOKEN</key>
60: <string>OPENCLAW_GATEWAY_TOKEN</string>

Relevant snippet:

<key>EnvironmentVariables</key>
<dict>
  <key>NODE_USE_SYSTEM_CA</key>
  <string>1</string>
  <key>OPENCLAW_GATEWAY_TOKEN</key>
  <string>c8ab55712240e361468f17dfeb2cb74d6a63ac94aa5ca36130e8e6f4ee53f6d2</string>
  <key>HOME</key>
  <string>/Users/fengzhao</string>
</dict>

openclaw gateway status also warned:

Service config issue: Gateway service embeds OPENCLAW_GATEWAY_TOKEN and should be reinstalled.
(Run `openclaw gateway install --force` to remove embedded service token.)

But reinstalling with --force did not fix it.

Workaround

I manually removed EnvironmentVariables.OPENCLAW_GATEWAY_TOKEN from the plist with:

plutil -remove EnvironmentVariables.OPENCLAW_GATEWAY_TOKEN ~/Library/LaunchAgents/ai.openclaw.gateway.plist
launchctl bootout gui/$(id -u) ~/Library/LaunchAgents/ai.openclaw.gateway.plist 2>/dev/null || true
launchctl bootstrap gui/$(id -u) ~/Library/LaunchAgents/ai.openclaw.gateway.plist
launchctl kickstart -k gui/$(id -u)/ai.openclaw.gateway

After that, openclaw gateway status no longer reported the embedded-token warning.

Issue 2

openclaw channels list throws TypeError: fetch failed when there are no configured chat channels, only auth providers.

Config state

~/.openclaw/openclaw.json contains auth profiles and plugins, but no actual chat channels are configured.

Command

openclaw channels list

Output

Chat channels:

Auth providers (OAuth + API keys):
- openai-codex:openapi@donotbeevil.com (oauth)
- zai:default (api_key)

TypeError: fetch failed

Docs: https://docs.openclaw.ai/gateway/configuration

Observed behavior

  • openclaw gateway status shows gateway is running
  • openclaw status works normally
  • gateway RPC probe is ok
  • logs show successful channels.status responses from the gateway

This makes it look like:

  • the gateway itself is healthy
  • channels list is failing in a later fetch/render path rather than failing to reach the gateway

Expected behavior

  1. openclaw gateway install --force should not embed plaintext OPENCLAW_GATEWAY_TOKEN in the LaunchAgent plist.
  2. openclaw channels list should succeed and show an empty channels list if no chat channels are configured, instead of throwing TypeError: fetch failed.

Notes

These may be independent bugs, but both were observed on the same installation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions