Skip to content

[Bug]: macOS node mode can silently self-reconnect in a healthy direct gateway session #90668

@vrurg

Description

@vrurg

Bug type

Behavior bug (incorrect output/state without crash)

Beta release blocker

No

Summary

On macOS, the app in node mode can repeatedly log a successful gateway connection from the same process every 2-3 seconds while using a remote direct wss:// gateway session.

Steps to reproduce

  1. Configure the macOS app for node mode against a remote direct wss:// gateway.
  2. Start the app and let node mode run.
  3. Observe the diagnostics log.
  4. In affected runs, the same app PID logs mac node connected to gateway repeatedly every 2-3 seconds for over a minute.

Expected behavior

A healthy node-mode gateway session should remain connected without repeated successful connect logs from the same process until an actual disconnect occurs.

Actual behavior

In affected runs, the same app PID logs repeated mac node connected to gateway events every 2-3 seconds for over a minute. In the same observed run, there was no matching gateway tick missed; reconnecting line and no explicit disconnect logged before each repeated connected message.

OpenClaw version

v2026.6.1

Operating system

macOS v26.5

Install method

mac app

Model

NOT_APPLICABLE (node-mode gateway connection path; no model invocation is required for the observed behavior)

Provider / routing chain

NOT_APPLICABLE (node-mode gateway connection path; no provider request is required for the observed behavior)

Additional provider/model setup details

NOT_APPLICABLE

Logs, screenshots, and evidence

Observed evidence from the affected run:

  • the same app PID logged mac node connected to gateway repeatedly every 2-3 seconds
  • this continued for over a minute
  • there was no matching gateway tick missed; reconnecting line in that run
  • there was not a corresponding explicit disconnect log before each repeated connected message
  • intermittent ConnectChallengeError and node-pairing churn were also observed in some failing windows, but not as the primary signal in the clean repeated-connect run

Relevant source areas inspected during triage:

  • apps/shared/OpenClawKit/Sources/OpenClawKit/GatewayChannel.swift
  • apps/macos/Sources/OpenClaw/NodeMode/MacNodeModeCoordinator.swift

Observed code path that may be relevant:

if self.connected, self.task?.state == .running { return }

Impact and severity

Affected: macOS app node-mode sessions using remote direct wss:// gateway transport
Severity: High
Frequency: Intermittent, observed repeatedly across investigation runs
Consequence: repeated reconnect churn, unstable node connectivity, and noisy secondary pairing/challenge failures

Additional information

This appears distinct from older auth-token churn / pairing-required reconnect reports because the strongest observed signal here is repeated successful connected logging from the same process without a matching explicit disconnect before each reconnect. Last known good version and first known bad version: NOT_ENOUGH_INFO.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1High-priority user-facing bug, regression, or broken workflow.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.clawsweeper:queueable-fixClawSweeper marked this issue as an existing queue_fix_pr work candidate.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions