Published on

TIL: 'No module named' after an update meant a stale process

TIL: 'No module named' after an update meant a stale process
Authors
On this page

My Hermes agent started printing this on every turn:

Failed to load bundled provider plugin solstice: No module named 'httpx'

I almost ran pip install httpx. It would've done nothing, and here's what I discovered instead.

The module was there all along

Hermes doesn't run from one venv. Each update builds a fresh environment under ~/.hermes/installs/<id>/environments/<hash>/, and new launches use it. The .venv in the repo had httpx too, but that wasn't the interpreter doing the work either.

httpx landed in the new environment at 20:51. The gateway had been running since 08:12, and a chat window since the day before. Both were still on the environments they started with, from before the dependency existed.

Ask the process, not the scripts

Instead of reading launcher scripts, ask the running process what it loaded:

lsof -p <pid> | grep -o 'environments/[^/]*' | sort -u

The gateway showed an old hash. A fresh process showed the new one. The fix was a restart, with nothing to install:

hermes gateway restart

Then I quit and relaunched the long-lived chat window.

The funny part? The update log had told me. Its last line said the gateway restart didn't finish. I'd read the success message and skipped the warning right below it. Lesson learned: after an update, check that long-running processes restarted before you trust them.