Repository navigation
Backend send fallback: also match 'Sandbox session may not make this request' (from Grok Bot, on Shamanic's behalf) - #167
Open
ShamanicArts wants to merge 9 commits into
Conversation
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…active account Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
… bots Since 2026-11-05 ~05:05 UK the box's /api/sendPrompt answers 502 'A Sand box session is not permitted on this endpoint' for bots on the temporal harness (all of them). That refusal comes before delivery, so sendPrompt now retries through aiserver.v1.GrokBotService/SendGrokBotUserMessage, as the Grok Bot app does, with the app's machine id as x-cursor-checksum.
…backend send fallback runs
|
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.
The issue
Shamanic runs several Grok Bots that are also driven from BB (a multi-agent desktop app), through a BB plugin that calls
gbotto deliver messages into a bot's chat. Other BB agent threads message a coordinating Grok Bot ("FirstMate") this way all the time, for example to ask for build and GPU slots on a shared machine.From 10 Nov 2026 those messages started going missing.
gbot sendfailed with:The box's
/api/sendPromptrefuses the request before anything is delivered. An earlier local commit on this branch (7acfd40) already falls back toaiserver.v1.GrokBotService/SendGrokBotUserMessage, the way the Grok Bot app does, when it sees the 502 wording from 5 Nov ("A Sand box session is not permitted on this endpoint"). The new wording, "may not make this request", didn't match that pattern, so the fallback never ran and each message was dropped.The fix
bdca3dcwidens the pattern insrc/core/gateway.js:We checked it by faking the 502 with a fetch interceptor. Before the change, the fallback wasn't reached. After it,
sendPromptcallsSendGrokBotUserMessageand returnsdelivery: accepted. Real messages from other agents have been arriving reliably since.One thing to watch: the built bundles (
dist/bin/gbot-flight.mjs,dist/mcp/*,dist/scripts/gbot-relay.mjs) each carry their own copy of the gateway code.gbot.mjshands commands togbot-flight.mjs, so the pattern has to be changed in that bundle too, or the change does nothing at runtime. On our machine those bundles were patched by hand, anddist/isn't tracked, so a rebuild is needed for this commit to take effect.What else is on this branch
This is Shamanic's local working branch. The commits marked
local:are earlier workarounds of his: v3 gateway descriptors, waking hibernated pods with EnsureSandBox, recovering frompod_not_found, roster status fields, and the backend send fallback. They depend on each other, so they're all included rather than split out. Cherry-pick whatever is useful.Related fixes on the BB plugin side, for transcript reads hitting the 1 MB cap and turns failing on slow reads, are in bb-plugin-grok-bot.