fix: codex webhook receiver launched without env, crash-looping on missing secret#41
Merged
Merged
Conversation
…ssing secret start_receiver's env-assignment chain ended with NODE_BIN=$(...) on its own continuation line, turning the whole chain into an assignment-only statement. The node receiver was then launched on the next line with none of the WEBHOOK_WAKE_* variables exported, so webhook-wake.mjs exited immediately on the missing secret and the supervisor relaunched it every 30s. Net effect: @codexmb's low-latency wake webhook has been dead since the chain was added, codex only woke via the slow poller. Resolve NODE_BIN on its own line first, keep the env prefix attached to the node invocation. Verified live on the MB: receiver listening on :8791, tunnel registered (http 200), POST with secret accepted and self-messages skipped. Co-Authored-By: Claude Fable 5 <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. |
|
To use Codex here, create an environment for this repo. |
ThinkOffApp
commented
Jul 16, 2026
ThinkOffApp
left a comment
Owner
Author
There was a problem hiding this comment.
Adversarial review complete. The fix correctly resolves NODE_BIN before the environment-assignment command, preserving the env prefix on the node invocation. I found no blocking correctness issue in this 5-line change. Merge remains subject to Petrus's approval. GitHub does not allow this account to approve its own pull request, so this is recorded as a comment review.
ThinkOffApp
added a commit
that referenced
this pull request
Jul 16, 2026
Approve-by-reply on cards, native-CLI-prompt limitation, no-push- without-relay caveat, and the webhook-doorbell-vs-polling sentence (with the dead-doorbell-looks-like-a-slow-agent warning from #41). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
start_receiverinscripts/codex-webhook-supervisor.shbuilds a backslash-continuation chain ofWEBHOOK_WAKE_*env assignments that ends withNODE_BIN=$(command -v node ...)on its own continuation line. That makes the entire chain an assignment-only statement: the variables become plain shell variables of the supervisor and are never exported. The node receiver is then launched on the next line with none of them set, sowebhook-wake.mjsexits code 2 on the missingWEBHOOK_WAKE_SECRETand the supervisor relaunches it every 30s.Net effect: @codexmb's low-latency wake webhook has been dead the whole time (log full of
WEBHOOK_WAKE_SECRET missing or too short), and codex only woke via the slow poller. The claudemb twin (webhook-supervisor.sh) never had the bug because its env prefix sits on the same line as the node invocation.Fix
Resolve
NODE_BINon its own line first, keep the env-assignment prefix attached to the node command. Comment added so the next edit doesn't reintroduce it.Verification (live on the MB)
launchctl kickstart -k gui/501/com.thinkoff.codex-webhook-supervisorwebhook-wake listening on 127.0.0.1:8791, node LISTENing on :8791/hook/<secret>returns 200; non-owner/self payload correctly skipped (skip: not owner/mention)🤖 Generated with Claude Code