Skip to content

down + up does not restart the daemon, so a stack-file change stays unapplied #490

Closed

Description

@fen89

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 down actually 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+up if that doesn't end the daemon), e.g. pointing at the daemon pid in .devstack/daemon.json as 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 a kind = "devserver" frontend

Steps to reproduce

  1. devstack up with a stack file that has [services.foo.env] values
  2. Add a new key under [services.foo.env], save
  3. devstack status shows the "stack file changed since the daemon started" warning
  4. devstack down (or MCP down)
  5. devstack up (or MCP up) — services restart, build ids unchanged (no code changed, only the env)
  6. devstack status still shows the same "stack file changed" warning
  7. The new env var is not present in the restarted service's environment
  8. Find the daemon's pid in .devstack/daemon.json; it is the same pid as before step 4
  9. Manually Stop-Process that pid, then devstack up again (new pid in daemon.json) — now the env var is applied and the warning is gone

Activity

  1. added a commit that references this issue on Nov 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions