Skip to content

poller: exactly one wake path per agent, as a config fact (#90 item 4) - #93

Open
ThinkOffApp wants to merge 1 commit into
mainfrom
fix/one-wake-path
Open

poller: exactly one wake path per agent, as a config fact (#90 item 4)#93
ThinkOffApp wants to merge 1 commit into
mainfrom
fix/one-wake-path

Conversation

@ThinkOffApp

Copy link
Copy Markdown
Owner

#90 item 4. Replaces the draft #89 as the actual fix for the codexmb double answers: a debounce in the nudge script cannot see the webhook receiver or the Codex app's own scheduled check; declaring the single path that owns the wake can.

poller.wake_path: nudge (default) | webhook | automation | none.

  • The poller nudges only when it is nudge. Otherwise it still delivers the notification file, refuses every nudge with the reason in its log (wake path is webhook, not this poller), and warns at start if nudge_mode is also set.
  • Empty wake_path resolves to nudge, or none when nudge_mode is none — existing configs behave exactly as before.
  • config/codex.desktop.example.json: wake_path: webhook, nudge_mode: none. README footgun + AGENT-ONBOARDING section added.

Tests (test/wake-path.test.mjs): owner message with wake_path: webhook → notified, not nudged, reason + warning logged; positive control with the default → the nudge command runs. Suite green.

After merge, on the MacBook: "wake_path": "webhook" in codex.json (nudge_mode is already none there), and — the part no IAK code can do — turn the Codex app's internal check-rooms automation off, so the webhook is the one path. I'll close #89 once this merges.

🤖 Generated with Claude Code

On 2026-09-01 the codexmb poller nudged on top of a webhook receiver and
the Codex app's own scheduled check, and every mention got two or three
answers. A debounce cannot see the other paths; the fix is to declare
the one that owns the wake.

poller.wake_path: nudge (default) | webhook | automation | none. The
poller nudges only when it is 'nudge'; otherwise it still delivers the
notification file, refuses every nudge with the reason in its log, and
warns at start if nudge_mode is also set. Empty wake_path resolves to
'nudge' unless nudge_mode is 'none', so existing configs behave as
before. codex example set to webhook + nudge_mode none; docs updated.

Test: owner message with wake_path webhook -> notified, not nudged, the
reason and the warning in the log; positive control with the default
-> the nudge command runs.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 2, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-02T00:49:29.602694Z 0b184ac PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@ThinkOffApp ThinkOffApp left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Codex review

P1: Validate poller.wake_path against the documented enum.

wakePath is currently any lower-cased string, and every value other than nudge silently disables this poller's nudge. A typo such as webhok therefore changes the wake owner without a startup error or warning, which can strand addressed messages. Please reject invalid values at config load/startup (allowed: nudge, webhook, automation, none) and add a regression test for the invalid case.

@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: 0b184acc8a

ℹ️ 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".

Comment on lines +39 to +40
"wake_path": "webhook",
"nudge_mode": "none",

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 Keep the desktop example on a configured wake path

When a user follows the README's Codex Desktop setup and copies this advertised ready-to-copy example, these settings disable the included codex_gui_nudge.sh command, but the example does not configure or start scripts/codex-webhook-supervisor.sh. Consequently, room and DM messages are written to the notification file without waking the desktop app. Keep this example on command-mode nudging, or include the required webhook receiver setup before selecting webhook.

Useful? React with 👍 / 👎.

Comment on lines +183 to +184
const wakePath = String(config?.poller?.wake_path || (nudgeMode === 'none' ? 'none' : 'nudge')).toLowerCase();
const pollerOwnsWake = wakePath === 'nudge';

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 Reject contradictory nudge wake settings

If wake_path is explicitly "nudge" while nudge_mode is "none", pollerOwnsWake becomes true and startup reports that the poller owns the wake, but triggerNudge always returns false and the agent is never awakened; the mismatch warning only covers the inverse combination. Validate or warn on this combination so the new wake-path declaration cannot silently describe a path that is disabled.

Useful? React with 👍 / 👎.

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