quant.cpp icon indicating copy to clipboard operation
quant.cpp copied to clipboard

quantcpp run MODEL "prompt" ignores the prompt argument

Open unamedkr opened this issue 7 months ago • 1 comments

Description

quantcpp run MODEL "prompt" enters interactive mode instead of executing the prompt as a one-shot query. The prompt argument is silently ignored.

Steps to Reproduce

quantcpp run llama3.2:1b "What is Python?"

Expected Behavior

One-shot response, as documented in --help:

run MODEL [PROMPT]    Chat with a model (auto-pulls if needed)

Actual Behavior

  • Interactive mode starts (quantcpp — type your message, Ctrl+C to exit)
  • The "What is Python?" argument is silently ignored
  • If stdin is not a terminal (e.g., CI/scripts), it immediately exits with Bye!

Workaround

Pipe the prompt via stdin:

echo "What is Python?" | quantcpp run llama3.2:1b

Impact

  • Severity: P1 — Scripting and automation use cases are broken
  • The --help output documents run MODEL [PROMPT] but PROMPT has no effect

Environment

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

Reported by ClawTeam Claw-1 (Quickstart persona)

unamedkr avatar Apr 12 '26 01:04 unamedkr

Fixed: quantcpp run MODEL "prompt" now correctly passes the prompt to one-shot generation instead of entering interactive mode. The empty-list falsy check in cmd_run was the root cause.

unamedkr avatar Apr 12 '26 03:04 unamedkr