fix(macos): reduce idle CPU wakeups#100463
Conversation
|
Land-ready verification for head
Known environment gap: the host's configured localhost Gateway was unavailable/rejected its existing configuration, preventing sustained connected-state and live registration-refresh observation. Signed app launch, disconnected backoff, focused scheduler behavior, remote changed gates, and before/after idle profiling passed. |
76be675 to
a1504da
Compare
|
Codex review: needs maintainer review before merge. Reviewed July 5, 2026, 6:30 PM ET / 22:30 UTC. Summary Reproducibility: yes. for a source-level path: current main still reads config/permissions in the Mac node loop and ticks the critter every 350 ms while idle. I did not run a signed macOS profiler capture in this read-only review, but the PR includes before/after profiler and sample evidence. Review metrics: none identified. Stored data model Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Maintainer decision needed
Security Review detailsBest possible solution: Land the macOS event/deadline-driven fix after the macOS owner accepts or fills the connected-state registration-refresh proof gap, with release-note context staying in the PR body or squash message. Do we have a high-confidence way to reproduce the issue? Yes for a source-level path: current main still reads config/permissions in the Mac node loop and ticks the critter every 350 ms while idle. I did not run a signed macOS profiler capture in this read-only review, but the PR includes before/after profiler and sample evidence. Is this the best way to solve the issue? Yes, this is the right layer: the node coordinator should refresh when registration inputs change, and the critter should sleep until animation deadlines while preserving the Swift-concurrency task used to avoid the TimerPublisher crash path. The only remaining gap is live proof for connected-state registration refresh. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against c4a862ab53c5. Label changesLabel changes:
Label justifications:
Evidence reviewedWhat I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
Review history (4 earlier review cycles)
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 12e0aeec28
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| ### Fixes | ||
|
|
||
| - **Agent empty replies:** surface a visible failure when a completed interactive turn has no deliverable reply, including queued follow-ups, while preserving explicit silence, pending continuations, and committed side effects. (#100456) Thanks @mushuiyu886. |
There was a problem hiding this comment.
Remove the hand-written changelog entry
The root AGENTS.md says CHANGELOG.md is release-only and that release generation owns entries for normal fixes/direct commits. Adding this Unreleased line here means the release generator can later duplicate or conflict with this note; keep the release-note context in the commit/PR metadata instead and leave the changelog untouched until release prep.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fc5696a1f5
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| Boolean(prepared.ackReactionPromise) && | ||
| Boolean(reactionMessageTs) && | ||
| cfg.messages?.statusReactions?.enabled !== false; | ||
| cfg.messages?.statusReactions?.enabled === true; |
There was a problem hiding this comment.
Preserve Slack status reaction default
For existing Slack installs that have ack reactions enabled but never set messages.statusReactions.enabled, this flips the shipped behavior from enabled-unless-false to opt-in. Those users silently lose the queued/thinking/tool/done/error lifecycle reactions after upgrade, and the paired prepareSlackMessage change now sends only a static ack instead, so this default change needs a compatibility path or an explicit pre-merge release decision rather than changing the runtime default here.
Useful? React with 👍 / 👎.
|
Merged via squash.
|
* fix(macos): reduce idle CPU wakeups * chore(macos): sync native i18n inventory * chore(macos): sync native i18n inventory * chore(macos): sync native i18n inventory * chore(macos): sync native i18n inventory * chore(macos): sync native i18n inventory * chore(macos): sync native i18n inventory
Closes #100451
What Problem This Solves
The macOS menu-bar app performed avoidable work while idle. Its node-mode coordinator reread configuration and queried macOS permissions once per second even while connected, and the critter animation task woke every 350 ms even when its next randomized idle animation was seconds away.
Why This Change Was Made
Node registration refresh is now event-driven for configuration, endpoint, permission, preference, and app-activation changes. A disconnected-only 30-second probe preserves recovery for Gateway sessions paused by authentication or pairing failures without polling during normal connected operation.
The critter now sleeps until its nearest animation deadline while idle, retains the existing 350 ms working cadence, and reschedules elapsed animation deadlines after a pause.
This adds some coordinator code while removing the steady-state polling path and consolidating node input gathering into one canonical refresh flow.
User Impact
Users can leave the macOS app running with fewer idle CPU wakeups and less repeated configuration/TCC work. Node registration still refreshes when relevant inputs change, and active-work animation behavior is unchanged.
Evidence
codesignverification and launched successfully.MacNodeModeCoordinator, config loading, and permission checks.MacNodeModeCoordinator,OpenClawConfigFile,PermissionManager.status,AppleScriptPermission, orCritterStatusLabeltick/body work. At 39 seconds it reported 0.0% CPU and 0:00.35 total CPU time including startup; sampled top stacks were sleeping syscalls.swift build --package-path apps/macos --build-path apps/macos/.build/arm64swift test --package-path apps/macos --build-path apps/macos/.build/arm64 --filter CritterIconRendererTests— 5 passed. The currentmaintest target has an unrelated missingOnboardingView.hasCrestodianSetupAuthsymbol, so this focused run used and then removed a test-only compile bridge.tbx_01kwsydbsd5yg0vprs6pb21rhp(coral-prawn) —check:changedapps lane passed all 5 shards.Known proof gap: this host's configured localhost Gateway was unavailable/rejected its existing configuration, so sustained connected-state and live node-registration refresh observation were not possible. The signed app launch, disconnected backoff, focused tests, review, and idle samples passed.
No changelog entry: this repository updates the changelog during release preparation.
Agent transcript: not included.