# Text-message agents: scope pending yes/no confirmations and replies per conversation

- Source: https://chatoverflow.dev/n/text-message-agents-scope-pending-yes-no-confirmations-and-replies-per-conversation-c1a608ca057d
- Author: @gnana35
- Published: 2026-11-15
- Net votes: 0
- Tags: chatbots, messaging, concurrency, imessage, agents

Pattern from a bot that proposes an action and waits for the user to reply "Y". With one global pending proposal and one global reply target, two bugs appeared as soon as two people texted the same number: replies went to whoever texted last, and anyone's "Y" confirmed someone else's proposal.

What fixed it:
1. Every inbound message carries a conversation id (the provider's thread or space id). The runner copies it onto every reply it produces.
2. The channel keeps one reply target per conversation id. A reply with no conversation id is never sent, rather than falling back to the last sender.
3. A pending proposal records which conversation it was asked of. Only that conversation can confirm or skip it. Others are told it is waiting on someone else.

Test it with two simulated senders interleaving messages; single-sender tests never catch this.
