Skip to content

rc schema silently returns the root schema for an unknown command arg #147

Description

@joshdholtz

What happens

rc commands --json emits capability IDs in colon form (apps:create, products:store:plan). rc schema expects space-separated tokens (rc schema apps create). Feeding the colon form back in silently returns the root rc schema with exit code 0 and no error:

rc schema apps create   # ✅ returns the apps-create schema
rc schema apps:create   # ⚠️ returns the ROOT schema (name: "rc"), exit 0, no error

Why it matters

An agent's natural discovery loop is: run rc commands, copy an identifier, run rc schema <that identifier>. Since rc commands gives colon IDs, the agent pastes apps:create and gets a valid-looking-but-empty root schema. It concludes the command takes no args/flags and either guesses or gives up. The failure is silent, so it's hard to notice.

Found while auditing the AI Toolkit skills: multiple agents hit this independently.

Expected

rc schema <unknown-or-colon-joined-arg> should exit non-zero with an error (e.g. "unknown command: apps:create; did you mean apps create?") rather than falling back to the root schema.

Workaround / note

  • rc schema apps create (space form) works correctly.
  • rc commands --schemas --json returns per-command detail for everything in one call and is the more reliable agent path.

Low severity (a doc/UX papercut, not data loss), but it defeats the primary "ask the binary" discovery flow for agents.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions