openclaw - 💡(How to fix) Fix Plugin tools registered via api.registerTool() not available in channel sessions (Telegram) [2 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#57320Fetched 2026-04-08 01:51:04
View on GitHub
Comments
2
Participants
2
Timeline
2
Reactions
0
Author
Participants
Timeline (top)
commented ×2

Plugin tools registered via api.registerTool() are available in webchat sessions but not in channel sessions (e.g., Telegram). The plugin's context engine injection (summaries, system prompt instructions) works correctly in both session types.

Root Cause

Plugin tools registered via api.registerTool() are available in webchat sessions but not in channel sessions (e.g., Telegram). The plugin's context engine injection (summaries, system prompt instructions) works correctly in both session types.

RAW_BUFFERClick to expand / collapse

Summary

Plugin tools registered via api.registerTool() are available in webchat sessions but not in channel sessions (e.g., Telegram). The plugin's context engine injection (summaries, system prompt instructions) works correctly in both session types.

Reproduction

  1. Install a plugin that registers tools (e.g., @martian-engineering/lossless-claw which registers lcm_grep, lcm_describe, lcm_expand_query)
  2. Confirm tools are available in a webchat session (they are)
  3. Send a message on Telegram to create a channel session
  4. Ask the agent to list its available tools — plugin tools are missing
  5. However, the LCM Recall section IS injected into the system prompt, referencing the tools that don't exist as callable functions

Expected behavior

Tools registered via api.registerTool() should be available in all session types (webchat, Telegram, etc.)

Actual behavior

  • Webchat session: 16 tools (13 core + 3 LCM tools) ✅
  • Telegram session: 13 tools (core only) ❌
  • LCM context injection (summaries + instructions): works in both ✅
  • LCM tool instructions in system prompt reference tools that aren't callable in Telegram ❌

Troubleshooting done

  • Plugin register() function calls api.registerTool() unconditionally (no session filtering in plugin code)
  • No toolFilter, toolScope, or sessionFilter logic in the plugin
  • Deleted and recreated Telegram session — same result
  • openclaw sandbox recreate --all --force — same result
  • Gateway restart — same result
  • Plugin manifest (openclaw.plugin.json) has no session/scope restrictions

Environment

  • OpenClaw 2026.3.28
  • macOS arm64
  • Plugin: @martian-engineering/lossless-claw v0.5.2
  • Channel: Telegram (dmPolicy: pairing)
  • Sandbox: Docker (custom image)

extent analysis

Fix Plan

The issue seems to be related to the session type filtering. To fix this, we need to ensure that the plugin tools are registered for all session types.

Step-by-Step Solution

  • Check the api.registerTool() function to see if it has any session type filtering.
  • If it does, modify the function to register tools for all session types.
  • If not, check the plugin's register() function to see if it has any session type filtering.
  • Modify the plugin's register() function to register tools for all session types.

Example Code

// In the plugin's register() function
api.registerTool({
  name: 'lcm_grep',
  // ... other tool properties ...
  sessionTypes: ['webchat', 'telegram'] // Register for both webchat and telegram sessions
});

// Alternatively, you can register tools for all session types using a wildcard
api.registerTool({
  name: 'lcm_grep',
  // ... other tool properties ...
  sessionTypes: ['*'] // Register for all session types
});

Verification

To verify that the fix worked, follow these steps:

  • Restart the gateway and the plugin.
  • Create a new Telegram session.
  • Ask the agent to list its available tools.
  • The plugin tools should now be available in the Telegram session.

Extra Tips

  • Make sure to test the plugin with different session types to ensure that the tools are registered correctly.
  • If you're using a custom Docker image, make sure to rebuild the image after making changes to the plugin code.

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

Tools registered via api.registerTool() should be available in all session types (webchat, Telegram, etc.)

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 Plugin tools registered via api.registerTool() not available in channel sessions (Telegram) [2 comments, 2 participants]