openclaw - ✅(Solved) Fix Bug: QMD availability warnings are misleading when agent workspace cwd is missing [1 pull requests, 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#63158Fetched 2026-04-09 07:57:39
View on GitHub
Comments
0
Participants
1
Timeline
1
Reactions
1
Author
Participants
Timeline (top)
cross-referenced ×1

When memory.backend=qmd and an agent resolves to a missing workspace directory, OpenClaw logs a misleading spawn /usr/bin/qmd ENOENT warning that makes it look like the QMD binary is missing.

Root Cause

Node child process spawn can surface ENOENT when the requested cwd does not exist. The current availability check reports this as a QMD binary problem.

Fix Action

Fixed

PR fix notes

PR #63167: fix(memory): report missing qmd workspace cwd

Description (problem / solution / changelog)

Summary

  • fail the QMD availability probe early when the configured workspace cwd is missing or invalid
  • surface a workspace-specific doctor warning instead of implying the qmd binary itself is missing
  • add focused coverage for both the low-level probe and the doctor message path

Testing

  • node --no-maglev ./node_modules/vitest/vitest.mjs run --config vitest.unit.config.ts src/memory-host-sdk/host/qmd-process.test.ts
  • node --no-maglev ./node_modules/vitest/vitest.mjs run --config vitest.commands.config.ts src/commands/doctor-memory-search.test.ts

Closes #63158.

Changed files

  • src/commands/doctor-memory-search.test.ts (modified, +26/-0)
  • src/commands/doctor-memory-search.ts (modified, +12/-4)
  • src/memory-host-sdk/host/qmd-process.test.ts (modified, +12/-0)
  • src/memory-host-sdk/host/qmd-process.ts (modified, +23/-1)
RAW_BUFFERClick to expand / collapse

Summary

When memory.backend=qmd and an agent resolves to a missing workspace directory, OpenClaw logs a misleading spawn /usr/bin/qmd ENOENT warning that makes it look like the QMD binary is missing.

Reproduction

  1. Configure QMD memory.
  2. Configure an agent workspace path that does not exist.
  3. Start the gateway or trigger QMD availability checks.

Expected

The warning should clearly identify the missing workspace/cwd.

Actual

The warning reads like a broken binary install, for example:

  • qmd binary unavailable (/usr/bin/qmd); falling back to builtin: spawn /usr/bin/qmd ENOENT

Root Cause

Node child process spawn can surface ENOENT when the requested cwd does not exist. The current availability check reports this as a QMD binary problem.

Proposed Fix

Before spawning QMD:

  • verify the resolved cwd exists
  • emit a targeted warning like workspace directory missing: ...
  • optionally include the affected agent id

Why It Matters

This sends operators down the wrong debugging path. In our case the binary was fine; the real issue was ACP agents resolving to nonexistent workspaces.

extent analysis

TL;DR

Verify the existence of the workspace directory before spawning QMD to prevent misleading ENOENT warnings.

Guidance

  • Check the cwd path resolution to ensure it points to an existing directory before attempting to spawn QMD.
  • Modify the availability check to emit a clear warning indicating the workspace directory is missing, rather than implying a QMD binary issue.
  • Consider including the affected agent ID in the warning message for easier debugging.
  • Review agent configurations to ensure workspace paths are correctly set up and existent.

Example

const fs = require('fs');
const childProcess = require('child_process');

// Before spawning QMD
const cwd = '/path/to/workspace';
if (!fs.existsSync(cwd)) {
  console.warn(`Workspace directory missing: ${cwd}`);
  // Optionally include the affected agent ID
  // console.warn(`Workspace directory missing for agent ${agentId}: ${cwd}`);
} else {
  // Proceed with spawning QMD
  childProcess.spawn('/usr/bin/qmd', { cwd: cwd });
}

Notes

This fix assumes that the cwd path is resolvable and can be checked using fs.existsSync(). If the path resolution is more complex, additional modifications may be necessary.

Recommendation

Apply workaround: Modify the availability check to verify the workspace directory existence and emit a clear warning, as this directly addresses the root cause of the misleading ENOENT warnings.

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