openclaw - 💡(How to fix) Fix [Bug]: /subagents list returns empty in 2026.4.23 despite gateway tracking active subagents (regression from 4.22) [2 comments, 1 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#71495Fetched 2026-04-26 05:12:07
View on GitHub
Comments
2
Participants
1
Timeline
2
Reactions
0
Author
Participants
Timeline (top)
commented ×2

After upgrading from 2026.4.22 to 2026.4.23, the /subagents list slash command returns empty (both active subagents: and recent subagents (last 30m): sections show (none)) — even when subagents have visibly been spawned and completed within the configured 30-minute recent window. On 2026.4.22 the same command on the same install was correctly listing both currently-running and recently-completed subagents.

Error Message

  • #67901 ("plugins.allow prevents bundled subagents CLI command from running") is about CLI-command gating that produces an explicit error message. We see no error: the slash command runs cleanly and produces the empty list.
  • #67901 — plugins.allow gating produces an explicit error rather than silent empty; not the same surface as /subagents slash.

Root Cause

After upgrading from 2026.4.22 to 2026.4.23, the /subagents list slash command returns empty (both active subagents: and recent subagents (last 30m): sections show (none)) — even when subagents have visibly been spawned and completed within the configured 30-minute recent window. On 2026.4.22 the same command on the same install was correctly listing both currently-running and recently-completed subagents.

Code Example

Apr 25 10:08:49  [ws] ⇄ res ✓ agent  runId=announce:v1:agent:main:subagent:e2d20904-08d0-4170-b362-a5e964ff53dd:f5deafe1-...
Apr 25 10:30:10  [diagnostic] stuck session: sessionId=main sessionKey=agent:main:subagent:6ee38f5e-2e36-4387-b5e0-f460d7920952 state=processing age=123s
Apr 25 10:31:11  [ws] ⇄ res ✓ agent  runId=announce:v1:agent:main:subagent:6ee38f5e-2e36-4387-b5e0-f460d7920952:f31f1712-...
Apr 25 10:34:40  [diagnostic] stuck session: sessionId=main sessionKey=agent:main:subagent:4e9ef154-f211-43a0-bac3-22c4c7bb4fb5 state=processing age=147s
Apr 25 10:35:50  [ws] ⇄ res ✓ agent  runId=announce:v1:agent:main:subagent:4e9ef154-f211-43a0-bac3-22c4c7bb4fb5:bc4fa836-...

---

active subagents:
-----
(none)

recent subagents (last 30m):
-----
(none)

---

src/auto-reply/reply/commands-subagents/action-list.ts          → identical
src/auto-reply/reply/commands-subagents/shared.ts               → identical
src/agents/subagent-registry-read.ts                            → identical
src/agents/subagent-registry-state.ts                           → identical
src/agents/subagent-registry-runtime.ts                         → identical
src/agents/subagent-registry-memory.ts                          → identical
src/agents/subagent-registry-queries.ts                         → identical
src/agents/subagent-list.ts                                     → identical

---

[ws] ⇄ res ✓ agent runId=...:agent:main:subagent:<uuid>:...

---

active subagents:
-----
(none)

recent subagents (last 30m):
-----
(none)

---

active subagents:
-----
- agent:main:subagent:6ee38f5e... task=... state=processing age=2m
...

recent subagents (last 30m):
-----
- agent:main:subagent:e2d20904... task=... state=ok ended=22m ago
- agent:main:subagent:4e9ef154... task=... state=ok ended=4m ago

---

"agents": {
  "defaults": {
    "subagents": {
      "maxConcurrent": 8,
      "archiveAfterMinutes": 30,
      "model": { "primary": "openai-codex/gpt-5.4", "fallbacks": ["anthropic/claude-sonnet-4-6"] },
      "thinking": "high"
    }
  }
}
RAW_BUFFERClick to expand / collapse

Summary

After upgrading from 2026.4.22 to 2026.4.23, the /subagents list slash command returns empty (both active subagents: and recent subagents (last 30m): sections show (none)) — even when subagents have visibly been spawned and completed within the configured 30-minute recent window. On 2026.4.22 the same command on the same install was correctly listing both currently-running and recently-completed subagents.

Concrete evidence the runtime tracks subagents but the list reads empty

Last two hours of journalctl --user -u openclaw-gateway show three distinct subagent runs with full session-key tracking, including completion [ws] ⇄ res ✓ agent rows:

Apr 25 10:08:49  [ws] ⇄ res ✓ agent  runId=announce:v1:agent:main:subagent:e2d20904-08d0-4170-b362-a5e964ff53dd:f5deafe1-...
Apr 25 10:30:10  [diagnostic] stuck session: sessionId=main sessionKey=agent:main:subagent:6ee38f5e-2e36-4387-b5e0-f460d7920952 state=processing age=123s
Apr 25 10:31:11  [ws] ⇄ res ✓ agent  runId=announce:v1:agent:main:subagent:6ee38f5e-2e36-4387-b5e0-f460d7920952:f31f1712-...
Apr 25 10:34:40  [diagnostic] stuck session: sessionId=main sessionKey=agent:main:subagent:4e9ef154-f211-43a0-bac3-22c4c7bb4fb5 state=processing age=147s
Apr 25 10:35:50  [ws] ⇄ res ✓ agent  runId=announce:v1:agent:main:subagent:4e9ef154-f211-43a0-bac3-22c4c7bb4fb5:bc4fa836-...

So the gateway internals know about three subagent UUIDs (one of which finished ~25 minutes before /subagents list was sent — well inside the default RECENT_WINDOW_MINUTES = 30). The /subagents list reply nevertheless was:

active subagents:
-----
(none)

recent subagents (last 30m):
-----
(none)

Source files for the list path are byte-identical between 4.22 and 4.23

I checked the four most direct list-side source files at the two release tags:

src/auto-reply/reply/commands-subagents/action-list.ts          → identical
src/auto-reply/reply/commands-subagents/shared.ts               → identical
src/agents/subagent-registry-read.ts                            → identical
src/agents/subagent-registry-state.ts                           → identical
src/agents/subagent-registry-runtime.ts                         → identical
src/agents/subagent-registry-memory.ts                          → identical
src/agents/subagent-registry-queries.ts                         → identical
src/agents/subagent-list.ts                                     → identical

So the regression is not in the source-level read path. It is likely in either (a) the spawn/registration write path that populates subagentRuns (the in-memory map exported by subagent-registry-memory.ts), (b) the bundled chunk graph that exposes subagentRuns to the read-side chunk, or (c) the context wiring that supplies ctx.runs to handleSubagentsListAction.

runs in action-list.ts arrives via SubagentsCommandContext; if the context construction for /subagents was rewired in the 4.23 chat-command path and now passes an empty (or stale) snapshot of subagentRuns, the listing would always be (none) regardless of actual runtime state — consistent with what we see.

Not the same as related open issues

  • #71418 ("ERR_MODULE_NOT_FOUND for subagent-registry.runtime.js on every gateway boot") is a different code path — that file is present in the 2026.4.23 published dist/ (/usr/lib/node_modules/openclaw/dist/subagent-registry.runtime.js exists), and journalctl shows no ERR_MODULE_NOT_FOUND / subagent cleanup finalize failed lines on 2026.4.23. Cleanup may be fine here; the regression is on the read path.
  • #67901 ("plugins.allow prevents bundled subagents CLI command from running") is about CLI-command gating that produces an explicit error message. We see no error: the slash command runs cleanly and produces the empty list.

Reproduction

  1. Run 2026.4.23 (npm [email protected]).

  2. From a chat session whose default agent is configured with subagents.archiveAfterMinutes: 30 (any non-zero default works), trigger one or more subagents — e.g. send the agent a task that spawns subagents via the standard sessions_spawn / subagent.spawn path. Confirm via journalctl --user -u openclaw-gateway:

    [ws] ⇄ res ✓ agent runId=...:agent:main:subagent:<uuid>:...
  3. Within the next 30 minutes (and ideally while one is still mid-flight), send /subagents list.

Actual (2026.4.23)

active subagents:
-----
(none)

recent subagents (last 30m):
-----
(none)

Expected (matches 2026.4.22 behaviour on the same install)

active subagents:
-----
- agent:main:subagent:6ee38f5e... task=... state=processing age=2m
...

recent subagents (last 30m):
-----
- agent:main:subagent:e2d20904... task=... state=ok ended=22m ago
- agent:main:subagent:4e9ef154... task=... state=ok ended=4m ago

Suggested upstream investigation

Given source identity at the four list-side files, the change is likely upstream of buildSubagentList:

  1. Verify that subagentRuns (in src/agents/subagent-registry-memory.ts) actually receives subagent_started / subagent_ended writes during spawn on 4.23 — add a debug log on each write/update and confirm the map size grows when subagents are spawned.
  2. If writes are happening but the read side sees an empty snapshot, suspect chunk-instance separation (a known class of issue here, cf. #61614 dual jiti/ESM module-instance splitting and #59281 plugin loader behaviour) — verify that the chunk graph wires the same subagentRuns Map instance to both spawn-write and list-read sides.
  3. The spawn-side companion files (subagent-spawn-*, run-subagent-registry.runtime-*, subagent-registry-Bg4CK5Ik.js and friends in published dist/) all changed contents between 4.22 and 4.23 even though the four source-level files I sampled did not, suggesting the regression is in the bundle/chunking layer or in a caller upstream of the source files I sampled.

A QA scenario covering "spawn subagent → immediate /subagents list → expect non-empty" would catch this class of regression.

Environment

  • OpenClaw: 2026.4.23 (a979721)
  • Node: v24.14.0 (NodeSource setup_24.x, apt-held)
  • npm: 11.9.0
  • OS: Ubuntu 24.04.3 LTS, aarch64 (Linux VM on macOS host)
  • Install path: /usr/lib/node_modules/openclaw (via sudo npm install -g [email protected])
  • Run mode: user-level systemd --user unit (openclaw-gateway.service)
  • Default agent config (relevant subset):
"agents": {
  "defaults": {
    "subagents": {
      "maxConcurrent": 8,
      "archiveAfterMinutes": 30,
      "model": { "primary": "openai-codex/gpt-5.4", "fallbacks": ["anthropic/claude-sonnet-4-6"] },
      "thinking": "high"
    }
  }
}

Related

  • #71255 / #71261 / #71269 — three other 2026.4.22→2026.4.23 regressions, fixed on main (8262735354, b3db7c6987) and queued for 2026.4.24. This issue is filed in the same regression family but is not addressed by either of those fix commits.
  • #71418 — different subagent-registry code path (cleanup), different version (2026.4.12), not the same bug.
  • #67901 — plugins.allow gating produces an explicit error rather than silent empty; not the same surface as /subagents slash.

extent analysis

TL;DR

The most likely fix for the empty subagent list issue is to investigate and resolve the potential chunk-instance separation problem in the spawn-write and list-read sides of the subagentRuns Map instance.

Guidance

  • Verify that subagentRuns receives subagent_started / subagent_ended writes during spawn on 4.23 by adding a debug log on each write/update.
  • Check if the chunk graph wires the same subagentRuns Map instance to both spawn-write and list-read sides to suspect chunk-instance separation issues.
  • Review the spawn-side companion files (subagent-spawn-*, run-subagent-registry.runtime-*) for changes between 4.22 and 4.23 that may be causing the regression.
  • Create a QA scenario to cover "spawn subagent → immediate /subagents list → expect non-empty" to catch this class of regression.

Example

No code snippet is provided as the issue is more related to the investigation and debugging of the problem rather than a specific code fix.

Notes

The issue seems to be related to the chunking layer or the caller upstream of the source files, and not in the source-level read path. The fact that the source files are identical between 4.22 and 4.23 suggests that the problem lies elsewhere.

Recommendation

Apply a workaround by investigating and resolving the potential chunk-instance separation problem, as it is likely the cause of the empty subagent list issue. This approach is chosen because the issue is not clearly related to a specific version or configuration, and a thorough investigation is needed to identify the root cause.

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