Skip to content

Config changes such as allowedRoots are silently ignored until server restart #364

Description

@wcf778

Summary

Changes to ~/.devspace/config.jsonc can be correct on disk while an already-running devspace serve process continues using the configuration loaded at startup.

This is especially confusing for settings such as allowedRoots: the configured path is present in the file, but open_workspace can continue returning Path is outside allowed roots until the server is restarted.

I am not necessarily requesting full hot reload. A clear restart requirement or stale-config diagnostic would solve most of the usability problem.

Environment

  • Windows x64
  • @waishnav/devspace 1.1.0-beta.4
  • ChatGPT connected through the MCP endpoint
  • Persistent devspace serve process

Reproduction

  1. Start DevSpace with an allowed root such as:
{
  "workspaces": {
    "allowedRoots": [
      "C:\\Users\\<user>\\Projects\\project-a"
    ]
  }
}
  1. Leave devspace serve running.
  2. Edit ~/.devspace/config.jsonc and add another root:
C:\Users\<user>\Projects\project-b
  1. Confirm that the file on disk contains the new root.
  2. Call:
open_workspace("C:\\Users\\<user>\\Projects\\project-b")

Actual behavior

The running server can still return:

Path is outside allowed roots

even though the configured path is present in config.jsonc.

Restarting devspace serve causes the same open_workspace request to succeed immediately without another config change.

Why this is difficult to diagnose

The persisted configuration is correct, so the failure looks like path normalization, allowlist containment, MCP host caching, or an authorization problem.

The actual cause in this reproduction was simply that the running server still held the configuration loaded when it started.

This can affect more than allowedRoots; other server-level settings can create the same mismatch between persisted and effective runtime state.

Expected behavior

Any of the following would make this much easier to diagnose:

  1. Safely hot-reload supported configuration fields; or
  2. Print a clear message when a config-changing CLI command requires a restart; or
  3. Have devspace doctor / devspace status detect that config.jsonc was modified after the current server started and report something like:
Warning: config.jsonc has changed since devspace serve started.
The running server may be using stale configuration.
Restart DevSpace to apply server configuration changes.

Suggested acceptance criteria

  • Documentation clearly states which configuration changes require restart.
  • devspace doctor can identify a likely stale-running-config condition.
  • Users changing allowedRoots do not have to infer from an authorization-style error that the daemon needs restarting.

Activity

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions