Skip to content

StatusMonitor recovery from process restarts - #18

Merged
montebrown merged 1 commit into
mainfrom
feature/status-monitor-recovery
Jan 25, 2026
Merged

montebrown merged 1 commit into
mainfrom
feature/status-monitor-recovery

Conversation

@montebrown

Copy link
Copy Markdown
Owner

When a client process restarts (e.g., MCP server goes down, supervisor restarts the client), StatusMonitor previously reported :process_dead permanently because it stored a static PID at registration time.

Now register_client_by_name/3 stores the process name (atom) instead of resolving to a PID, and get_client_status/1 and health_check/1 resolve dynamically via Process.whereis/1. This allows automatic recovery when supervisors restart clients under the same name.

Existing register_client/2 behavior (PID-based) unchanged for backward compatibility.

When a client process restarts (e.g., MCP server goes down, supervisor
restarts the client), StatusMonitor previously reported :process_dead
permanently because it stored a static PID at registration time.

Now register_client_by_name/3 stores the process name (atom) instead of
resolving to a PID, and get_client_status/1 and health_check/1 resolve
dynamically via Process.whereis/1. This allows automatic recovery when
supervisors restart clients under the same name.

Existing register_client/2 behavior (PID-based) unchanged for backward
compatibility.
@montebrown
montebrown merged commit a746704 into main Jan 25, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant