Add real-time monitoring: healthchecks, ntfy, GitHub heartbeat#8
Draft
nkhdiscovery wants to merge 1 commit intomainfrom
Draft
Add real-time monitoring: healthchecks, ntfy, GitHub heartbeat#8nkhdiscovery wants to merge 1 commit intomainfrom
nkhdiscovery wants to merge 1 commit intomainfrom
Conversation
… heartbeat) Adds two-layer observability for solo founders running the agent 24/7: - Liveness (dead-man's switch): agent pings HEALTHCHECKS_URL at the start of every cycle; if pings stop for >2× idle sleep, healthchecks.io fires an alert. One env var, one curl call in the loop. - Activity (push notifications): ntfy_push() posts ▶/✓/⚠ messages to NTFY_TOPIC each cycle via ntfy.sh. Shows what's being worked on, cycle cost, and non-zero exits. No account required. - GitHub-native heartbeat: hb_commit() updates .agent/heartbeat via the GitHub API each cycle when AGENT_GITHUB_HEARTBEAT=1. Appears in mobile activity feed with zero external dependencies. All signals are fully opt-in — unset env vars are no-ops. .env.example documents each var with setup notes. README gets a "Real-time monitoring" section. Makefile gains `make agent-status` showing container state, last log activity, and today's cost. https://claude.ai/code/session_011xVoqL8J3Np2di1FUGHdk5
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.
What this does
Adds three optional monitoring integrations to the agent launcher, enabling real-time visibility into agent health and activity without opening GitHub:
.agent/heartbeatvia API each cycle for zero external dependenciesAll three are opt-in via
.envvariables and gracefully no-op if unconfigured. The launcher now loads.envbefore sourcing agent runtime, enabling these integrations.Changes
scripts/launch-agent.sh:
.envearly to provideHEALTHCHECKS_URL,NTFY_TOPIC,NTFY_SERVER,AGENT_GITHUB_HEARTBEAThc_ping(),ntfy_push(),hb_commit()helper functionshc_ping()andhb_commit()at cycle start.env.example: Document all four new monitoring variables with setup instructions and trade-offs
Makefile: Add
agent-statustarget showing container state, last log activity, and today's costREADME.md: New "Real-time monitoring (opt-in)" section explaining each integration, setup, and trade-offs
Issue / deliverable
Improves observability for long-running agent instances without requiring external infrastructure.
Checklist
make cipasses locallyRisk / blast radius
Low. All new code is additive and guarded by environment variable checks. Existing agent cycle logic unchanged; monitoring calls are fire-and-forget with
|| truefallbacks. No breaking changes to configuration or behavior.https://claude.ai/code/session_011xVoqL8J3Np2di1FUGHdk5