What happens
A bot pulled into a thread it has no history of answers as though the thread were
empty, confidently:
kacper 2:10 PM co tu widzisz? [screenshot.png]
kacper 2:10 PM @Jarvis (in the thread)
Jarvis 2:10 PM Looks like your message came through empty —
what do you need help with?
The conversation the model is given is built from what this deployment received
and stored. Anything said in the thread before that — because the bot was added
later, because a message was dropped, because the thread predates the binding —
is not in it, and nothing fetches it. So the agent's answer is about a thread it
can only see part of, and it does not know that.
Why the transcript above is not just #1071's file bug
That one is fixed: a file_share message is no longer dropped, so this exact
sequence now works. What is left is the general case, and it is reachable without
any bug — invite a bot to a busy thread and mention it, and it answers the mention
alone.
What could be done
Slack answers conversations.replies for the thread the bot was mentioned in, and
Mattermost has the equivalent. So a turn that opens a conversation inside an
existing thread could backfill that thread's earlier messages once, the way the
recent-turn window is assembled, bounded by the same message count.
Three things to decide rather than assume:
- Only on the first turn of a thread we have no record of. Re-fetching per turn
is a network round trip for something already stored.
- Whose messages. A thread's earlier turns are other people's, so this widens
what reaches the model beyond what the sender wrote — which is exactly what
read_channel_history is gated per binding for. This probably wants the same
gate rather than being unconditional.
read_channel_history reads the channel, not the thread. The tool is bound
to channel_key(platform_chat_id) (router.py:528), which strips the thread —
so today an agent cannot ask about the conversation it is actually in. That is
arguably its own defect and may be the cheaper half of this.
How you would know it was fixed
A bot mentioned partway through a thread answers the question the thread is about,
and a bot mentioned in a thread whose turns it already holds makes no extra API
call.
Related
Cluster Channels and bots in #168. Nearest: #638 (the recent-turn window and
which end it reads from — this is the same window, asked about a source outside
our database), #131 (a channel workspace invisible to the linked account) and
#1351. Not a duplicate; searched thread history, conversations.replies,
channel history.
Found in a real Slack workspace while verifying the fixes on PR #1344.
What happens
A bot pulled into a thread it has no history of answers as though the thread were
empty, confidently:
The conversation the model is given is built from what this deployment received
and stored. Anything said in the thread before that — because the bot was added
later, because a message was dropped, because the thread predates the binding —
is not in it, and nothing fetches it. So the agent's answer is about a thread it
can only see part of, and it does not know that.
Why the transcript above is not just #1071's file bug
That one is fixed: a
file_sharemessage is no longer dropped, so this exactsequence now works. What is left is the general case, and it is reachable without
any bug — invite a bot to a busy thread and mention it, and it answers the mention
alone.
What could be done
Slack answers
conversations.repliesfor the thread the bot was mentioned in, andMattermost has the equivalent. So a turn that opens a conversation inside an
existing thread could backfill that thread's earlier messages once, the way the
recent-turn window is assembled, bounded by the same message count.
Three things to decide rather than assume:
is a network round trip for something already stored.
what reaches the model beyond what the sender wrote — which is exactly what
read_channel_historyis gated per binding for. This probably wants the samegate rather than being unconditional.
read_channel_historyreads the channel, not the thread. The tool is boundto
channel_key(platform_chat_id)(router.py:528), which strips the thread —so today an agent cannot ask about the conversation it is actually in. That is
arguably its own defect and may be the cheaper half of this.
How you would know it was fixed
A bot mentioned partway through a thread answers the question the thread is about,
and a bot mentioned in a thread whose turns it already holds makes no extra API
call.
Related
Cluster Channels and bots in #168. Nearest: #638 (the recent-turn window and
which end it reads from — this is the same window, asked about a source outside
our database), #131 (a channel workspace invisible to the linked account) and
#1351. Not a duplicate; searched
thread history,conversations.replies,channel history.Found in a real Slack workspace while verifying the fixes on PR #1344.