Skip to content

[codex] illustrate Slack stream payload budgeting#617

Draft
Zygimantass wants to merge 1 commit into
vercel:mainfrom
Zygimantass:codex/illustrate-slack-stream-payload-fix
Draft

[codex] illustrate Slack stream payload budgeting#617
Zygimantass wants to merge 1 commit into
vercel:mainfrom
Zygimantass:codex/illustrate-slack-stream-payload-fix

Conversation

@Zygimantass

Copy link
Copy Markdown

Draft PR for illustration only. This is meant to show the adapter-side changes we made downstream to make Slack native streaming work reliably for Centaur, not as a polished upstream API proposal.

What this demonstrates:

  • rotate Slack native stream segments before the stream age/size limits are hit
  • estimate combined markdown plus structured task/plan payload size, instead of only markdown length
  • split large task updates into Slack-sized chunks
  • annotate stream delivery failures with slackStreamMessageId and slackAnswerLost so an app-level durable fallback can replace the failed stream instead of posting a duplicate
  • tests for markdown rotation, structured task payload rotation, and msg_too_long annotation

Context from our incident:

Slack returned msg_too_long on chat.stopStream even though the final answer text was short. The oversized payload came from accumulated structured plan/task block JSON. In Centaur, the replacement fallback remains app-side; this PR only illustrates the SDK adapter behavior needed to support that.

Validation:

  • pnpm exec ultracite check packages/adapter-slack/src/index.ts packages/adapter-slack/src/index.test.ts
  • pnpm --filter @chat-adapter/slack typecheck
  • pnpm --filter @chat-adapter/slack test -- index.test.ts
  • pnpm --filter @chat-adapter/slack build
@vercel

vercel Bot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

@Zygimantass is attempting to deploy a commit to the Vercel Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant