Skip to content

feat(slack): stream an Agent's tool-call timeline without its text - #10370

Merged
waleedlatif1 merged 4 commits into
stagingfrom
feat/slack-timeline-sources
Nov 24, 2026
Merged

waleedlatif1 merged 4 commits into
stagingfrom
feat/slack-timeline-sources

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

Slack triggers with an agent session can now show an Agent's tool-call timeline without posting that Agent's text. This is for workflows where an Agent's output is reviewed or reformatted before it is sent: today such a workflow can stream only the final block, so the person sees nothing for minutes.

  • New trigger fields.
    • streamTimelineSources (Show progress from): Agent blocks, including Agents in child workflows. The existing output picker is reused, filtered to Agent content outputs through a new SubBlockConfig.outputFilter.
    • streamToolLabels (Tool step labels): a Tool/Label table. MCP tools can be keyed by their own name, e.g. lc_cur; this also works for managed mcp-cg- connections.
  • Durable contract. SlackStreamResponseConfig gains timelineSources: { workflowId?, blockId }[] and toolLabels.
    • Normalization rejects a block that appears in both lists, and rejects a current-workflow source that is not an Agent.
    • Deployed configs without the new fields read as empty, so existing webhooks keep working without a redeploy.
  • Execution. Each source is added to selectedOutputs as <block>_content (or <wf>.<block>_content), so the existing Agent and child-workflow streaming paths stream it unchanged. Internal child selectors require a path, which is why it is selected as content.
    • The controller handles such a stream as timeline-only: tool steps and optional thinking are shown, while text deltas and bytes are drained and never posted.
    • The block's own output is unchanged.
  • One reply. The controller now owns the execution's first Slack message.
    • Timeline steps go into it, and the first answer invocation writes its text there too.
    • A later answer still starts its own message, so two answers never interleave.
    • At finalize, the shared message is stopped first (marking any unfinished tool steps as errors), then each invocation stops its own continuations.
  • Docs. The Slack integration docs and the Slack block's best-practices text are updated, and the SDK fixture catalog is regenerated.

Not included: collapsing repeated calls to the same tool into one step, and showing tool arguments. Arguments are never shown.

Test plan

  • slack-stream-config.test.ts:
    • normalize and read round-trip
    • legacy config with no timeline fields
    • reject a block in both lists
    • reject a non-Agent source
    • reject a source path other than content
  • slack-execution-stream.test.ts:
    • the source is in selectedOutputs
    • tool steps are shown with labels and no source text
    • the answer shares the one message, and stop is called once
    • a failed run stops once as suspended, with the task and the unfinished tool marked as errors
    • an unselected block still throws
  • The new tests were red before the implementation. Dropping the shared-message tool cleanup turns 4 tests red.
  • End to end on staging: DM the gate, then confirm a single threaded reply that shows the analyst's steps and ends with the reviewed answer.

@vercel

vercel Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
docs Ready Ready Preview Nov 24, 2026 7:47pm UTC

Request Review

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 12 files

Reply with feedback, questions, or to request a fix.

Turn on auto-fix | Re-trigger cubic

Comment thread apps/sim/blocks/blocks/slack.ts Resolved
@greptile-apps

greptile-apps Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no blocking issue was found.

Summary

Adds Agent progress sources and custom tool labels to Slack triggers. Progress sources hide their answer text, while their steps and the first streamed answer share one reply.

  • Slack triggers can show Agent progress without posting its text.
  • The first Slack reply now combines Agent steps with the answer.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  Agent[Progress Agent] --> Filter[Discard answer text]
  Filter --> Steps[Tool steps and optional thinking]
  Steps --> Shared[Shared Slack reply]
  Answer[First selected answer] --> Shared
  Later[Later selected answers] --> Separate[Separate Slack replies]
  Done[Run finishes] --> Stop[Stop shared reply and continuations]
Loading

Reviews (4) · Last reviewed commit: "test(slack): drive the append-ordering t..." · Reviewed by Greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 15 files

Reply with feedback, questions, or to request a fix.

Turn on auto-fix | Re-trigger cubic

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 15 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Turn on auto-fix | Re-trigger cubic

Slack triggers gain streamTimelineSources (Agent blocks, including child
workflows) and streamToolLabels. A timeline source streams through the
executor as usual, but only its tool steps and optional thinking reach
Slack; its text is drained and never posted. The first message of an
execution is shared by timeline steps and the first answer, and is
owned and stopped by the controller. Deployed configs without the new
fields read as empty, so no redeploy is needed.
…ique task IDs

- The shared message settles from the invocations that wrote to it, and
  each invocation succeeds only if the ones before it did, matching how
  replies settled before the shared message existed.
- The progress picker offers every Agent, including one whose response
  format replaces its content output.
- Task IDs include the execution order inside a child workflow instance,
  so two Agents there never update the same step.
- Tool labels and display titles ignore inherited object properties.
- Fix the CI audits (toRecordOrNull, unused export) and test types.
@waleedlatif1
waleedlatif1 force-pushed the feat/slack-timeline-sources branch from 82cfe5d to 070422e Compare November 24, 2026 19:41
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 15 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Turn on auto-fix | Re-trigger cubic

This branch was successfully deployed

1 active deployment
Preview — 070422ec Deployed Nov 24, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant