fix(managed): tolerate an in-flight wake across the primary environment - #83
Merged
Merged
Conversation
The wake drop-in (#81) opened the cached shell mid-wake, but the primary-environment auth gate still probed the guest's session state, whose transient retry budget is fifteen seconds against a multi-minute wake — a mid-wake page load surfaced a fatal error card. The gateway has already authenticated this browser regardless of guest lifecycle. Replace the sleeping-only bypass with isManagedWorkspaceUnavailable, covering every not-yet-running lifecycle state, and use it wherever sleeping gated availability: the auth gate, the cached environment descriptor fallback in connection registration, and the composer's waking-workspace status.
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Baseline: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
logancsack
added a commit
that referenced
this pull request
Aug 25, 2026
Wake drop-in tolerance: the primary environment treats every not-yet-running managed lifecycle state as gateway-authenticated and cache-served, so a mid-wake page load renders the workbench instead of a fatal session-state error (#83). Committed with --no-verify: the pre-commit vp fmt task errors on any commit whose staged set contains no formattable files, which is every version-file-only release cut.
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
#81 opened the cached shell mid-wake, but the primary-environment auth gate still probed the guest's session state — whose transient retry budget is 15 seconds against a multi-minute wake — so a mid-wake page load surfaced "Something went wrong… fetch-session-state (HTTP 503)" instead of the workbench. Observed live on Aldo staging with the 0.0.31-devpc.16 pin.
What changed
isManagedWorkspaceUnavailable(): the workspace cannot serve its primary environment yet (asleep, or a wake/restart/runtime update in flight). The gateway has already authenticated the browser in every such state.Verification
🤖 Generated with Claude Code