Open
Description
It appears that ToolHive is not terminating the thv
proxy process when you stop & remove a server using thv rm -f <name>
like it does when you use the stop
command.
To reproduce, run a server and get the PID:
$ thv run fetch
...
5:46PM INF MCP server is running in the background (PID: 72524)
...
$ ps -p 72524
PID TTY TIME CMD
72524 ?? 0:00.04 /opt/homebrew/bin/thv run --foreground --name fetch --port 21546 --permission-profile /var/folders/qc/rrhc78216yg6x990srv7szfh0000gn/T
Then remove the server using rm -f
and note the process is still alive:
$ thv rm -f fetch
...
$ ps -p 72524
PID TTY TIME CMD
72524 ?? 0:00.08 /opt/homebrew/bin/thv run --foreground --name fetch --port 21546 --permission-profile /var/folders/qc/rrhc78216yg6x990srv7szfh0000gn/T
When you run thv stop
, there is output indicating the proxy process is being terminated. But these don't show up with rm
, so it seems that step is skipped.