openclaw - 💡(How to fix) Fix [Bug]: /subagents list returns empty on Telegram slash surface while agent-tool list sees the same children (v2026.5.26)

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…

On v2026.5.26 (latest stable), the same set of live subagents is visible from one surface but not the other:

  • Main agent / agent-tool list: the main agent dispatches subagents and can see/track them via its own subagents tool. ✅
  • /subagents list (Telegram slash command): returns active subagents: (none) / recent subagents: (none) for the same parent, while those runs are live. ❌

This is the same class of bug as #75593 (fix attempted in #75679), still reproducing 9 releases later, now with a cleaner surface-level isolation: it's not spawn-then-list timing — the runs are registered and findable from the agent-tool surface. The Telegram slash surface resolves a requester key that doesn't match the key the runs were registered under.

Root Cause

Root cause (confirmed in v5.26 source)

Fix Action

Fix / Workaround

  • Main agent / agent-tool list: the main agent dispatches subagents and can see/track them via its own subagents tool. ✅
  • /subagents list (Telegram slash command): returns active subagents: (none) / recent subagents: (none) for the same parent, while those runs are live. ❌
  1. From the main agent, dispatch one or more subagents (they run and are visible to the agent's own subagents tool / agent-tool list).
  2. From Telegram, run /subagents list.
  3. Observed: active subagents: (none) / recent subagents: (none).
  4. Expected: the same children the agent-tool surface sees.

Code Example

src/auto-reply/reply/commands-subagents.ts:92,101
  const requesterKey = resolveRequesterSessionKey(params);
  runs: (await loadControlRuntime()).listControlledSubagentRuns(requesterKey)

---

src/agents/tools/sessions-resolution.ts:53
  if (params.key === "current") return params.requesterInternalKey ?? params.key;
  if (params.key === "main")    return params.alias;
  return params.key;   // a channel-scoped main alias passes through unchanged
RAW_BUFFERClick to expand / collapse

Summary

On v2026.5.26 (latest stable), the same set of live subagents is visible from one surface but not the other:

  • Main agent / agent-tool list: the main agent dispatches subagents and can see/track them via its own subagents tool. ✅
  • /subagents list (Telegram slash command): returns active subagents: (none) / recent subagents: (none) for the same parent, while those runs are live. ❌

This is the same class of bug as #75593 (fix attempted in #75679), still reproducing 9 releases later, now with a cleaner surface-level isolation: it's not spawn-then-list timing — the runs are registered and findable from the agent-tool surface. The Telegram slash surface resolves a requester key that doesn't match the key the runs were registered under.

Repro

  1. From the main agent, dispatch one or more subagents (they run and are visible to the agent's own subagents tool / agent-tool list).
  2. From Telegram, run /subagents list.
  3. Observed: active subagents: (none) / recent subagents: (none).
  4. Expected: the same children the agent-tool surface sees.

Root cause (confirmed in v5.26 source)

The list filters by an exact requester key:

src/auto-reply/reply/commands-subagents.ts:92,101
  const requesterKey = resolveRequesterSessionKey(params);
  runs: (await loadControlRuntime()).listControlledSubagentRuns(requesterKey)

resolveRequesterSessionKey passes the raw key through resolveInternalSessionKey, which only canonicalizes the literal strings "main"/"current":

src/agents/tools/sessions-resolution.ts:53
  if (params.key === "current") return params.requesterInternalKey ?? params.key;
  if (params.key === "main")    return params.alias;
  return params.key;   // a channel-scoped main alias passes through unchanged

canonicalizeMainSessionAlias (src/config/sessions/main-session.ts:47), which recognizes channel-scoped equivalents of the main session, is never applied at this list boundary. So the Telegram channel-scoped requester key never equals the controller key the runs were registered under (the agent-tool path uses that registered key directly), and listControlledSubagentRuns returns empty.

This matches the root-cause analysis already on #75593, and PR #75679 ("canonicalize subagent list requester keys") targets exactly this seam.

Ask

PR #75679 addresses this seam but has had no review since 2026-05-15. Could it get a review? It still reproduces on the latest stable, and any fix needs verifying on both surfaces (agent-tool list and the Telegram slash command), since they resolve the requester key differently. Happy to test a build against the Telegram surface.

Environment

  • OpenClaw v2026.5.26 (latest stable)
  • Self-hosted gateway (systemd, systemctl --user) on Ubuntu VM via OrbStack
  • Channels: Telegram + Web console
  • Related: #75593, #75679

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…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING