Skip to content

feat: skip service restarts in grove tui when services already running #219

@windoliver

Description

@windoliver

Problem

Every grove tui invocation restarts the HTTP server and MCP server even when they are already running. This makes re-attaching to a session feel slow — especially noticeable when switching tmux windows or after a TUI crash.

Expected behavior

grove tui should detect already-running services and skip their startup, connecting directly to the existing Nexus backend and proceeding to the session picker immediately.

Proposed fix

In startServices() / screen-manager.tsx setup flow:

  • Check if HTTP server is already listening before starting it
  • Check if MCP server process is alive before spawning a new one
  • Connect to existing Nexus without re-running health init if nexusUrl resolves immediately

Impact

Reconnect time goes from ~8s → ~1-2s for the common case of re-attaching after detach or crash.

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