Reject simultaneous prompt and stdin_input in run_claude

Co-authored-by: Yassin Kortam <yassin@berri.ai>
This commit is contained in:
Cursor Agent 2026-05-17 01:26:33 +00:00
parent 3ce6ce2f77
commit 6d6689258e
No known key found for this signature in database

View file

@ -121,6 +121,8 @@ def run_claude(
"""
if prompt is None and stdin_input is None:
raise ValueError("must supply either `prompt` or `stdin_input`")
if prompt is not None and stdin_input is not None:
raise ValueError("must supply only one of `prompt` or `stdin_input`, not both")
if prompt is not None and not prompt:
raise ValueError("prompt must be a non-empty string when provided")
if not model: