fix: update heartbeat instruction to /hooks/wake payload format#56
Merged
R-M-Naveen merged 1 commit intomainfrom Mar 6, 2026
Merged
fix: update heartbeat instruction to /hooks/wake payload format#56R-M-Naveen merged 1 commit intomainfrom
R-M-Naveen merged 1 commit intomainfrom
Conversation
Send { text, mode } instead of { message, name } to match the
/hooks/wake endpoint which injects into the main session.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
AI Code Review - APPROVE - This PR fixes the payload format sent to the /hooks/wake endpoint, replacing the old fields (message, name) with the correct ones (text, mode). It also simplifies the injected instruction text. One minor note: the JSDoc comment on sendHeartbeatInstruction (line 49) still references saving to HEARTBEAT.md, but the new payload no longer instructs the agent to do that - the comment should be updated. Security: the Authorization header is retained, the text is hardcoded and not user-controlled (no injection risk), and mode: now for immediate session injection is appropriate. Suggestion: the narrowed phrasing 'a new email' could exclude future event types - keeping the instruction more generic would be forward-compatible. Overall the fix is correct and necessary: sending wrong field names to /hooks/wake would silently ignore the setup instruction.
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.
Send { text, mode } instead of { message, name } to match the /hooks/wake endpoint which injects into the main session.