openclaw - 💡(How to fix) Fix [Bug] /status leaks full subagent prompt text when task has no label [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#59566Fetched 2026-04-08 02:43:09
View on GitHub
Comments
0
Participants
1
Timeline
0
Reactions
0
Participants

When running /status, the full subagent prompt (including runtime context, session keys, and task instructions) is displayed in the task summary line instead of a short title.

Root Cause

Two interacting bugs:

Fix Action

Workaround

Local patch applied to dist/commands-status-CFG5ky0y.js + SQLite cleanup of existing tasks. Patch is not upgrade-safe — overwritten by npm install -g openclaw.

Code Example

// Current (buggy):
const title = latest.label?.trim() || latest.task.trim();

---

// Patched:
const rawTitle = latest.label?.trim() || latest.task.trim().split("\n")[0];
const title = rawTitle.length > 80 ? rawTitle.slice(0, 77) + "…" : rawTitle;
RAW_BUFFERClick to expand / collapse

Description

When running /status, the full subagent prompt (including runtime context, session keys, and task instructions) is displayed in the task summary line instead of a short title.

Reproduction

  1. Spawn a subagent via sessions_spawn (runtime: "subagent")
  2. Wait for the subagent to complete
  3. Run /status
  4. The task line shows the entire runtime context and prompt text — potentially several KB of internal details

Root Cause

Two interacting bugs:

1. No truncation in formatSessionTaskLine()

File: dist/commands-status-CFG5ky0y.js, line ~27

// Current (buggy):
const title = latest.label?.trim() || latest.task.trim();

When a task has no label, the full latest.task string (entire multi-line prompt) is used as the display title with zero length limit.

2. Subagent completion creates tasks without labels

When a subagent finishes, OpenClaw creates a CLI task for result delivery. This task gets:

  • No label (NULL)
  • task field: The complete runtime context block, including the original subagent prompt

So the full prompt (with internal session details) gets stored in SQLite and displayed unfiltered via /status.

Suggested Fix

// Patched:
const rawTitle = latest.label?.trim() || latest.task.trim().split("\n")[0];
const title = rawTitle.length > 80 ? rawTitle.slice(0, 77) + "…" : rawTitle;

Changes:

  • Fallback to task takes only the first line instead of the entire multi-line text
  • Truncation to max 80 chars with ellipsis

Additionally, subagent delivery tasks should be created with a meaningful label (e.g., (subagent delivery task)) instead of leaving it NULL.

Impact

  • Information leak: internal runtime context (session keys, prompts, instructions) visible to anyone with CLI access
  • UX: /status output becomes unusably long with verbose subagent tasks

Environment

  • OpenClaw 2026.3.31 (Build 213a704)
  • macOS, Telegram channel

Workaround

Local patch applied to dist/commands-status-CFG5ky0y.js + SQLite cleanup of existing tasks. Patch is not upgrade-safe — overwritten by npm install -g openclaw.

extent analysis

TL;DR

Apply a patch to dist/commands-status-CFG5ky0y.js to truncate task titles and add meaningful labels to subagent delivery tasks.

Guidance

  • Identify and modify the formatSessionTaskLine() function in dist/commands-status-CFG5ky0y.js to implement title truncation and use only the first line of the task prompt.
  • Create subagent delivery tasks with a meaningful label to prevent displaying internal runtime context.
  • Perform a SQLite cleanup of existing tasks to remove verbose task summaries.
  • Consider upgrading to a fixed version of OpenClaw, if available, to ensure a permanent solution.

Example

const rawTitle = latest.label?.trim() || latest.task.trim().split("\n")[0];
const title = rawTitle.length > 80 ? rawTitle.slice(0, 77) + "…" : rawTitle;

Notes

The provided patch is not upgrade-safe and may be overwritten by npm install -g openclaw. A more permanent solution would involve updating the OpenClaw codebase to include the suggested fix.

Recommendation

Apply the workaround by patching dist/commands-status-CFG5ky0y.js and cleaning up existing tasks, as a permanent fix is not currently available.

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