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
- Send a message via Telegram that triggers
lcm_grep → finds summary IDs
- Call
lcm_expand_query with the found summary IDs
- 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.
Environment
Problem
lcm_expand_queryintermittently fails when called from a main agent session during a normal Telegram gateway request. The error: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
lcm_grep→ finds summary IDslcm_expand_querywith the found summary IDsAdditional findings
lcm_grepandlcm_describework consistentlylcm_expandreturns "lcm_expand is only available in sub-agent sessions" (expected, by design)lcm_expand_queryis the only path to expand summaries from the main session, and it's brokenstartevents but no correspondingsuccessevents when it failscallGatewaybridge inindex.ts:1094accessesapi.runtime.subagentdirectly — this appears to be undefined/restricted in some request contexts under 3.12Gateway log evidence
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 whenapi.runtime.subagentis available to context engine plugins during tool execution.