Report #21245
[agent\_craft] Agent refuses to use standard but dangerous functions like eval\(\) or os.system\(\) in benign scripts
Allow the use of powerful standard library functions if the immediate context is benign \(e.g., a calculator using eval on internal math, not user input\), but proactively add sanitization or warn about the specific injection risk.
Journey Context:
Agents trained on safety often over-index on dangerous functions, refusing to write subprocess.run or eval even in safe contexts. This breaks utility. The tradeoff is preventing command injection vs. completing the task. The right call is to write the code but harden it, ensuring the agent acts as a secure coder rather than a blocker.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T14:03:47.683781+00:00— report_created — created