llm-prompt-always-via-stdin
IN premise
Prompts are passed to LLM subprocesses via `subprocess.run(input=...)`, never as command-line arguments — avoiding shell injection and argument length limits.
Summary
Sending prompts through standard input rather than command-line arguments is a deliberate security and reliability choice. It prevents shell injection attacks where a crafted prompt could escape quoting and execute arbitrary commands, and it sidesteps operating system limits on argument length that would silently truncate long prompts.
Details
| Source | entries/2026/05/05/reasons_lib-llm.md |