The idea is:
Add a supported way to fully disable Code nodes (JavaScript/Python) on an n8n instance, so that task runners never need to be started at all. Since task runners exist specifically to isolate Code node execution, an instance that disallows Code nodes entirely has no reason to run a task runner — internal or external. Right now there’s no way to opt out of this: N8N_RUNNERS_ENABLED was deprecated in v2 (task runners are unconditionally enabled), so there’s no equivalent solution for instances that simply don’t want Code nodes or their overhead.
My use case:
I self-host n8n on a small VM. I don’t use Code nodes at all — I don’t need them and would be fine disabling them entirely. On n8n v1, resource usage was low and predictable. After migrating to v2, memory usage increased substantially because task runners now run regardless of whether any workflow uses a Code node. I’ve tried both internal and external runner modes, and both consume too much memory for my setup. If Code nodes could be disabled at the instance level (similar to how NODES_EXCLUDE already disables specific nodes like ExecuteCommand), the task runner subsystem would have no reason to start, and I’d get v1-level resource usage back.
I think it would be beneficial to add this because:
Task runners were introduced specifically to sandbox Code node execution safely. For instances that never use Code nodes — common on small self-hosted VMs — that entire subsystem is unnecessary overhead with no functional benefit. NODES_EXCLUDE already lets admins block specific nodes for security reasons; extending this (or a dedicated flag) to Code nodes specifically could let n8n skip starting the task runner infrastructure altogether when it’s excluded, restoring a lightweight footprint for that use case while keeping v2’s other improvements (Publish/Save, sub-workflow reliability, faster SQLite driver, etc.).
Any resources to support this?
Are you willing to work on this?
Yes, I could!