You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(cli): add bounded graceful server shutdown #144
Wave 3 — user-facing lifecycle control. Implement after #3160 establishes durable local ownership and a bounded shutdown API.
Problem
Users need a supported way to stop Gym services without tracking terminals or killing individual PIDs. The command must consume #3160 rather than create a second process-discovery and termination path.
Essential scope
Stop all locally owned services or a selected service.
Report graceful, timed-out, force-terminated, already-stopped, and unresolved-remote-cleanup results.
Make repeated stop safe.
Document graceful versus forced local shutdown and the limits of remote cleanup.
Dependencies
Hard dependency on #3160's durable process ownership and shutdown API. Remote release state is consumed when #2609/#3037 provides it but does not block the local command.
Acceptance criteria
Users can stop all services or one selected service through gym env.
Graceful shutdown uses one overall deadline.
Force escalation is explicit and never the first default action.
Repeating stop is safe when services are already stopped.
Local exit and unresolved remote cleanup are reported separately.
Shutdown exceeded the grace period. On Ctrl-C the three child services did not stop within Gym's one-second window and were killed; Ray then printed expected GCS-disconnected messages and a second interrupt was needed. Cosmetically alarming at the end of an otherwise clean run.
@ananthsub could we also work this into this ticket or track as a separate item?
Activity
[-]Add CLI command to gracefully shutdown running servers[/-][+]feat: CLI command to gracefully shutdown running servers[/+][-]feat: CLI command to gracefully shutdown running servers[/-][+]feat(cli): add bounded graceful server shutdown[/+]cwing-nvidia commentedon Sep 19, 2026
Other user reported friction related to shutdown
@ananthsub could we also work this into this ticket or track as a separate item?