[BUG] Claude CLI v2.1.119 crashes with SIGTERM (exit -15) after ~10.5h background running with Telegram plugin on macOS

Resolved 💬 1 comment Opened Apr 27, 2026 by halu0915 Closed May 29, 2026

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

  1. 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
``

  1. Let the process run in the background monitoring for Telegram messages.
  2. 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:

  1. Auto-reconnect or respawn after unexpected SIGTERM
  2. Provide better logging around signal handlers and termination events
  3. 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.

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗