Repository navigation
Description
What happened
After editing the stack file to add a new env var on a native service (e.g. [services.api-e2e.env] gets a new key), devstack status correctly shows:
! the stack file changed since the daemon started; it applies with `devstack down` + `devstack up`
Running devstack down followed by devstack up (here: via the MCP tools down / up, which call POST /v1/down and POST /v1/up) stops and restarts every service as expected, and the "stack file changed" banner... stays. The new env var still does not reach the restarted process.
Checking .devstack/daemon.json shows the daemon's own pid has not changed across the down/up cycle — the daemon process itself kept running the whole time, still holding the devstack.toml it parsed at its own startup. Only after manually killing that pid (Stop-Process) and running devstack up again (which spawns a fresh daemon) did the new env var actually show up in the running service.
This contradicts the docs, which say a plain down ends the daemon by itself once no tree uses it anymore ("the daemon ends by itself once no tree runs"), and that the fix for the stale-config warning is simply down + up. In this case there was exactly one tree (no worktrees/lanes), nothing else was using the daemon, yet it survived down.
Expected
Either:
devstack downactually ends the daemon when nothing else depends on it (matching the documented behavior and the "stack file changed" guidance), or- the "stack file changed" message/guidance names a command that reliably reloads the file (not
down+upif that doesn't end the daemon), e.g. pointing at the daemon pid in.devstack/daemon.jsonas a fallback.
Environment
- devstack 0.42.0
- Windows 11 Pro (10.0.26200)
- A single working tree, no other lanes/worktrees, no other stack using the daemon
- Stack file: a handful of native
kind = "service"entries (a .NET API built from source, two instances on different ports) plus a Compose group for Postgres, and akind = "devserver"frontend
Steps to reproduce
devstack upwith a stack file that has[services.foo.env]values- Add a new key under
[services.foo.env], save devstack statusshows the "stack file changed since the daemon started" warningdevstack down(or MCPdown)devstack up(or MCPup) — services restart, build ids unchanged (no code changed, only the env)devstack statusstill shows the same "stack file changed" warning- The new env var is not present in the restarted service's environment
- Find the daemon's pid in
.devstack/daemon.json; it is the same pid as before step 4 - Manually
Stop-Processthat pid, thendevstack upagain (new pid indaemon.json) — now the env var is applied and the warning is gone
Activity
fix: an up after a down takes the changed stack file (#490) (#493)
chore: 0.43.0 (#495)