Skip to content

Unconfirmed-delivery telemetry only + sender agent-identity markers - #16

Merged
dimavrem22 merged 1 commit into
mainfrom
delivery-unconfirmed-and-sender-identity
Jul 13, 2026
Merged

Unconfirmed-delivery telemetry only + sender agent-identity markers#16
dimavrem22 merged 1 commit into
mainfrom
delivery-unconfirmed-and-sender-identity

Conversation

@dimavrem22

Copy link
Copy Markdown
Contributor

Ports two merged fixes to the Codex bridge.

Don't wake the agent on text.delivery_unconfirmed

Mirrors inkbox-ai/claude-code-plugin#36.

text.delivery_unconfirmed is 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_inkbox

Mirrors 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 a from-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 in tests/test_gateway_delivery_failures.py); full suite green (281 passed, 1 skipped).

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
dimavrem22 marked this pull request as ready for review July 13, 2026 01:29
@dimavrem22
dimavrem22 merged commit cfaeeb8 into main Jul 13, 2026
13 checks passed
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