Unconfirmed-delivery telemetry only + sender agent-identity markers - #16
Merged
Merged
Conversation
Mirrors inkbox-ai/claude-code-plugin#36 and inkbox-ai/openclaw-plugin#33 for the Codex bridge. text.delivery_unconfirmed means the carrier couldn't CONFIRM delivery — the message usually landed. Routing it through the delivery-failure retry loop woke the agent to fix-and-resend a message that was likely delivered, double-texting the recipient and burning the shared 3-attempt budget. It now acks with a debug log and never wakes the agent; the subscription stays (telemetry), and real failures (text.delivery_failed, imessage.delivery_failed, message.bounced/failed, sync send rejections) are untouched. Inbound turns from a sender with no address-book contact were tagged contact=unknown_in_inkbox even when the webhook's backend-resolved agent_identities already named the peer agent. When exactly one identity resolves for a 1:1 sender, the marker now shows it (contact_agent_identity_id / contact_agent_handle / contact_name); an address-book contact always wins, zero or several identities keep the unknown fallback (never guess), mail only trusts a from-bucket identity matching the normalized sender address, and group messages keep their existing marker. Handle and display name are remote-controlled strings, so both are repr-quoted in the marker. Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
dimavrem22
marked this pull request as ready for review
July 13, 2026 01:29
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.
Ports two merged fixes to the Codex bridge.
Don't wake the agent on
text.delivery_unconfirmedMirrors inkbox-ai/claude-code-plugin#36.
text.delivery_unconfirmedis carrier uncertainty — the message usually landed. It was routed into the delivery-failure retry loop (#14), waking the agent to fix-and-resend a message that was likely delivered (double-texting the recipient and burning the shared 3-attempt budget). It now acks with a debug log only. The subscription stays for telemetry; real failures (text.delivery_failed,imessage.delivery_failed,message.bounced/message.failed, synchronous send rejections) are untouched. README updated to match.Show the sender's agent identity instead of
unknown_in_inkboxMirrors inkbox-ai/openclaw-plugin#33.
Inbound webhooks carry backend-resolved
agent_identities. When a 1:1 sender has no address-book contact but exactly one resolved identity, the turn marker now names it (contact_agent_identity_id/contact_agent_handle/contact_name) across SMS, iMessage, iMessage reactions, and mail. An address-book contact always wins; zero or several identities keep the unknown fallback (never guess); mail only trusts afrom-bucket identity whose address matches the normalized sender; group messages keep their existing marker. Handle and display name are remote-controlled strings, so both are repr-quoted in the marker.Covered by new tests (
tests/test_gateway_sender_identity.py, plus a real-dispatch unconfirmed test intests/test_gateway_delivery_failures.py); full suite green (281 passed, 1 skipped).