Skip to content

fix(core): Title a Slack assistant thread once, as main does - #5261

Open
sentry-junior[bot] wants to merge 5 commits into
mainfrom
fix/core-assistant-thread-title
Open

sentry-junior[bot] wants to merge 5 commits into
mainfrom
fix/core-assistant-thread-title

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Dec 5, 2026 •

Copy link
Copy Markdown
Contributor

On main, a Slack assistant thread gets the Conversation title once, while its first Turn runs. Main starts the title when it stores the input (chat/runtime/turn-preparation.ts:271) and sets it on Slack beside its run, without waiting for it (chat/providers/slack/turn.ts:1039). Later Turns do not set it again. Main reads the message's thread_ts, so a top-level DM gets no title, and maybeSyncAssistantTitle skips channel threads. Core never set a title at all.

Core now starts and sets the title on the step that reads the Turn's first inputs, beside its model request (turn-steps/assistant-thread-title.ts, called from the consumer's step tools). The step's close waits for it, because core has no waitUntil to own it. Core's Slack Source gives a top-level message its own ts as threadTs. So a requester whose threadTs is its messageTs gets no title, the same as on main.

The shared engine fixture's directMessage() now takes an optional threadTs for a reply in a DM thread. Existing callers pass none and get the same top-level DM as before. The delivery:slack-assistant-thread-title row loses its likely-core-gap and leaves the uncovered baseline.

Touches neither the Slack thread join that #5229 moves nor its rows.

via @thomasjiangcy.

--

View Session [Sentry]

Row: delivery:slack-assistant-thread-title.

Main gives an assistant thread the Conversation title once, when its Turn
starts (chat/providers/slack/turn.ts titleProjection). It reads the
message's thread_ts, so a top-level DM gets no title, and
maybeSyncAssistantTitle skips channel threads. Core never set it.

Core now sets it after the Turn writes the title
(turn-steps/assistant-thread-title.ts). Core's Slack Source gives a
top-level message its own ts as threadTs, so a requester whose threadTs
is its messageTs gets no title, as on main.

The engine fixture's directMessage() takes a threadTs for a DM thread
reply. The row leaves the uncovered baseline.

Co-Authored-By: Thomas Jiang <20501235+thomasjiangcy@users.noreply.github.com>
@vercel

vercel Bot commented Dec 5, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
junior-docs Ready Ready Preview Dec 5, 2026 3:06am UTC

Request Review

@github-actions github-actions Bot added the risk: medium PR risk score: medium label Dec 5, 2026
sentry-junior Bot and others added 3 commits December 5, 2026 02:38
…n does

Main starts the title when it stores the input
(chat/runtime/turn-preparation.ts:271) and sets it on Slack beside its
run (chat/providers/slack/turn.ts:1039). Core now does both on the step
that reads the Turn's first inputs, beside its model request, and the
step's close waits for it. The Turn-end projection goes.

The parity case holds the first reply and checks that the title comes
before it.

Co-Authored-By: Thomas Jiang <20501235+thomasjiangcy@users.noreply.github.com>
…read-title

Co-Authored-By: Thomas Jiang <20501235+thomasjiangcy@users.noreply.github.com>
Co-Authored-By: Thomas Jiang <20501235+thomasjiangcy@users.noreply.github.com>
…ead title

As the other core Slack calls do (delivery/slack.ts,
turn-receipts.ts), the title call now runs under the requester's
installation, so a multi-workspace install sends it with that
workspace's token.

This branch was successfully deployed

1 active deployment
Preview – junior-docs — ed79da6d Deployed Dec 5, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: high PR risk score: high

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant