fix(desktop): defer host reads for pending sessions - #5082
Open
liuxiaocs7 wants to merge 3 commits into
Open
Conversation
Keep locally activated pending sessions available to chat while withholding their ids from Runtime Host-backed plan, diagnostics, observation, shell-run, and workbar reads until catalog admission. Generated-by: Codex
liuxiaocs7
force-pushed
the
fix/desktop-pending-session-host-reads
branch
from
September 9, 2026 16:50
41703c3 to
e6e6ae9
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.
Summary
Keep a newly-created pending Session available to the local chat UI while withholding its id from Runtime Host-backed consumers until the authoritative catalog admits it.
This prevents the initial Session activation race from triggering
not_foundreads in Session observation, Plan state, context diagnostics, shell runs, terminal, side-chat, and browser workbar integrations. Cached Host Sessions remain readable, and shared Sessions retain Host-backed access without local-owner capabilities.Fixes #5081
Verification
npm --workspace @maka/desktop run build:workspace-depsnpm --workspace @maka/desktop run typechecknpm --workspace @maka/desktop run check:architecture(101 tests)npx biome checkon the changed TypeScript filesnpm run format:checknpm --workspace @maka/desktop run build:mainnpm --workspace @maka/desktop run test:dist(2536 tests)git diff --checkAI use
Select exactly one:
Tool(s) and scope: OpenAI Codex diagnosed the pending Session/Runtime Host admission race, implemented the boundary projection and regression tests, and ran verification.
Checklist
Does this PR entail a change in behavior?