Room poller: always nudge on owner messages + fix silent tmux delivery#25
Conversation
Two stacked bugs meant the human owner's room/DM messages never woke the IDE agent, only the periodic timer did: 1. In emergency-only urgency mode, shouldSuppressNudge() gated the nudge for ALL senders, including the owner. A message from the owner is itself the priority signal, so track hasOwnerMessage (via config.poller.owner_handle) and bypass suppression when present. Emergency-only still mutes agent chatter. 2. Delivery defaulted to tmux, which silently no-ops when the agent runs in a GUI/desktop app (no tmux session). Deployments point nudge_mode=command at a GUI wake script; this commit only fixes the owner-gating (delivery is config). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 113169c8ae
ℹ️ 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".
| // The human owner's handle. Messages from the owner ALWAYS nudge, even in | ||
| // emergency-only mode — a message from the user is itself the priority signal; | ||
| // emergency-only is meant to mute agent/fleet chatter, not the user's own words. | ||
| const ownerHandle = normalizeHandle(config?.poller?.owner_handle || 'petrus'); |
There was a problem hiding this comment.
Use the configured owner instead of hard-coded Petrus
When intent.userId belongs to anyone other than petrus and existing configs don't set the new, undocumented poller.owner_handle, owner messages still won't set hasOwnerMessage, so shouldSuppressNudge(config) continues to suppress the user's own messages in emergency-only mode. Conversely, messages from @petrus bypass suppression even when the configured intent user is someone else. This default should be derived from the configured owner/user identity, such as config.intent.userId, rather than a fixed handle.
Useful? React with 👍 / 👎.
Problem
Petrus reported his room messages weren't waking the IDE agent (@claudemm) — only the ~25-min fallback timer did. Root cause was two stacked bugs:
urgency_mode: emergency-only,shouldSuppressNudge()gated the wake nudge for every sender — including the owner's own messages. Notifications still get written, but no wake fires, so the agent only sees them on its next heartbeat.nudge_modedefaulted totmux, which silently no-ops when the agent runs in a GUI/desktop app (no tmux session).Fix (this PR)
config.poller.owner_handle+ trackhasOwnerMessageinpollRooms/pollDirectMessages.if (!hasOwnerMessage && await shouldSuppressNudge(config)). Emergency-only still mutes agent/fleet chatter — just not the human.(owner message — nudge forced)when the override fires.Delivery mode (tmux→command/GUI-wake) is deployment config, not code — set in each host's config.
Test
node --checkpasses.🤖 Generated with Claude Code