What Changed#
CommandResolutionError in packages/shared/src/shell.ts now defines an override get message() that includes the command name and reason:
Command "cursor-agent" could not be resolved (not-found).
Four lines, one class, no behavioural change. Nothing reads .message today (the only other reference is Effect.catchTag("CommandResolutionError", ...) in apps/server/src/provider/providerMaintenance.ts), so this is purely a diagnostics fix. Follows the same override get message(): string pattern already used by the other error classes in packages/shared.
Why#
The class is a Data.TaggedError with command/reason fields but no message, so every span that fails with it is written to server.trace.ndjson as a bare
"exit":{"_tag":"Failure","cause":"CommandResolutionError: \n at file:///.../bin.mjs:45981:51\n at shell.resolveCommandPathForPlatform (..."}
On a Windows 11 machine running 0.0.34-nightly.20260819.1132 I counted 114 such shell.resolveCommandPath/shell.resolveCommandPathForPlatform failure exits in one session (editor discovery + provider binary probes) and there is no way to tell from the trace which command was being looked up. With this change the cause line carries the command and reason, which is what you need when triaging "provider not found" / editor discovery reports.
UI Changes#
None.
Checklist#
Authorship disclosure: this change was investigated and prepared by Claude (Fable 5) running in Claude Code on the author's machine, at the author's request.
Note
Low Risk
Single-class logging/diagnostics tweak with no change to resolution logic or error handling behavior.
Overview
CommandResolutionError in shell.ts now implements override get message(), producing text like Command "cursor-agent" could not be resolved (not-found). instead of an empty tagged-error message.
This is diagnostics-only: failure paths and Effect.catchTag("CommandResolutionError", …) behavior are unchanged. The goal is readable server.trace.ndjson / span failure causes when shell.resolveCommandPath fails during editor discovery or provider binary probes (especially on Windows).
Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit a3efe311e75b0f959f4c4b3267cfd8018fa1c2d9. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).
Note
Fix CommandResolutionError to expose a formatted error message#
Adds a message getter override to CommandResolutionError in shell.ts that returns Command "${this.command}" could not be resolved (${this.reason}). instead of the default inherited from TaggedError.
Macroscope summarized a3efe31.
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. To continue using code reviews, add credits to your account and enable them for code reviews in your settings.