feat(slack): Defer passive steering during active turns#612
Merged
Conversation
Route active Slack follow-ups into the running Pi turn while leaving passive subscribed-thread follow-ups pending for the next worker slice. This keeps explicit requests responsive without letting passive thread chatter change an in-flight answer. Fixes GH-603 Co-Authored-By: GPT-5 Codex <codex@openai.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Acknowledge drained mailbox entries by inbound id and reject ids that were not offered in the pending batch. This keeps deferred passive Slack follow-ups durable while making the steering drain boundary explicit. Update the task execution contract and tests for subset acknowledgement and visible no-wrapper steering output. Fixes GH-603 Co-Authored-By: GPT-5 Codex <codex@openai.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 33bd385. Configure here.
Treat Slack assistant-thread user messages as active steering even when a mailbox record carries the subscribed route. This preserves immediate steering for app-thread follow-ups without changing ordinary subscribed channel-thread deferral. Fixes GH-603 Co-Authored-By: GPT-5 Codex <codex@openai.com>
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.

Active Slack requests that arrive during an in-flight turn now interrupt that run through Pi steering, while passive subscribed-thread messages that are reply-eligible remain pending and run after the current answer is delivered. Passive no-reply and opt-out messages are still consumed through skipped-message handling without model injection.
The implementation keeps Pi steering as ordinary user input, matching Pi's queue semantics instead of adding a model-visible steering wrapper. The mailbox drain path now supports subset acknowledgement by inbound id, rejects acknowledgements outside the offered pending batch, and validates Slack mailbox metadata before using route data for active/passive classification. Deferred passive messages stay durable for the next worker slice while interrupted and skipped messages are acknowledged immediately.
Garfield review passed after tightening the mailbox boundary, task-execution spec, and visible Slack output assertions. Verified with the focused Slack steering/component tests, respond/session-history regression tests,
tsc --noEmit, and package lint.Fixes GH-603