Repository navigation
DM delivery as a mechanism, not compliance (v0.7.0) - #3
Merged
Merged
Conversation
Makes cross-agent message delivery a guaranteed mechanism for any ACTIVE agent, closing the "live-but-unmonitored agent silently misses DMs" gap. - Fold unread-DM delivery into heartbeat.sh (PostToolUse) via hookSpecificOutput.additionalContext JSON (bare PostToolUse stdout is NOT injected — verified vs the hooks docs). awareness.sh (UserPromptSubmit, stdout) covers prompt turns; heartbeat covers long autonomous tool turns. Union: no unread DM survives a turn boundary on an active agent — zero arming, zero daemon, zero tokens. (Waking an IDLE window stays best-effort via the Monitor; a hook can't arm it — pull delivers on next turn.) - Canonical inbox codepath: fleet_unread_scan + _fleet_seen_set (lib.sh), shared by both hooks. .seen is now atomic (tmp+mv) + monotonic (a racing writer can't skip a DM) and advances ONLY after an actual emit. PostToolUse delivery throttled (FLEET_PULL_THROTTLE_S=45s) — guards noise, not correctness. - Fix settings drift: checked-in .claude/settings.json was missing PostToolUse:heartbeat + the SessionStart wake nudges (dogfooded a config that didn't deliver). Regenerated to installer-canonical; a selftest control now bites on re-drift. Verified: selftest-collateral DELIVERY + neg-control + throttle + settings controls pass; shellcheck --severity=warning clean. Co-Authored-By: Claude Opus 4.8 <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.
Closes the "live-but-unmonitored agent silently misses DMs" gap by making delivery a guaranteed mechanism for any active agent.
What
heartbeat.sh(PostToolUse) viahookSpecificOutput.additionalContextJSON — bare PostToolUse stdout is not injected (verified against the hooks docs), so the JSON path is required.awareness.sh(UserPromptSubmit, stdout) covers prompt turns;heartbeat.shcovers long autonomous tool turns. Union: no unread DM survives a turn boundary on an active agent — zero arming, zero daemon, zero tokens.fleet_unread_scan+_fleet_seen_set(lib.sh) shared by both hooks..seenis now atomic (tmp+mv) + monotonic (a racing writer can't skip a DM) and advances only after an actual emit. PostToolUse delivery throttled (FLEET_PULL_THROTTLE_S=45s) — guards noise, not correctness..claude/settings.jsonwas missingPostToolUse:heartbeat+ the SessionStart wake nudges (the repo dogfooded a config that didn't deliver). Regenerated to installer-canonical; a selftest control now bites on re-drift.Honest scope
Delivery to an active agent is now GUARANTEED. Waking an idle window stays best-effort via the Monitor — a hook physically can't arm it; the pull delivers on the next turn, it doesn't wake. That's the platform floor, stated exactly.
Verified
selftest-collateral.shDELIVERY + neg-control + throttle-hold + settings-drift controls all pass;shellcheck --severity=warningclean. Delivery byproofed end-to-end (valid additionalContext JSON carries the DM, seen advances only on emit, throttled DM not lost + delivered once window passes).🤖 Generated with Claude Code