From d04ad1a5b44ef279325683e6bd955d89ede872ce Mon Sep 17 00:00:00 2001 From: Xubin Ren <52506698+Re-bin@users.noreply.github.com> Date: Mon, 6 Jul 2026 15:44:26 +0800 Subject: [PATCH] fix(gateway): resolve runtime config path for state refresh --- nanobot/cli/commands.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nanobot/cli/commands.py b/nanobot/cli/commands.py index a8fa81ab..01db01dd 100644 --- a/nanobot/cli/commands.py +++ b/nanobot/cli/commands.py @@ -1307,13 +1307,16 @@ def _run_gateway( session_manager = SessionManager(config.workspace_path) # Self-heal the gateway state file with the current PID after any restart. + from nanobot.config.loader import get_config_path from nanobot.gateway.runtime import GatewayRuntime, GatewayRuntimePaths + + config_path = str(get_config_path().resolve(strict=False)) GatewayRuntime.refresh_state_pid( paths=GatewayRuntimePaths.for_instance( workspace=str(config.workspace_path) if not is_default_workspace(config.workspace_path) else None, - config_path=config.config_path, + config_path=config_path, ) )