Skip to content

Fix Slack live delivery status and empty fallback#408

Open
Geeknerd1337 wants to merge 1 commit into
paradigmxyz:mainfrom
TipLink:codex/upstream-slack-live-empty-delivery
Open

Fix Slack live delivery status and empty fallback#408
Geeknerd1337 wants to merge 1 commit into
paradigmxyz:mainfrom
TipLink:codex/upstream-slack-live-empty-delivery

Conversation

@Geeknerd1337
Copy link
Copy Markdown

PR Description

Problem

Long-running Slack sessions could look dead even while Centaur was still running.

The tool/task stream continued internally, but Slack's assistant status was cleared after the first visible streamed output. For long executions, that meant the thread could stop showing an active "Thinking..." state even though tool calls and chain-of-thought style progress were still being processed.

We also found a related blank-delivery edge case. If Slack live delivery was enabled but the model produced zero visible answer characters, the API treated live delivery as already covering the result. That suppressed the durable final-delivery fallback, so a no-output execution could complete without posting a useful fallback message.

Fix

  • Keep Slack assistant status active for the whole agent session.
  • Refresh the Thinking... status every 30 seconds while the session is active.
  • Clear assistant status only when done() runs.
  • Stop retrying status refreshes if Slack reports that assistant status is unsupported for the channel/thread.
  • Avoid opening a blank Slack stream when a session completes with no visible output.
  • Change API final-delivery suppression so live Slack delivery only suppresses fallback delivery when there is actual result text and Slack streamed enough visible answer characters to cover it.
  • Add regression coverage for both sides:
    • Slackbot renderer does not create blank streams and keeps status behavior sane.
    • API final-delivery fallback is queued when live delivery streamed zero answer characters.

Relevant Issues Fixed

  • Long Slack runs can appear silent/dead after early streamed output because Thinking... disappears too soon.
  • No-output or failed/no-input executions can skip final fallback delivery when live Slack delivery reported zero streamed answer characters.
  • Blank Slack streams can be opened during session close even when there is no visible content to render.

Test Plan

  • bun test src/*.test.ts src/**/*.test.ts in services/slackbot
  • bun run check:types in services/slackbot
  • /Users/fin-sa/centaur/services/api/.venv/bin/python -m pytest tests/test_agent_control_plane.py -k "slackbot_streamed_answer_chars or live_answer" in services/api
  • /Users/fin-sa/centaur/services/api/.venv/bin/python -m ruff check api/runtime_control.py tests/test_agent_control_plane.py in services/api

@Geeknerd1337
Copy link
Copy Markdown
Author

This fixes #358

@Geeknerd1337 Geeknerd1337 marked this pull request as draft June 4, 2026 23:08
@Geeknerd1337 Geeknerd1337 marked this pull request as ready for review June 5, 2026 04:38
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