Skip to content

Room poller: always nudge on owner messages + fix silent tmux delivery#25

Merged
ThinkOffApp merged 1 commit into
mainfrom
fix/owner-nudge-and-gui-wake
Jul 6, 2026
Merged

Room poller: always nudge on owner messages + fix silent tmux delivery#25
ThinkOffApp merged 1 commit into
mainfrom
fix/owner-nudge-and-gui-wake

Conversation

@ThinkOffApp

Copy link
Copy Markdown
Owner

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:

  1. Suppression in emergency-only. When the owner's presence is 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.
  2. Dead delivery. nudge_mode defaulted to tmux, which silently no-ops when the agent runs in a GUI/desktop app (no tmux session).

Fix (this PR)

  • Add config.poller.owner_handle + track hasOwnerMessage in pollRooms/pollDirectMessages.
  • Bypass nudge suppression when a new message is from the owner: if (!hasOwnerMessage && await shouldSuppressNudge(config)). Emergency-only still mutes agent/fleet chatter — just not the human.
  • Log (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 --check passes.
  • Verified live on the Mac mini: poller restarted, owner messages now force the GUI-wake nudge end-to-end.

🤖 Generated with Claude Code

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>
@cursor

cursor Bot commented Jul 6, 2026

Copy link
Copy Markdown

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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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');

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@ThinkOffApp ThinkOffApp merged commit b008c80 into main Jul 6, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant