Claude cannot remember my port number

Over the last week or so I finally tried Claude Code.
Every $%&#'ing time I try to use it, it tries to test the API with:
curl -s http://localhost:3000/api/v1/...
To which I have to interrupt it and remind it that my app is running on 5173
or 42069
or whatever other port I have setup for local dev.
To which it tells me—
—fixes it, and then a few minutes later it's trying to hit port 3000
again.
The House of Cards
What really frustrates me is that it seems like the only way for Anthropic to fix something like my port number issue is to add another hacky solution on top of the mountain of pre-existing hacky solutions which make LLMs do useful work.
"Before we send the response, check if there is a curl request which specifies a port number. If so, validate that it matches the value in .port_number file". Maybe something like this could fit as another tool on the toolchain. But then maybe it ends up stripping a piece of our perfectly valid documentation which specified a curl command to a different port.
This new category of non-deterministic software is insanity!
Don't get me wrong, the entire tech stack, from OS kernel to web development has always been a massively complex layer cake. In some ways, computers have always been like this. But doesn't it seem like there is something particularly cumbersome and chaotic about this battle against the non-determinism of LLMs?
There's no way they can keep improving upon this, right?