Skip to content

ao stop kills the tmux server and every session's worker process — surprising and destructive #2104

@Bdandc

Description

@Bdandc

Summary

ao stop terminates the tmux server in addition to AO's own components. Every session worker process dies as a side effect, even sessions that were in active conversation. Restoration via ao start --restore recovers the session metadata but each Claude Code worker has to choose "Resume from summary / Resume full" again before it can continue — non-trivial loss of working state.

The CLI surface gives no warning that stop is destructive in this way; users naturally assume start and stop are symmetric.

Repro

  1. ao start, spawn a session, get Claude to a non-trivial mid-conversation state.
  2. Run ao stop (e.g. to change a config).
  3. Observe: tmux list-sessions returns "no server running on /tmp/tmux-501/default". The Claude conversation in that session is no longer attached to any live process.
  4. ao start --restore brings the session metadata + tmux session back, but Claude restarts in "Resume from summary / Resume full" mode — its prior in-memory state is gone.

What I'd expect

Either:

  • ao stop should leave the tmux server running by default; sessions stay live, just unsupervised by AO. A separate ao stop --halt-sessions flag for the current behaviour.
  • Or at minimum warn before destroying sessions, with a confirmation if any are in non-terminal state (the same --yes machinery ao stop already supports for "active sessions").

The current behaviour is surprising because:

  • ao start and ao stop look symmetric from the CLI surface.
  • The header comment in single-port-server.js and the dashboard architecture treat tmux as an external runtime AO talks to, not as a child AO owns.
  • ao stop --help doesn't mention tmux.

Environment

  • @aoagents/ao v0.9.4
  • macOS Apple Silicon
  • runtime: tmux, agent: claude-code

Related

Same package, but different file from #2102 (probe noise) and #2103 (single-port-server ECONNRESET).

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