ref(slack): Simplify assistant thread delivery#204
Merged
Conversation
Collapse Slack reply delivery around a single outbound contract for finalized messages, files, reactions, assistant status, and markdown normalization. Remove the legacy streaming reply path, document the supported assistant-thread behavior, and expand integration coverage around the Chat SDK boundary with MSW-backed Slack API assertions. Harden assistant DM title and status handling so best-effort status writes do not block turns, title generation uses the oldest known human message with a lightweight model, and stable Slack title permission failures do not repeat on later turns. Point example-app dev at the built workspace dist via a symlinked injected package path so local boot no longer races on recursive copy refreshes. Refs GH-202 Co-Authored-By: GPT-5 <noreply@openai.com>
Move assistant-thread lifecycle, status, title generation, and mrkdwn translation into Slack-owned modules. Remove the old progress reporter and transport split so the outbound contract is smaller and Slack-specific behavior stays isolated. Keep the existing assistant status and title semantics while simplifying the reply planning path and tightening the integration coverage around the Chat SDK and Slack API wiring. Refs GH-202 Co-Authored-By: GPT-5 Codex <noreply@openai.com>
Separate assistant-status rendering, scheduling, and Slack sending so the status path is easier to reason about without changing the public runtime API. Document the distinction between Slack-required behavior, Junior runtime policy, and product policy so future changes do not conflate transport requirements with UX decisions. Refs GH-202 Co-Authored-By: GPT-5 Codex <noreply@openai.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Treat inbound Slack images without vision support as a deterministic runtime fallback instead of letting the model infer that no image was attached. Also log raw inbound attachments separately from prompt attachments so local diagnosis stays obvious. Collapse the extra light-model knob into AI_FAST_MODEL and route title generation through the same fast-model setting. This removes a redundant config surface while keeping lightweight follow-up work on the cheaper model path. Refs GH-202 Co-Authored-By: GPT-5 <noreply@openai.com>
Keep image-bearing Slack turns on the normal reply path when vision is disabled and pass the omission through the reply context so the model stays truthful in mixed and image-only turns. Drain already-started assistant status writes before the first visible reply so Slack cannot re-show stale progress after the final message lands, while keeping status writes off the model and tool execution critical path. Refs GH-202 Co-Authored-By: GPT-5 <noreply@openai.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 8dbe791. Configure here.
Keep assistant status best effort by letting finalized replies post without waiting for in-flight status writes. Persist inbound attachment facts on user messages so timeout and MCP auth resumes can rebuild omitted-image context before Pi continues or the request is replayed. Refs GH-202 Co-Authored-By: Codex <noreply@openai.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Rework Slack assistant-thread delivery around a single Slack-owned outbound boundary.
This moves assistant-thread lifecycle, title generation, status handling, message, file, and reaction delivery, and markdown-to-
mrkdwntranslation into Slack-specific modules with explicit contracts. It removes the old runtime progress reporter and transport split, simplifies reply planning so Slack delivery operates on plain text, files, and stages, and keeps the runtime-facing API narrow.The motivation is the number of regressions we had accumulated around assistant status, DM assistant-thread identifiers, title generation, reply finalization, and duplicated Slack-specific behavior. This branch isolates Slack behavior in one place, makes the live Slack context requirements explicit, and adds integration coverage around the Chat SDK contract and Slack request shape so future changes have fewer ways to break.
I considered a more aggressive rewrite around a brand new outward API or bringing streaming back as the primary Slack surface, but kept the finalized-reply model intact. That reduces internal complexity without changing the user-visible delivery contract again. The follow-up fixes in this branch also keep image-bearing turns on the normal reply path when vision is unavailable and preserve assistant-status ordering so a delayed status write cannot reappear after the final reply lands.
Fixes GH-97
Fixes GH-187
Fixes GH-200
Fixes GH-202