From c5034c03c7802c289678d0c0b1763f370a2268ee Mon Sep 17 00:00:00 2001 From: Jason <101583541+JasonOA888@users.noreply.github.com> Date: Mon, 30 Mar 2026 09:51:07 +0800 Subject: [PATCH] fix(dev): exclude sandbox dirs from gateway hot-reload watcher (#1519) * fix(dev): exclude sandbox dirs from gateway hot-reload watcher The dev-mode gateway uses --reload which watches for file changes. Sandbox containers mount the repo and write .pyc/__pycache__ during execution, triggering spurious gateway restarts mid-request. Add --reload-exclude for .pyc, __pycache__, and sandbox/ paths so only actual source changes trigger a reload. Fixes #1513 * Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: JasonOA888 Co-authored-by: Willem Jiang Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- scripts/serve.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/serve.sh b/scripts/serve.sh index d023adf00..7f1d82988 100755 --- a/scripts/serve.sh +++ b/scripts/serve.sh @@ -122,7 +122,7 @@ mkdir -p logs if $DEV_MODE; then LANGGRAPH_EXTRA_FLAGS="--no-reload" - GATEWAY_EXTRA_FLAGS="--reload --reload-include='*.yaml' --reload-include='.env'" + GATEWAY_EXTRA_FLAGS="--reload --reload-include='*.yaml' --reload-include='.env' --reload-exclude='*.pyc' --reload-exclude='__pycache__' --reload-exclude='sandbox/' --reload-exclude='.deer-flow/'" else LANGGRAPH_EXTRA_FLAGS="--no-reload" GATEWAY_EXTRA_FLAGS=""