Skip to content

fix(desktop): defer host reads for pending sessions - #5082

Open
liuxiaocs7 wants to merge 3 commits into
apache:mainfrom
liuxiaocs7:fix/desktop-pending-session-host-reads
Open

fix(desktop): defer host reads for pending sessions#5082
liuxiaocs7 wants to merge 3 commits into
apache:mainfrom
liuxiaocs7:fix/desktop-pending-session-host-reads

Conversation

@liuxiaocs7

Copy link
Copy Markdown
Member

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_found reads 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-deps
  • npm --workspace @maka/desktop run typecheck
  • npm --workspace @maka/desktop run check:architecture (101 tests)
  • npx biome check on the changed TypeScript files
  • npm run format:check
  • npm --workspace @maka/desktop run build:main
  • npm --workspace @maka/desktop run test:dist (2536 tests)
  • git diff --check

AI use

Select exactly one:

  • No generative tool made a substantive contribution
  • Generative tooling made a substantive contribution

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

  • Tests cover the change and fail without it
  • Lint, format, typecheck and the affected suites pass locally

Does this PR entail a change in behavior?

  • Yes — described under Summary above
  • No

@github-actions github-actions Bot added the effort/M Under 500 readable lines label Sep 9, 2026
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
liuxiaocs7 force-pushed the fix/desktop-pending-session-host-reads branch from 41703c3 to e6e6ae9 Compare September 9, 2026 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

effort/M Under 500 readable lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug(desktop): pending sessions trigger Runtime Host not_found errors

1 participant