Skip to content

Reduce orchestration worktree freeze pressure#355

Merged
Juliusolsson05 merged 2 commits into
mainfrom
fix/orchestration-worktree-freeze
Jun 24, 2026
Merged

Reduce orchestration worktree freeze pressure#355
Juliusolsson05 merged 2 commits into
mainfrom
fix/orchestration-worktree-freeze

Conversation

@Juliusolsson05

Copy link
Copy Markdown
Owner

Summary

  • Add main-side backpressure for renderer orchestration requests so bulk list/read/mark calls cannot flood the renderer bridge.
  • Make orchestration list/status cheap and make read-agent/read-run-outputs tail-bounded instead of materializing full transcripts before slicing.
  • Reduce git/worktree fanout with a process-wide git subprocess limiter, longer/aliased worktree caches, fewer status subprocesses, and cheaper submodule dirty checks.
  • Stabilize WorktreesBar polling so runtime churn does not restart worktree scans and overlapping refreshes are coalesced.

Root cause

The failure mode is renderer event-loop starvation. Orchestration MCP coordination routes through the renderer-owned workspace model; under many agents, wait/list/read calls were scanning every child transcript while worktree UI/session paths also spawned many git subprocesses and pushed broad runtime updates. Main then reported the bridge as unhealthy because it was waiting on a renderer that was busy doing synchronous coordination/UI work.

Validation

  • git diff --check passes.
  • npm exec tsc -- --noEmit --pretty false -p tsconfig.node.json is blocked by existing missing local package declarations and unrelated existing type errors.
  • npm exec tsc -- --noEmit --pretty false -p tsconfig.web.json is blocked by generated node declaration outputs missing after node typecheck fails.
  • npm exec eslint attempted to fetch eslint from npm and failed because network is restricted/no local eslint binary is installed.

@Juliusolsson05 Juliusolsson05 merged commit 49e33d8 into main Jun 24, 2026
@Juliusolsson05 Juliusolsson05 deleted the fix/orchestration-worktree-freeze branch July 7, 2026 21:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant