Skip to content

quantcpp "prompt" backwards-compat mode broken in v0.12.x #54

@unamedkr

Description

@unamedkr

Description

The backwards-compatible one-shot mode documented in quantcpp --help and README does not work in v0.12.1.

Steps to Reproduce

pip install quantcpp  # v0.12.1
quantcpp "What is gravity?"

Expected Behavior

Model auto-downloads and generates a response (as documented):

backwards-compat (no subcommand):
  quantcpp "What is gravity?"       # one-shot

Actual Behavior

error: argument command: invalid choice: 'What is gravity?' (choose from pull, list, run, serve, client)

Root Cause

The argparse subcommand parser treats the first positional argument as a subcommand name. When a quoted prompt string is passed without a subcommand, argparse fails because "What is gravity?" is not in the subcommand choices.

Impact

  • Severity: P0 — The README's first example (quantcpp "What is gravity?") fails immediately
  • First-time users hit this on their very first interaction
  • The --help output documents this mode but it doesn't work

Suggested Fix

Add fallback logic: if the first positional arg is not a known subcommand, treat it as a prompt and enter one-shot mode. Alternatively, use argparse with nargs='?' for the subcommand or a custom parser.

Environment

  • quantcpp: 0.12.1 (PyPI)
  • Python: 3.14.3
  • OS: macOS 15 (Apple M3)

Reported by ClawTeam Claw-1 (Quickstart persona)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions