#Preflight error Python
8 messages · Page 1 of 1 (latest)
I found the runtime is on 2026.4.9, with 2026.4.14 available, so I'm checking whether this is a known fixed issue versus a persistent security state.
That quoted line looks more like a memory summary than the raw runtime error. I can’t find that exact string in the docs/source.
The Python blockers I can verify are these:
python -c/python3 -ccan be blocked bytools.exec.strictInlineEval- shell-wrapped or complex Python invocations can fail closed with
exec preflight: complex interpreter invocation detected
So if it has been blocked for a full day, I would not assume it is a temporary cooldown. I’d treat it as a persistent exec/preflight policy issue.
Please paste these 4 things:
openclaw --versionopenclaw logs --follow, then trigger one blocked Python runopenclaw doctor- the exact Python command OpenClaw is trying to run
Quick checks right now:
- If it’s using
python -corpython3 -c, try a real script file instead, likepython3 script.py - If it’s wrapped in
bash -lc "python ..."or chained with&&,||, or pipes, that can also trip preflight - Do not put
python3intools.exec.safeBins
Also, if you’re not on the latest version, update first. There have been a bunch of exec/preflight changes recently, and older builds can send you chasing ghosts.
Docs:
- https://docs.openclaw.ai/tools/exec
- https://docs.openclaw.ai/tools/exec-approvals
- https://docs.openclaw.ai/help/troubleshooting
If you paste the exact blocked log line, I can usually tell pretty fast whether this is strictInlineEval, interpreter preflight fail-closed behavior, or something else.
Version: OpenClaw 2026.4.14 (323493f)
Summary:
Python file execution works when called directly. The block triggers on specific patterns.
What Works:
python3 /path/to/script.py ✅ Direct execution
python3 -c "print('hello')" ✅ Inline eval
What Fails:
echo "code" > file.py && python3 file.py ❌ Staged execution (create + run)
cd /path && python3 script.py ❌ Command chaining (&&, ||, |)
Error Received:
exec preflight: complex interpreter invocation detected;
refusing to run without script preflight validation.
Use a direct python <file>.py or node <file>.js command.
Evidence:
• python3 ~/Ai/ComfyUI/main.py --help ✅ Ran successfully (returned usage)
• python3 /home/oem/.openclaw/workspace/visual_learning_v2.py ✅ Ran (hit runtime error, not preflight)
• echo > /tmp/test.py && python3 /tmp/test.py ❌ Blocked immediately
ComfyUI Specific:
ComfyUI process starts but exits with missing dependencies (alembic, custom comfy_aimdo module) — this is NOT a preflight block, it's a runtime dependency issue.
Configuration Check:
• No exec.strictInlineEval found in config
• No exec.safeBins configuration found
• tools.exec config path doesn't exist
Question for Support:
Is "complex interpreter invocation" triggered by:
- File creation followed by execution in same command?
- Any command chaining operator (&&, ||, |)?
- Both?
User Impact:
Cannot use common patterns like:
• cd ~/project && python3 main.py
• Staged script creation for dynamic workflows
Request:
Documentation or config flag to allow verified direct python script.py calls without chaining restrictions.
Nice, that narrows it down a lot. I’m checking the exact preflight rules now so I can answer whether it’s && specifically, staged create-and-run, or both, and whether there’s actually a knob for it.
Yep, I checked the source. The answer is both, but more specifically:
OpenClaw blocks when it sees:
- a Python/Node interpreter invocation,
- complex shell syntax like
&&,||,|,;, newlines,$(), backticks, or process substitution, and - a script hint in the same interpreter segment or pipeline.
So:
echo "code" > file.py && python3 file.pyfails, yescd /path && python3 script.pyfails, yes- but it is not “any
&&anywhere”, because something likenode --version && ls *.pyis explicitly allowed
So the real trigger is not just chaining by itself. It is chaining plus an interpreter run that looks like script execution OpenClaw can’t safely preflight as one pinned file.
A few important bits:
python3 script.pyis allowedpython3 -c "..."is allowed in your config becausestrictInlineEvalis not enabled- I do not see a documented config flag to disable this specific
complex interpreter invocationfail-closed check
Best current workaround patterns:
- use
workdirinstead ofcd ... && python3 script.py - create the file in one step, then run
python3 file.pyin a second step - avoid shell wrappers/chaining around interpreter execution if you want preflight to pass
So for agent/tool flows, prefer:
write→ createfile.pyexecwithworkdir=/pathand commandpython3 file.py
Relevant doc for the conservative interpreter rule: