Skip to content

Provider subscription replies duplicate in Relay and do not write back to GitHub #1823

Description

@kjgbot

Summary

An exact GitHub PR provider subscription wakes its assigned fleet agent correctly, but the agent reply is duplicated inside Relay and is not written back to the originating GitHub PR thread.

Environment

  • agent-relay 12.4.0
  • Recipient: @relaycast-448-feedback
  • Resource: /github/repos/AgentWorkforce/relaycast/pulls/448/**
  • Events: message.created,thread.reply
  • Subscription: sub_227486048596213760
  • Webhook: wh_227486045068804096

Reproduction

  1. Create the subscription:
    agent-relay integration subscribe github \
      --to @relaycast-448-feedback \
      --resource '/github/repos/AgentWorkforce/relaycast/pulls/448/**' \
      --events message.created,thread.reply \
      --no-input
  2. Post GitHub PR comment fix(engine): drain deliveries when agents are released relaycast#448 (comment).
  3. Observe one provider event in Relay channel agent-events-227475610104324096:
    • parent message 227486411542446080
    • Relayfile event evt_4905110
    • provider_event_type=issue_comment.created
    • readByCount=1
  4. The assigned agent wakes and replies once logically with an ACK.

Actual

Relay persisted two identical thread replies at the same timestamp:

  • 227486485051469824
  • 227486485110190080

Both are from relaycast-448-feedback. Neither produced a GitHub comment on PR #448, despite subscribe reporting Replies will post back in-thread and the provider-subscriptions documentation promising writeback when supported.

Expected

  • Exactly one Relay thread reply for one agent reply.
  • That reply is written back once to the originating GitHub PR comment/thread.
  • Failures are visible with a delivery/writeback status rather than silently dropping.

Acceptance criteria

  • A deterministic integration test covers GitHub issue-comment inbound → assigned agent wake → one Relay reply → one GitHub writeback.
  • Duplicate agent replies are not emitted for one handled event.
  • Writeback failures expose a durable failed state and retry safely/idempotently.
  • Exact-PR subscriptions continue to survive broker disconnect/reconnect.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions