Files
hermes-agent/hermes_cli
686f6c61 c89be4c52d fix(cron): spawn bot-chat delivery from a live cwd
The cron bot-chat delivery child inherited the scheduler's cwd; when that
directory had been removed (a kanban worker whose scratch workspace was reaped
by completion cleanup) the child died in `hermes_cli/_startup_fast.py::
ensure_project_root_on_path` — a relative `sys.path` entry goes through
`os.getcwd()` inside `realpath`, which raises FileNotFoundError — before it
could parse argv, and the finished job was booked `delivery_failed`.

- `_run_bot_chat_turn` pins the child's `cwd` to the target home the lane has
  already verified exists (`env["HERMES_HOME"]`).
- `ensure_project_root_on_path` resolves entries through a `realpath` that
  tolerates a gone cwd, so any `hermes` invocation from a dead directory still
  starts (the second half of #102941).

Salvaged from #102967 (@686f6c61), resolved onto the report-driven Popen lane
(#113608); tests drive the CLI entry point and the delivery spawn seam from a
deleted cwd.
2026-09-20 11:30:36 -07:00
..
…
…
…
…
…
…
…