Skip to content

claude-cli provider: session abort triggers gateway-wide SIGTERM (v2026.4.23) #71662

Description

@zjy282

Bug Report

Version: 2026.4.23 (a979721)
OS: macOS 25.4.0 (arm64)
Provider: claude-cli/claude-opus-4-7

Summary

When the main agent uses claude-cli/claude-opus-4-7 as its primary model, a session abort causes the entire gateway process to receive SIGTERM and restart. This was introduced in v2026.4.23.

Reproduction

  1. Set agents.defaults.model.primary to claude-cli/claude-opus-4-7
  2. Start a conversation via Discord or WebUI
  3. Trigger a session abort (e.g. context compaction, long response, or manual interrupt)
  4. Observe: gateway receives SIGTERM, LaunchAgent restarts it (KeepAlive=true), all active sessions are dropped

Evidence

From ~/.openclaw/logs/gateway.err.log:

signal SIGTERM received
[claude-cli] live session close / AbortError

Multiple SIGTERM events observed at: 00:40:34, 00:43:44, 00:45:14, 00:45:59, 00:46:51 (Asia/Shanghai)

macOS unified log shows the kill chain originates from within the node process tree:

launchctl[11380] <- node[11370] <- node[10567] <- node[10566] <- bash[10542] <- zsh[10540]

Workaround

Switching agents.defaults.model.primary to any non-claude-cli provider (e.g. tuzi-sub-claude/claude-sonnet-4-6) completely eliminates the SIGTERM. Gateway survives restarts and session aborts without issue.

Expected Behavior

A claude-cli session abort should be handled gracefully within the provider layer and must not propagate as a SIGTERM to the gateway process.

Additional Context

  • The issue is specific to the claude-cli provider backend, not the transport layer (Discord, WebUI, Telegram all exhibit the same behavior)
  • LaunchAgent KeepAlive=true masks the issue by auto-restarting, but all in-flight sessions are lost on each restart
  • Did not occur on the same config running on Linux VPS prior to migration

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions