Severity: low / Confidence: high / Category: bug
Triage: confirmed-bug
Detected against: openclaw v2026.5.18 (latest stable at time of scan, 2026-05-18)
Tooling: clawpatch 0.3.0 + acpx/claude-sonnet-4-5 via Brad Mills protocol
Evidence
src/cli/acp-cli.ts:52-52 (registerAcpCli)
defaultRuntime.error(`ACP bridge failed: ${formatErrorMessage(err)}`);
src/cli/acp-cli.ts:76-76 (registerAcpCli)
defaultRuntime.error(String(err));
Reasoning
The parent acp command formats errors through formatErrorMessage, which normalises Error objects to readable messages. The acp client subcommand uses String(err), which for a plain Error produces '[object Error]' in environments where Error.prototype.toString returns the default. This degrades the UX for client failures versus server failures and creates inconsistency that makes log triage harder.
Reproduction
Throw a non-Error object (e.g. throw { code: 42 }) inside runAcpClientInteractive; the acp client action emits '[object Object]' while acp would emit a structured message.
Recommendation
Change line 76 in src/cli/acp-cli.ts from defaultRuntime.error(String(err)) to defaultRuntime.error(formatErrorMessage(err)). formatErrorMessage is already imported in the file.
Why existing tests miss this
No tests exist for the CLI registration functions in this file group.
Suggested regression test
Unit test: mock runAcpClientInteractive to reject with a plain object; assert the emitted error message equals the output of formatErrorMessage, not '[object Object]'.
Minimum fix scope
Single-line change in src/cli/acp-cli.ts line 76.
Standardized clawpatch finding. Persistent in v2026.5.18 (not resolved by upgrading from v2026.5.12). Finding ID: fnd_sig-feat-cli-command-17e3589ff2-_d9920221f1.
Severity: low / Confidence: high / Category: bug
Triage: confirmed-bug
Detected against: openclaw v2026.5.18 (latest stable at time of scan, 2026-05-18)
Tooling: clawpatch 0.3.0 + acpx/claude-sonnet-4-5 via Brad Mills protocol
Evidence
src/cli/acp-cli.ts:52-52(registerAcpCli)src/cli/acp-cli.ts:76-76(registerAcpCli)Reasoning
The parent acp command formats errors through formatErrorMessage, which normalises Error objects to readable messages. The acp client subcommand uses String(err), which for a plain Error produces '[object Error]' in environments where Error.prototype.toString returns the default. This degrades the UX for client failures versus server failures and creates inconsistency that makes log triage harder.
Reproduction
Throw a non-Error object (e.g. throw { code: 42 }) inside runAcpClientInteractive; the acp client action emits '[object Object]' while acp would emit a structured message.
Recommendation
Change line 76 in src/cli/acp-cli.ts from
defaultRuntime.error(String(err))todefaultRuntime.error(formatErrorMessage(err)). formatErrorMessage is already imported in the file.Why existing tests miss this
No tests exist for the CLI registration functions in this file group.
Suggested regression test
Unit test: mock runAcpClientInteractive to reject with a plain object; assert the emitted error message equals the output of formatErrorMessage, not '[object Object]'.
Minimum fix scope
Single-line change in src/cli/acp-cli.ts line 76.
Standardized clawpatch finding. Persistent in v2026.5.18 (not resolved by upgrading from v2026.5.12). Finding ID:
fnd_sig-feat-cli-command-17e3589ff2-_d9920221f1.