Skip to content

[Bug]: macOS app performs avoidable idle polling and animation wakeups #100451

Description

@steipete

Bug type

Performance bug (persistent background work without user activity)

Beta release blocker

No

Summary

The signed macOS app performs two avoidable idle loops: Mac node mode rereads gateway config and rechecks every TCC permission once per second, while the menu-bar critter wakes every 350 ms to check animation deadlines.

Steps to reproduce

  1. Launch the signed OpenClaw 2026.6.11 macOS app with no dashboard, settings, menu, or active agent work visible.
  2. Leave the app idle.
  3. Attach Time Profiler for 45 seconds and take a 15-second process sample.
  4. Inspect stacks from Mac node mode and the menu-bar label task.

Expected behavior

After the Mac node connects, its transport should own reconnects and node registration should refresh only when endpoint, config, preference, or permission inputs can change. Between visible status-icon animations, the critter should sleep until its next animation deadline or state change.

Actual behavior

Time Profiler repeatedly captures MacNodeModeCoordinator.run() rereading the config and querying PermissionManager.status(). The permission path executes an AppleScript authorization probe against Terminal on every pass. Separately, the status-icon task resumes every 350 ms and enters CritterStatusLabel.tick(_:) even when no work is active.

OpenClaw version

2026.6.11 (2606001190)

Operating system

macOS 26.5.2 (25F84), Apple Silicon

Install method

Signed macOS app

Model

N/A (reproduces with no model request)

Provider / routing chain

N/A (macOS app idle paths)

Additional provider/model setup details

No active model request, agent run, or tool call during either capture.

Logs

Time Profiler: 45-second idle capture
12 samples: MacNodeModeCoordinator.start closure
7 samples: OpenClawConfigFile.load / lock
5 samples: AppleScriptPermission.isAuthorized
5 samples: PermissionManager.status / currentPermissions

sample: 15-second idle capture
CritterStatusLabel+Behavior.swift -> MainActor.run -> CritterStatusLabel.tick

Screenshots, recordings, and evidence

The sampled process path was /Applications/OpenClaw.app/Contents/MacOS/OpenClaw. The app was launched with --attach-only; no OpenClaw window or menu was open during the captures.

Impact and severity

  • Affected: macOS app users running node mode; critter wakeups also affect users who leave status-icon animations enabled, the default.
  • Severity: Low per wakeup, persistent background energy cost.
  • Frequency: Continuous while the app is idle.
  • Consequence: Avoidable config I/O, permission probes, CPU wakeups, SwiftUI work, and battery use from a menu-bar utility expected to remain resident.

Additional information

The node session already owns reconnects for its active endpoint, and the endpoint store publishes dynamic endpoint changes. The critter uses Swift concurrency rather than Combine's TimerPublisher to avoid a macOS 26.2 crash; a deadline-driven task can preserve that crash avoidance and the existing animations.

Metadata

Metadata

Assignees

Labels

P2Normal backlog priority with limited blast radius.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.impact:otherThis issue has meaningful maintainer-visible impact outside the owned taxonomy.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.maintainerMaintainer-authored PRmaturity:stableIssue affects a taxonomy feature currently scored M4/M5.

Type

No type

Fields

Priority

None yet

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions