slack: drop the eyes-emoji ack post; light the pill on the prior anchor#87
Merged
Conversation
… anchor The previous relay path posted a 👀 bot message as the pill anchor so assistant.threads.setStatus had something app-authored to attach to. That works but adds a noise-only post to every Slack-relayed prompt, which clutters the channel and looks like the bot is "saying" eyes. Re-light the pill on the most recent app-authored thread root for the slug instead (the previous turn's text post, persisted via writeThreadRoot and surfaced by readThreadRoot). The pill is the visible signal of work in progress; the prior reply is its natural anchor between turns and no new message is needed. The agent's first text post in this turn then becomes the new anchor via the existing post loop, draining buffered tools under the prior anchor and moving the pill onto the narrative text, same as before. When there is no prior anchor (very first interaction with this agent), skip: the pill appears the natural way on the agent's first reply. That happens once per agent install, so the one-time delay is worth not spamming a bot post.
rogeriochaves
added a commit
that referenced
this pull request
Jun 7, 2026
… reply Bringing back the eyes anchor that PR #85 introduced and PR #87 dropped, with the missing half: the ack message gets deleted from the channel the moment the agent posts its first real reply. So the channel sees a visible "received, working" beat in the 10-20s gap before the agent replies, and the ack disappears as soon as the reply lands — no persistent "👀" sitting under every relayed prompt forever. Mechanics: - The bridge posts "👀" as a bot message right after pasteTmuxPrompt and anchors the working pill on it via assistant.threads.setStatus. - The ts is persisted to ~/.kanban-code/eyes-anchors/<slug> via eyes-anchor.ts (same atomic write pattern as active-pill / thread-root). A bridge restart in the gap between the ack and the agent's first reply still finds the record and finishes the cleanup on the next text post (or on the restore-time turn-ended check). - The agent->slack post loop calls consumePendingEyes(slug) BEFORE posting any text reply, so the eyes message is gone in Slack by the time the human sees the new reply land — no flicker. - Restore-time pill drop (the previous commit) also calls consumePendingEyes so a turn that ended without ever producing text doesn't orphan an eyes message in the channel. Adds SlackClient.deleteMessage as a thin wrapper around chat.delete (scope chat:write is already on the bot). 5 unit tests cover the eyes-anchor persistence contract.
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.
Summary
Test plan
journalctl -u agents-slack-bridge.service.See: #85 (eyes-emoji ack original) and #86 (codex turn-end pill drop).