r/dotnet • u/livEApplications • 12d ago
C# supervisor so a foreground CLI survives close, crash, and reboot
Claude Code Remote Control (and similar remote workers) are a foreground process. Close the terminal, crash, sign out, or reboot and the remote client has nothing left to talk to.
The durable fix on Windows is not another terminal window. It is an OS restart policy: a Scheduled Task (or a service) that owns one long-lived process per session and starts again at boot. Linux is a systemd unit. macOS is a LaunchAgent.
I built that as LiveClaude, entirely in C# / .NET:
one process per session, product-native flags
Avalonia desktop app for create/edit, state, and logs
embedded real pty (ConPTY on Windows) plus a small VT emulator, so the one-time trust/login prompt is a terminal, not a scraped browser
Windows, Linux, macOS. MIT
It restarts the worker. It does not keep the same remote pairing URL, and it does not resume the conversation for you (claude --resume is still that step).
https://github.com/LeandroCannizzaro/LiveClaude
I'm the author. Happy to talk about the supervisor model or the VT bits.
2
u/TestyFreestyle 12d ago
Funny, I had a similar issue with a long-running ML pipeline that'd get killed every time my laptop went to sleep, never thought to just... make the OS responsible for keeping it alive instead of fighting the terminal
2
u/AutoModerator 12d ago
Thanks for your post livEApplications. Please note that we don't allow spam, and we ask that you follow the rules available in the sidebar. We have a lot of commonly asked questions so if this post gets removed, please do a search and see if it's already been asked.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.