[BUG] Claude CLI v2.1.119 crashes with SIGTERM (exit -15) after ~10.5h background running with Telegram plugin on macOS
Which version of the Claude CLI are you using?
v2.1.119
Which version string did you use?
v2.1.119
What command were you running?
cd /Users/halu_1/Desktop && claude --channels plugin:telegram@claude-plugins-official --dangerously-skip-permissions --permission-mode auto
This is run as a long-lived background service that continuously monitors Telegram for incoming messages.
What happened?
The Claude CLI process is killed with SIGTERM (exit code -15) after approximately 10.5 hours of continuous background running. The process is not terminated gracefully — it receives a SIGTERM signal from an external source.
What did you expect to happen?
The Claude CLI process should persist indefinitely as a background Telegram monitoring service without being killed by an external SIGTERM signal.
Steps to reproduce
- Start Claude CLI with the Telegram plugin as a background process:
``bash``
cd /Users/halu_1/Desktop && claude --channels plugin:telegram@claude-plugins-official --dangerously-skip-permissions --permission-mode auto
- Let the process run in the background monitoring for Telegram messages.
- After approximately 10.5 hours, observe that the process exits with code -15 (SIGTERM).
Logs / diagnostics
exit code: -15 (SIGTERM)
The crash appears to be triggered by macOS power management or launchd killing long-lived TTY-detached processes. The --permission-mode auto flag bypasses the Trust Prompt but does not prevent the SIGTERM from being delivered.
Related issues (not duplicates)
- #39876 — Telegram plugin session competition (different: about session conflicts, not process termination)
- #38092 — bun server.ts CPU spike (different: about CPU spikes, not SIGTERM)
- #36800 — duplicate plugin instances (different: about duplicate spawns, not crashes)
- #36411 — inbound notifications not delivered (different: about notification delivery)
None of the above describe the SIGTERM background crash scenario.
Environment
- OS: macOS (Apple Silicon)
- CLI version: v2.1.119
- Plugin: Telegram (
plugin:telegram@claude-plugins-official) - Flags:
--dangerously-skip-permissions --permission-mode auto
Additional notes
This may be related to macOS power management aggressively terminating long-running processes that are detached from a TTY session. It would be helpful if Claude CLI could:
- Auto-reconnect or respawn after unexpected SIGTERM
- Provide better logging around signal handlers and termination events
- Include guidance on how to run as a persistent background service (e.g., via launchd or systemsettings)
The --permission-mode auto flag is required for unattended operation but does not help prevent the process from being killed.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗