Skip to content

daemon start silently overrides persisted ui_enabled=false and re-enables the graph UI listener #2114

Closed

Description

@0x4nur4g

Summary

On 0.10.8 (macOS arm64, official binary at ~/.local/bin), an explicit codebase-memory-mcp daemon start re-enables the graph UI even when ui_enabled was just persisted to false, and writes ui_enabled=true back into the config. The auto-spawn path (daemon started on demand by the MCP front-end) respects the persisted setting, so the two start paths disagree.

Repro

$ codebase-memory-mcp daemon stop
$ codebase-memory-mcp config set ui_enabled false
  ui_enabled = false
  (restart the daemon for this to take effect)
$ codebase-memory-mcp config list | grep ui_enabled
  ui_enabled                = false
$ codebase-memory-mcp daemon start
  daemon: started (permanent, pid ...)
  ui: warming asynchronously on configured port 9749
$ lsof -nP -i :9749
  codebase-…  LISTEN  # UI is back
$ codebase-memory-mcp config list | grep ui_enabled
  ui_enabled                = true      # persisted setting was overwritten

Expected

daemon start honors the persisted ui_enabled=false — the config set output itself says "restart the daemon for this to take effect", implying a restart applies the setting rather than discarding it.

Auto-spawn path behaves correctly

With ui_enabled=false persisted and no daemon running, connecting an MCP client (stdio front-end) auto-spawns the daemon and the UI stays off:

$ codebase-memory-mcp config list | grep ui_enabled
  ui_enabled                = false
$ < MCP initialize over stdio >
  # daemon auto-spawns, server initializes (~6s cold)
$ lsof -nP -i :9749
  # no listener
$ codebase-memory-mcp config list | grep ui_enabled
  ui_enabled                = false      # unchanged

Impact

Users who deliberately disabled the UI (headless hosts, minimal footprint, port policy) silently regain a listening UI on 127.0.0.1:9749 after any manual daemon start. Since the warm daemon is the recommended way to avoid per-command startup cost, the only way to keep the UI off today is to never run daemon start and accept the cold auto-spawn.

Environment

Related: #1760 (rendezvous state), #1828 (misleading 30s timeout reporting).

Activity

  1. niyatichaurasia commented on Sep 9, 2026

    @niyatichaurasia

    Hi! I'd like to work on this issue. I'll reproduce the configuration/state divergence between manual daemon start and the auto-spawn path, trace where the persisted ui_enabled=false value is overridden, and submit a minimal fix with regression coverage ensuring a disabled UI remains disabled across daemon restarts.

  2. added
    bugSomething isn't working
    priority/highNeeds near-term maintainer attention; high-impact bug, regression, safety issue, or release blocker.
    and removed
    stability/performanceServer crashes, OOM, hangs, high CPU/memory
    on Sep 9, 2026
  3. DeusData commented on Oct 19, 2026

    @DeusData
    Owner

    Thank you for the manual-start versus auto-spawn comparison, and @niyatichaurasia for offering a focused reproduction and fix. Preserving the explicit disabled setting is the behavior to verify. I have no new implementation or release status to report.

  4. DeusData commented on Nov 9, 2026

    @DeusData
    Owner

    Fixed on main by #2205 (merge commit 1cee123) - thanks @vincentkoc, and thank you @0x4nur4g for the clear comparison of manual start and auto-spawn. A bare daemon start now keeps a UI you disabled with config set ui_enabled false. Only daemon start --open or daemon start --port=N turns it back on and saves that choice.

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

    bugSomething isn't workingeditor/integrationEditor compatibility and CLI integrationpriority/highNeeds near-term maintainer attention; high-impact bug, regression, safety issue, or release blocker.ux/behaviorDisplay bugs, docs, adoption UX

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions