Skip to content

slack: light working pill immediately when a Slack human relays a prompt#85

Open
rogeriochaves wants to merge 1 commit into
mainfrom
fix/slack-pill-on-relay
Open

slack: light working pill immediately when a Slack human relays a prompt#85
rogeriochaves wants to merge 1 commit into
mainfrom
fix/slack-pill-on-relay

Conversation

@rogeriochaves
Copy link
Copy Markdown
Contributor

Summary

  • Posts a single eyes emoji as a minimal bot-authored anchor in the agent's channel right after the bridge pastes a relayed Slack-human prompt into tmux, and lights assistant.threads.setStatus on that post.
  • Without this anchor the channel looks dead for the 10-20s gap between the human typing and the agent's first text post — that text post is what the existing rollout-tail flow uses as the natural pill anchor, so there is no signal in between.
  • Slack's setStatus only accepts thread roots authored by the app itself (invalid_thread_ts on user-channel ts, see slack-setstatus-app-authored-threads-only memory from the earlier revert), so pinning the pill to the human's own message is not viable. The single-emoji anchor is the lowest-noise placeholder that still gives setStatus something valid to attach to.
  • The agent's first real text post supersedes the anchor as the new thread root in the existing post loop, so tool calls accumulated in the interim drain under the eyes anchor and the pill moves onto the narrative reply.

Test plan

  • All 242 existing CLI tests pass.
  • On the box, after relaunching agents-slack-bridge.service on this branch: typing a prompt in any agent channel surfaces an eyes-emoji bot post + working pill within a second, and the pill moves onto the agent's first real text post when it lands.
  • No invalid_thread_ts errors in journalctl -u agents-slack-bridge.service.

…a prompt

The bridge already suppresses the daemon's UserPromptSubmit echo for
Slack-relayed prompts (they're already in the channel as the human's
message), which leaves nothing bot-authored for assistant.threads.setStatus
to attach to. Result: the channel looks dead for the 10-20s between the
human typing and the agent's first text post, which is the natural pill
anchor for the existing rollout-tail flow.

Post a single eyes emoji as a minimal bot-authored anchor right after we
paste into tmux, then setStatus the working pill onto it. The agent's
first real text post lands as a new thread root via the existing post
loop, draining any accumulated tool calls under the eyes and moving the
pill onto the narrative reply — same shape as the existing scheduled-nudge
path.

setStatus only works on app-authored thread roots (Slack rejects
event.ts of a user-channel message with invalid_thread_ts), so pinning the
pill directly to the human's own message is not an option. The single-
emoji anchor is the lowest-noise placeholder that still gives the pill
something valid to anchor to.
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