mirror of
https://github.com/software-mansion/argent.git
synced 2026-09-14 19:27:14 +08:00
af4cc74eca
buildToolsServerEnv always overwrites ARGENT_PORT but only sets ARGENT_HOST when the caller asks for one, and the spawned child inherits the caller's environment. The auto-spawn path (MCP, `argent run`) never asked, so a developer with ARGENT_HOST exported got a server bound to that address while the handle it returned, the health check and the state file all named 127.0.0.1: every tool call then failed with ECONNREFUSED, and each run left the unreachable server behind. `argent server start` was unaffected because it always passes an explicit --host. Pass the host the auto-spawn path already records, and stop the env table promising that exporting ARGENT_PORT, ARGENT_HOST or ARGENT_IDLE_TIMEOUT_MINUTES reaches the tool-server: both launchers set all three, so the flags on `argent server start` are what actually move them.