Skip to content

consult: --type spec without --protocol exits 0 with no review #54

Description

@pseudoseed

What happens

consult -m opencode --type spec --issue 52 --branch spec/52-v2-server-events --output /tmp/out.md

Prints Prompt template not found: codev/consult-types/spec-review.md and exits 0. The output file contains that line and nothing else. No review ran.

Why it matters

Exit 0 means every caller treats this as success. A porch step, a script, or a background invocation records a consultation that never happened. The failure is indistinguishable from a clean pass unless a human reads the output file and notices it is two lines long.

This is the exact failure mode lessons-critical.md names:

"I could not tell" must never be spelled the same way as "no". A truncation, an unreachable API, and a server too old to answer each need their own signal and must emit nothing else — a partial or empty answer reads as a complete, negative one.

An unrunnable review is currently spelled the same as a completed one.

Root cause

spec-review.md exists only under protocol scope:

packages/codev/skeleton/protocols/spir/consult-types/spec-review.md
packages/codev/skeleton/protocols/aspir/consult-types/spec-review.md

Top-level consult-types/ has only integration-review.md. So --type spec cannot resolve without --protocol, and --type plan will have the same shape.

Adding --protocol spir resolves it and the review runs normally, so the fix is about the failure signal rather than the resolution.

Suggested fix

  1. Exit non-zero when no template resolves. A review that could not run is not a success.
  2. Name the resolution attempt in the error: which tiers were searched, and that --protocol is likely missing. Prompt template not found: codev/consult-types/spec-review.md points at a path that is not where the file lives for any protocol, which sends you looking in the wrong place.
  3. Consider validating at argument-parse time that --type spec and --type plan require --protocol, the way the skill already documents --protocol requiring --type.

Found while consulting on spec 52 from an architect session.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/consultMulti-agent consultation CLIbugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions