Skip to content

fix: update heartbeat instruction to /hooks/wake payload format#56

Merged
R-M-Naveen merged 1 commit intomainfrom
naveen/agent-push-notifications
Mar 6, 2026
Merged

fix: update heartbeat instruction to /hooks/wake payload format#56
R-M-Naveen merged 1 commit intomainfrom
naveen/agent-push-notifications

Conversation

@R-M-Naveen
Copy link
Member

Send { text, mode } instead of { message, name } to match the /hooks/wake endpoint which injects into the main session.

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>
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

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.

@R-M-Naveen R-M-Naveen merged commit 4467173 into main Mar 6, 2026
2 checks passed
@R-M-Naveen R-M-Naveen deleted the naveen/agent-push-notifications branch March 6, 2026 05:09
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