Summary
wiki_lint can fail at the tool layer with:
unable to resolve opened file path
when the bundled memory-wiki tool returns the raw lintMemoryWikiVault() result object directly. In practice, the CLI lint path can succeed while the wiki_lint tool invocation fails.
Environment
- OpenClaw: bundled global install on Linux
- memory-wiki bundled plugin
- bridge-mode wiki vault
- direct tool invocation:
wiki_lint
- CLI comparison:
openclaw wiki lint
Reproduction
- Use a configured memory-wiki vault with bridge content.
- Invoke the agent tool
wiki_lint.
- Observe tool-layer failure similar to:
unable to resolve opened file path
At the same time, the CLI path can still succeed:
Actual behavior
The tool wrapper returns the raw lint result object, including absolute reportPath and the full details payload:
return {
content: [{ type: "text", text: summary }],
details: result,
};
This appears to interact badly with the tool/result handling path and can produce the unable to resolve opened file path failure even though lint itself succeeded.
Expected behavior
wiki_lint should return successfully, the same way the CLI does, and should not require callers to consume raw absolute-path-heavy internals.
Validated fix
A minimal fix in extensions/memory-wiki/src/tool.ts is to:
- normalize
reportPath to be relative to the vault root for tool output
- return a lightweight
details object instead of the raw result
Example shape:
const reportPath = result.reportPath.startsWith(config.vault.path)
? result.reportPath.slice(config.vault.path.length + 1)
: result.reportPath;
return {
content: [{ type: "text", text: summary }],
details: {
issueCount: result.issueCount,
issues: result.issues,
issuesByCategory: result.issuesByCategory,
reportPath,
vaultRoot: config.vault.path,
},
};
Validation
I added a focused test in extensions/memory-wiki/src/tool.test.ts for:
- relative
reportPath (reports/lint.md)
- lightweight
details
and ran:
corepack pnpm exec vitest run --project extension-memory \
extensions/memory-wiki/src/markdown.test.ts \
extensions/memory-wiki/src/tool.test.ts
Result:
2 passed
9 passed
- exit code
0
On the live install, after applying the tool-side change, wiki_lint returned normally instead of failing.
Why open separately
There is already existing discussion around lint false positives and wikilink resolution, but this is a different bug surface:
- not link resolution correctness
- not lint core logic
- specifically the tool wrapper / result transport layer for
wiki_lint
Acceptance criteria
wiki_lint tool invocation does not fail with unable to resolve opened file path
openclaw wiki lint and wiki_lint both succeed against the same vault
- tool output uses a stable relative
reportPath and a bounded details payload
Summary
wiki_lintcan fail at the tool layer with:unable to resolve opened file pathwhen the bundled memory-wiki tool returns the raw
lintMemoryWikiVault()result object directly. In practice, the CLI lint path can succeed while thewiki_linttool invocation fails.Environment
wiki_lintopenclaw wiki lintReproduction
wiki_lint.At the same time, the CLI path can still succeed:
Actual behavior
The tool wrapper returns the raw lint result object, including absolute
reportPathand the full details payload:This appears to interact badly with the tool/result handling path and can produce the
unable to resolve opened file pathfailure even though lint itself succeeded.Expected behavior
wiki_lintshould return successfully, the same way the CLI does, and should not require callers to consume raw absolute-path-heavy internals.Validated fix
A minimal fix in
extensions/memory-wiki/src/tool.tsis to:reportPathto be relative to the vault root for tool outputdetailsobject instead of the rawresultExample shape:
Validation
I added a focused test in
extensions/memory-wiki/src/tool.test.tsfor:reportPath(reports/lint.md)detailsand ran:
corepack pnpm exec vitest run --project extension-memory \ extensions/memory-wiki/src/markdown.test.ts \ extensions/memory-wiki/src/tool.test.tsResult:
2 passed9 passed0On the live install, after applying the tool-side change,
wiki_lintreturned normally instead of failing.Why open separately
There is already existing discussion around lint false positives and wikilink resolution, but this is a different bug surface:
wiki_lintAcceptance criteria
wiki_linttool invocation does not fail withunable to resolve opened file pathopenclaw wiki lintandwiki_lintboth succeed against the same vaultreportPathand a bounded details payload