You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
A global flag placed before the subcommand makes the error's suggested example name the flag's VALUE as the command #984
Same failing command, same working directory — only the position of --pm-path differs:
$ pm plan show --pm-path /tmp/w/.agents/pm --json | jq .examples[ "pm plan --help", # correct "pm contracts --command <command> --flags-only --json"]
$ pm --pm-path /tmp/w/.agents/pm plan show --json | jq .examples[ "pm /tmp/w/.agents/pm --help", # the VALUE, as the command "pm contracts --command <command> --flags-only --json"]
The detail (pm plan show requires a plan id) and recovery.attempted_command are correct in both. Only the examples array changes.
What appears to happen
The example builder derives the command path by taking the first non-flag token after pm. With --pm-pathbefore the subcommand, that token is the flag's value, so the suggestion becomes pm <path> --help — a command that cannot work, and whose first argument is an absolute filesystem path.
Both orderings are valid: --pm-path is a documented host-owned global flag, and putting global flags before the subcommand is the conventional shape.
Why it matters more than a cosmetic error
examples is the field an agent reads to recover, and this is the failure path where recovery matters — a missing required argument. The suggestion is not merely unhelpful, it is confidently wrong: an agent that follows it runs a command whose first token is a path, gets a different error, and is now two steps from the actual problem. Nothing in the payload marks the example as derived rather than verified.
The version an agent sees depends on argument ordering it chose for unrelated reasons, so the same mistake produces good guidance or bad guidance arbitrarily.
How I found it, in case the shape recurs
Not by testing pm directly — by running pm ts-starter plan-demo, which shells out as pm --pm-path <path> plan show --depth standard --json and surfaces the nested error. Any extension that builds its argv with global flags first hits this on every usage error it forwards, which makes it more visible from extensions than from the CLI.
Suggested fix
Derive the command path from the parsed command rather than from raw argv position — recovery.attempted_command and normalized_args already have the correct structure in the same payload, so the information is present. Failing that, omit the <command> --help example when the path cannot be derived confidently, since a missing suggestion costs less than a wrong one.
Environment
@unbrained/pm-cli 2026.8.7 and 2026.8.11, Node 22/26, Linux.
Check the box below or use the @coderabbitai plan command to generate an implementation plan and prompts that you can use with your favorite coding assistant.
Create Plan
🧪 Issue enrichment is currently in open beta.
You can configure auto-planning by selecting labels in the issue_enrichment configuration.
To disable automatic issue enrichment, add the following to your .coderabbit.yaml:
issue_enrichment:
auto_enrich:
enabled: false
💬 Have feedback or questions? Drop into our discord!
Tracked canonically by pm-lph0y6. The PM item records the live reproduction, duplicate check across all statuses, related recovery/grammar lineage, and acceptance contract. It remains open and unclaimed because the active implementation in this delivery is the release-blocking linked-test Sentry isolation.
Activity
coderabbitai commentedon Aug 12, 2026
🔗 Related PRs
#51 - Polish CLI ergonomics, delete safety, and templates dedup [closed]
#136 - Add package install recovery and collision plans [closed]
#142 - Guard pm tracker path targeting for agents [closed]
#418 - Refactor residual CodeFactor complexity hotspots [merged]
#968 - SDK refusal recovery and executable reachability contracts [merged]
📝 Issue Planner
Check the box below or use the
@coderabbitai plancommand to generate an implementation plan and prompts that you can use with your favorite coding assistant.🧪 Issue enrichment is currently in open beta.
You can configure auto-planning by selecting labels in the issue_enrichment configuration.
To disable automatic issue enrichment, add the following to your
.coderabbit.yaml:💬 Have feedback or questions? Drop into our discord!
unbraind commentedon Aug 12, 2026
Tracked canonically by pm-lph0y6. The PM item records the live reproduction, duplicate check across all statuses, related recovery/grammar lineage, and acceptance contract. It remains open and unclaimed because the active implementation in this delivery is the release-blocking linked-test Sentry isolation.