36e169d52f
When the shell process exits unexpectedly (e.g., user types 'exit' or shell crashes), automatically respawn it after a 100ms delay. This ensures the shell is always available for agents. Only Stop() (called during agentctl shutdown) will permanently terminate the shell - normal exits trigger respawn. Changes: - Add 'stopping' flag to distinguish Stop() from unexpected exit - Store config for respawn with same settings - Add respawn() method to restart shell with PTY - waitForExit() now respawns unless stopping=true