Skip to content

lcm_expand_query fails with "Plugin runtime subagent methods are only available during a gateway request" on OpenClaw 2026.3.12 #59

@threehotpot-bot

Description

@threehotpot-bot

Environment

  • OpenClaw: 2026.3.12
  • lossless-claw: 0.3.0
  • OS: macOS (Darwin 25.2.0)
  • Channel: Telegram webhook

Problem

lcm_expand_query intermittently fails when called from a main agent session during a normal Telegram gateway request. The error:

Plugin runtime subagent methods are only available during a gateway request.

This worked reliably on OpenClaw 2026.3.11 (expansion took ~70-90s as expected). After upgrading to 2026.3.12, the tool becomes unstable — sometimes succeeds, sometimes fails with the above error in the same session.

Reproduction

  1. Send a message via Telegram that triggers lcm_grep → finds summary IDs
  2. Call lcm_expand_query with the found summary IDs
  3. Tool fails with runtime subagent error

Additional findings

  • lcm_grep and lcm_describe work consistently
  • lcm_expand returns "lcm_expand is only available in sub-agent sessions" (expected, by design)
  • lcm_expand_query is the only path to expand summaries from the main session, and it's broken
  • Gateway logs show start events but no corresponding success events when it fails
  • The callGateway bridge in index.ts:1094 accesses api.runtime.subagent directly — this appears to be undefined/restricted in some request contexts under 3.12

Gateway log evidence

# Success (2026-03-13 01:25, before the issue manifested consistently):
[gateway] [lcm][expansion_delegation] {"component":"lcm_expand_query","event":"start",...}
[gateway] [lcm][expansion_delegation] {"component":"lcm_expand_query","event":"success",...}

# Failure (2026-03-13 19:15):
[plugins] [lcm][expansion_delegation] {"component":"lcm_expand_query","event":"start",...}
# No success event follows

Note the log prefix changes from [gateway] to [plugins] — suggesting the execution context differs.

Suspected cause

OpenClaw 3.12 changelog includes: "Security/plugin runtime: stop unauthenticated plugin HTTP routes from inheriting synthetic admin gateway scopes when they call runtime.subagent.*". This may have changed when api.runtime.subagent is available to context engine plugins during tool execution.

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