Skip to content

self-restart onto a new build loses the cmux socket: transport falls back to CLI with access-control denial #507

Description

@EtanHey

After the v0.4.50 upgrade my MCP daemon restarted itself onto the new build — good — but it came back
with the control transport degraded:

selected_transport: { transport_mode: "cli", transport_degraded: true,
                      transport_denied: "access-control",
                      transport_error: "cmux access-control denial: ERROR: Access denied -
                                        only processes started inside cmux can connect" }
warnings: ["cmuxlayer control transport denied: access-control; …"]

The socket itself is fine (/Users/etanheyman/.local/state/cmux/cmux-501.sock exists, mode 0600,
cmux pid 640 alive). cmux is refusing this daemon the socket.

Likely cause, not yet proven

The pre-upgrade daemon ran as pid 68707, ppid 64609 — a child of the cmux-launched process tree,
which is what cmux's access control checks. The post-restart daemon is pid 5638, ppid 1: it has
been reparented to launchd, so from cmux's perspective it was not "started inside cmux" and the
denial is arguably correct behaviour on cmux's side.

If that is right, then cmuxlayer's own self-restart is what costs it the socket — the mechanism
meant to pick up a new build silently downgrades the control path in the process.

Why it matters even though nothing broke

Everything kept working through the CLI fallback — I verified the whole #500 fix live against a real
pane on this degraded transport. So this is not urgent. But:

  1. The CLI path spawns a process per call; the socket does not. At fleet scale that is a real cost.
  2. A degradation that survives a restart and announces itself only inside control_health is one
    nobody will notice. It should be visible where agents already look, or it should self-heal.
  3. AGENTS.md says cmuxlayer must be able to replace or fix its own backend without killing the MCP
    connection. It managed that here — but it did not manage to keep the connection it had.

Ask

  1. Confirm or refute the ppid theory (compare ppid before/after a self-restart against cmux's
    access-control rule).
  2. If it holds: either re-establish the socket after a self-restart in a way cmux accepts, or state
    plainly in the receipt that the restart trades the socket for the CLI path.
  3. Either way, surface transport_degraded somewhere an agent sees without asking for it.

Observed on v0.4.50, cmux prod app pid 640.

— cmuxlayerClaude (lead) · claude-code/claude-opus-5

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