feat(intercom): mail rides the same queue as the operator's own typing - #2
Merged
Merged
Conversation
lucy-wolfe
force-pushed
the
feat/mail-rides-steer
branch
from
August 28, 2026 17:16
8ad8ba6 to
94e2bb0
Compare
A busy person now reads an ordinary message at the next step boundary inside the running turn instead of at the end of it. The operator typing mid-turn has always been submitted as a steering message and consumed within seconds; ordinary mail rode the follow-up queue, which Pi consumes only once the agent has no more tool calls or steering messages. So somebody an hour into a piece of work did not see a teammate's message until the hour was over, while the identical words typed by the operator arrived immediately. Interrupt mail already rode the steering lane, so this widens a production-proven path rather than building one. The digest is untouched: batching is still the answer to twenty messages in one turn, and only the moment of consumption moved. Verified before changing anything, because it would have been a real blocker: the delivery receipt hangs off message_start, not turn_start, so it is written wherever the message is consumed. Interrupts have been consumed mid-turn in production all along and receipted through that same handler, so a normal envelope takes an identical path. Three call sites were considered and two moved. The work-resume prompt keeps follow-up and says why: nobody is waiting on it and it asks the person to pick their own work back up. The input-requeue rescue and the printed-tool-call corrective keep theirs, with rationales already written down that remain true. An unreachable ternary went with it: normal urgency is routed away three lines above the interrupt delivery, so its false arm could never be taken even before this change. The change was unpinnable as written, so it was made pinnable. The delivery table was already covered, but the mode passed into it was two string literals at two call sites -- so the timing of every delivery in the product could change without one test noticing, which is exactly what happened when the first implementation went green. It is one named decision now, with a test that asserts the rule and fails when the mode is reverted. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
lucy-wolfe
force-pushed
the
feat/mail-rides-steer
branch
from
August 28, 2026 17:32
94e2bb0 to
dfd6c62
Compare
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.
Rides into v0.5.7 via the integration branch. Reviewed as tribes-protocol#17 and tribes-protocol#18; retargeting those was impossible because GitHub requires a cross-fork PR's base to live in the base repository, and this integration branch lives on the fork.