Skip to content

cap-discord reply routing: FIFO queue for cross-channel concurrent messages #35

Description

@tps-flint

PR #34 ships reply routing with a single pending pointer (set on inbound, consumed on agent_end). Kern + Flint confirmed the correlation is reliable for single-agent conversational use (agent_end fires once per prompt; most-recent pending correlates). Known limitation: if messages from DIFFERENT channels arrive before a turn completes, the reply routes to the most-recent channel (same-channel rapid messages are handled correctly → one coherent reply). Acceptable + non-blocking for the EA use (rare, degrades gracefully, always an allow-listed channel, no security issue). Follow-up: replace the single pointer with a FIFO queue of {channelId, replyTo} popped per agent_end, once the sendUserMessage→agent_end ordering under true concurrency is locked down. Low priority.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions