Skip to content

engram update: start step uses launchctl load, which registers but never runs the job (mcp did not answer within 90s) #147

Description

@devinmlowe

What happened

engram update --yes on macOS (git-checkout install, 0.4.0 -> 0.4.0 re-run on 2026-09-21) failed at the restart step:

start mcp: mcp did not answer on its port within 90s

The automatic code-only rollback then failed at the same step, leaving /Users/devinmlowe/git/engram detached at the previous sha with all three services loaded but not running.

Root cause

The supervisor adapter in src/interfaces/cli/services.ts starts a launchd job with launchctl load <plist>. From this context (a non-login shell spawned by Claude Code inside tmux) that call registered the job but never ran it: launchctl print gui/501/ai.hermes.engram-mcp showed runs = 0, and launchctl list listed the label with no PID. The /health poll therefore timed out.

launchctl kickstart -k gui/501/<label> started each job immediately and /health answered within seconds.

Suggested fix

  • After launchctl load (or bootstrap), run launchctl kickstart -k gui/<uid>/<label> so the job actually starts regardless of RunAtLoad handling.
  • Before polling /health, check the job has a PID (launchctl print / launchctl list) and report "job registered but not running" instead of the generic port timeout.
  • Rollback should use the same start path, otherwise a start-step failure also breaks the rollback and the install ends up detached.

Environment

macOS 26 (Darwin 25.6.0), engram 0.4.0 git checkout, launchd agents ai.hermes.engram-mcp, com.engram.visualizer, com.engram.dreamstate.

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

    bugSomething isn't workingpriority: P2Soon: correctness gaps and small fixes with clear value

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions