Repository navigation
Conversation
…ivered The Reason CLI's relay holds check_inbox waits on a hosted assistant's session only to hand its mail to Reason's inbox; the assistant sees it at its next check_inbox there. The relay now marks those sessions through_reason on its hooks, and deliver() answers queued with Reason's own send_message note, and list_team shows them pull. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Sven Myhre <sven@mac.lan>
Bugbot needs on-demand usage enabledBugbot uses usage-based billing for this team and requires on-demand usage to be enabled. A team admin can enable on-demand usage in the Cursor dashboard. |
Member
|
Review of f240799 (independent, full suite): changes needed, mostly because main moved.
Compatibility looked good on the head: a 0.12.13 daemon ignores the flag and still replies |
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.
Problem
A coding agent (or a person with
reason-network send) messaging an app connected through Reason (a hosted Grok Bot / Muse / ChatGPT connection whose mail Reason keeps until it callscheck_inbox) is tolddelivered: the session was waiting for messages. The app hasn't seen it: the wait that made it "delivered" is the Reason CLI's relay (cli/ask-relay.tsread(), 300 s waits), which only hands the mail to Reason's inbox for the app. The app sees it at its nextcheck_inbox, or when its wake webhook starts it.Reason's own
send_messagealready corrects this for senders that go through Reason (reason-machines/monorepo#29173), but the engine saysdeliveredto everyone talking to it directly: thereason networkCLI and agents on the engine's own MCP tools, on this machine or a teammate's (a remote send's receipt is thisdeliver()'s answer on the recipient's machine).Where on main:
src/daemon/mail.rsdeliver(), theg.polling.get(key)branch (line 318 before this change) returnsdeliveredfor any open wait.Change
HookCallgetsthrough_reason(serde default false, skipped when false). The Reason CLI's relay sends it on its hooks for the sessions it carries (companion monorepo PR). Older clients leave it out; older engines ignore the field (nodeny_unknown_fields).pull(hooks no longer raise it toturn/pushby agent kind), anddeliver()answersqueuedwith Reason's wording before any channel or wait check:queued: this agent is connected through Reason and only sees it the next time it calls check_inbox (or its wake webhook starts it); it hasn't read it yetGuarantees
arrivedstill wakes the relay's wait, which reads and hands it over as before (verified below). Only the receipt and the shown tier change.check_inbox(stilldelivered).Verification (run)
cargo test: 254 + 2 passed.cargo clippy --all-targets: no warnings.cargo fmt --check: clean.REASON_NETWORK_HOMEand drove its socket: agroksession registered by hooks holds a 10 sinboxwait, a second session sends to it.through_reason: true: receiptqueued+ the note above; the wait still got the message;whotierpull.delivered: the session was waiting for messages; tierturn.Callers / rollout
cli/ask-relay.tspassesthroughReason: truetoAgentNetwork.session(), which addsthrough_reasonto its hooks. It is harmless on 0.12.13.scripts/publish-network-engine.ts, and the CLI'sENGINE_VERSION/ digests pin moves to it, plus a CLI release carrying the relay flag. For remote senders the recipient's machine must run both.Uncertainty
sincefor these sessions is still the relay's registration time on the engine; Reason'slist_teamfixes it server side, the engine has no record of the app's lastcheck_inbox.🤖 Generated with Claude Code