n8n 2.38.4 Release - Task Runner and Shutdown Fixes


n8n released patch version [email protected] on September 7, 2026. This release resolves worker shutdown race conditions, external secret provider reload failures, and execution thread panics in core runtime components. The updates stabilize process teardown sequencing when operating containerized task workers in production environments.

The full release notes and downloads are on the GitHub release page.

Distributed task execution in worker deployments relies on coordinated shutdown protocols between the orchestrating broker and child runner processes. In high throughput queues, stopping a host instance without strict process ordering can leave active runners executing isolated steps or attempting to fetch jobs from a closed message channel.

Issue #37886 fixes the process teardown sequence by ensuring the core task broker stops prior to terminating child task runner processes. In commit a8fc772, the shutdown coordinator halts incoming work intake and closes broker communication channels before sending termination signals to child runner processes. This prevents runner processes from pulling new jobs off the queue while worker instances prepare to exit.

Additionally, issue #37765 addresses task execution timeouts during process termination. Previously, long running tasks could continue executing past the host process teardown budget. Commit 6e12447 caps task runner task timeouts to fit within the graceful shutdown window. When a SIGTERM signal arrives from container schedulers such as Kubernetes, active step execution bounds dynamically shrink to fit the remaining shutdown budget. This avoids abrupt SIGKILL signals from container runtimes that leave open database locks or uncommitted transaction state in target stores.

Enterprise workflow environments often use external secret stores to inject API keys and database credentials into workflow nodes at runtime. When updating credential configurations or handling network reconnects, maintaining state continuity is critical to avoid cascading execution failures.

Issue #37882 adds safety guards for external secret provider replacement in core secret resolution logic. In commit 1abbd4b, the runtime retains the active serving external secrets provider if an attempt to initialize a replacement provider fails. Prior to this fix, a failed provider reload could clear active provider references, leaving active workflow executions unable to fetch credentials. Under the updated logic, the system preserves the existing provider as a functional fallback until a valid replacement successfully initializes.

This patch release also improves sandbox setup performance and AI agent execution stability. Issue #37877 resolves sandbox container startup delays caused by package audit checks. In commit 6120419, the core runtime stops npm audit from stalling Instance AI sandbox setup routines. Eliminating this network roundtrip prevents sandbox initialization timeouts in egress restricted or air gapped network environments.

In issue #37722, exception handling within agent execution loops was updated to prevent thread corruption. Commit 1007dff stops Anthropic agent threads from breaking permanently when runtime or API errors occur. The fix isolates step execution exceptions, preserves worker thread state for subsequent workflow runs, and keeps error details fully visible in execution logs for operator troubleshooting.

The release assets and source code are available directly on GitHub: