Repository navigation
Conversation
…essage An automation run can only post one declared message. Long digests are cut by size, so a section can start in the channel message and break with "[Continued below]" in the middle. finishAutomationRun now takes optional threadReplies. Slack delivery posts the message, then each reply as its own post in the thread under it. Each part is split on its own, so a section always starts a new post. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
🟢 Approval recommended
Static review supports the delivery changes; the remaining validation-diagnostic improvement is non-blocking, and tests were not executed.
1 open issue
What changed in this PR
Adds declared thread replies to automation results so long digests can place each section in a separate Slack post, without changing ordinary chat replies.
Changes:
- Accepts up to 10 thread replies through
finishAutomationRun, with reply text cleanup. - Splits each message and reply independently, and passes replies through initial and resumed delivery.
- Records the full output in conversation history and adds result and delivery coverage.
| File | Description |
|---|---|
packages/junior/tests/unit/chat/automation-result.test.ts |
Tests declared replies and the updated result shape. |
packages/junior/tests/integration/slack/reply-delivery.test.ts |
Tests separate posts under the parent message. |
packages/junior/src/chat/tools/runtime/finish-automation-run.ts |
Exposes optional thread replies to automations. |
packages/junior/src/chat/slack/reply.ts |
Splits each declared part independently. |
packages/junior/src/chat/README.md |
Documents the thread-reply contract. |
packages/junior/src/chat/providers/slack/turn.ts |
Delivers and records replies for initial runs. |
packages/junior/src/chat/providers/slack/resume.ts |
Delivers and records replies for resumed runs. |
packages/junior/src/chat/automation-result.ts |
Defines reply validation, limits, and the delivery result shape. |
Review effort: Balanced
…errors A blank thread reply failed validation with "send_message requires a non-empty message.", even when the message was valid. Name the thread reply instead, so the agent fixes the right field. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dcramer
reviewed
Oct 23, 2026
Comment on lines
+68
to
+72
| input.result !== "send_message" | ||
| ? `${input.result} requires a non-empty reason.` | ||
| : typeof input.message === "string" && input.message.trim() | ||
| ? "Every threadReplies item must be non-empty." | ||
| : "send_message requires a non-empty message.", |
Author
Thank you for looking at it and the feedback 🙇 All fair points! Closing this PR |
This branch was successfully deployed
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.


An automation run can only post one declared message. When the message is long, Slack delivery cuts it by size (2,200 characters or 45 lines). A section of a digest can then start in the channel message and break in the middle with
[Continued below].finishAutomationRunnow takes an optionalthreadReplieslist (at most 10). Slack delivery posts the message, then posts each reply as its own post in the thread under it. Each part is split on its own, so a section always starts a new post. An oversized section still splits safely. Chat replies do not change.Example: the Mobile SDK team's weekly hybrid dependency digest (team-mobile#219). It needs a short channel message and one thread reply per dependency. In a test run today, the size cut put the first section in the channel and broke later sections in the middle.
Related: #2051 (how automation runs deliver results).
Changes
automation-result.ts:send_messageacceptsthreadReplies, with the same cleanup asmessage.finishedRunReplyreturns{ text, threadReplies }.finish-automation-run.ts: the tool exposesthreadReplies.slack/reply.ts:sendSlackReplysplits the message and each reply separately. The existing post loop threads every post after the first one.providers/slack/turn.ts,resume.ts: passthreadRepliesto delivery. History records the message and replies together, so a reply in the thread continues with the full context.Open questions
resultMessageIdis the last post, so with thread replies the result link opens the last reply, not the parent. Multi-chunk replies already work this way. Should it point at the first post?Tests
tests/integration/slack/reply-delivery.test.ts: each thread reply is its own post, threaded under the first message. This test fails without thereply.tschange.tests/unit/chat/automation-result.test.ts:finishedRunReplyreturns the declared thread replies; existing cases are updated for the new return shape.@sentry/juniorsuite, typecheck, lint, Prettier, file-length and test-architecture checks.🤖 Generated with Claude Code