Repository navigation
Model bridge: answer what arrived while it was down - #4903
Merged
Merged
Conversation
A replace=true restart started at the inbox tail, so every DM sent during the gap was skipped. Replies now name the message they answer, and a restart resumes after the newest answered inbox message; an inbox with no recorded answer still starts at its tail instead of replaying history. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RnH6dU1ViXamAaDwNWUtGY
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.
What was broken
After a
comms_serve_model replace=truerestart, rl2 never answered Tristan's three DMs (bus 23299–23301). They arrived during the restart, and a fresh bridge started reading at the inbox tail (_initial_start), so anything sent while it was down was silently skipped.Fix
messaging.send(..., answers=(message.reference,))), so the bus's own answer table records which inbox messages are done. The bridge keeps no cursor of its own.bus.unanswered_referenceswhich messages have no answer, and resumes after the newest one that has. Messages that arrived in the gap get answered next.Evidence
tests/test_model_agent_client.py+tests/test_connector_serve_model.py: 9 passed, exit 0. The new test answers a DM, stops the bridge, sends a DM while it's down, restarts, and gets the echo of that gap message.Generated by Claude Code