The renderer CPU issue under investigation is suspected to happen while a task is actively communicating, not only when opening a long persisted history. Static database fixtures are useful for cold render and scroll baselines, but they do not exercise provider SSE, app-agent protocol fanout, subagent continuation, tool updates, or React updates during an active turn.
This reproduction suite keeps the first phase focused on building repeatable environments. Root-cause profiling and fixes are a separate phase.
Provider replay SSE
-> zcode-cli runtime events
-> @zcode/protocol stdio NDJSON
-> host process session services
-> renderer desktop-continuous subscription
-> v4 pane projection store
-> React render / layout / paint
For four-pane reproduction, the chain fans out per visible pane:
pane A prompt -> parent Agent tool -> child subagent stream -> parent final stream -> pane A render
pane B prompt -> parent Agent tool -> child subagent stream -> parent final stream -> pane B render
pane C prompt -> parent Agent tool -> child subagent stream -> parent final stream -> pane C render
pane D prompt -> parent Agent tool -> child subagent stream -> parent final stream -> pane D render
All cases in this document use desktop desktop-continuous. They must not be used to infer mobile /remote web-remote-replayable snapshot or gap-recovery behavior.
| ID | Purpose | Setup | Action | Evidence |
|---|---|---|---|---|
| PERF01 | Isolate one visible pane under high-frequency stream traffic. | One v4 pane, one session, synthetic recorded-stream fixture with many text/reasoning/tool-input chunks. | Send one prompt and keep the stream open long enough for CPU sampling. | Network artifact with chunk timeline, optional CDP profile, UI remains responsive. |
| PERF02 | Reproduce visible four-pane runtime fanout with tools and subagents. | Four v4 panes in one workbench, each bound to a different session. | Send four prompts that each trigger an Agent tool, a child subagent streamed response, then a streamed parent final response. |
Electron window recording, replay artifact with multiple overlapping /messages streams, all panes reach final markers. |
Phase 1 records user-visible reproduction evidence:
ffmpeg on PATH, or ZCODE_E2E_FFMPEG_PATH
pointing at a compatible binary.Run PERF02 with:
E2E_PROVIDER_REPLAY_FIXTURE_PATH=packages/desktop/test/e2e/fixtures/upstream/common.json,packages/desktop/test/e2e/fixtures/upstream/conversation-session/conversation-session-runtime-communication-performance.json \
ZCODE_E2E_MANUAL_REVIEW=1 \
pnpm --filter @zcode/desktop test:e2e -- --spec './test/e2e/conversation-session/manual-review/pending/conversation-session-runtime-communication-performance.test.ts'
Run the same case without video recording but with a renderer CPU profile:
E2E_PROVIDER_REPLAY_FIXTURE_PATH=packages/desktop/test/e2e/fixtures/upstream/common.json,packages/desktop/test/e2e/fixtures/upstream/conversation-session/conversation-session-runtime-communication-performance.json \
ZCODE_E2E_PROFILE_ONLY=1 \
ZCODE_E2E_PROFILE_STREAMING=1 \
ZCODE_E2E_MANUAL_REVIEW=1 \
pnpm --filter @zcode/desktop test:e2e -- --spec './test/e2e/conversation-session/manual-review/pending/conversation-session-runtime-communication-performance.test.ts'
Phase 2 adds profiler evidence after PERF02 reliably reproduces high CPU:
debug; do not add production info logs for per-chunk traces.PERF02 was run with ZCODE_E2E_PROFILE_ONLY=1 and ZCODE_E2E_PROFILE_STREAMING=1.
packages/desktop/.e2e-artifacts/runtime-perf-2026070810563799552ms2.59% / 3.87%4.19% / 5.96% / 6.85%254MB at start, 424MB peak, 391MB near end97455ms, with about 82318ms idle, 10320ms unattributed program time, and 399ms GC self timeMapped renderer self-time hotspots:
packages/ui/src/components/ai-elements/reasoning.tsx: reasoning content auto-follow scroll and mask updates, especially scrollToReasoningBottompackages/ui/src/v4/ConversationTimeline.tsx: bottom anchoring layout effect and scroll handling during streaming height changespackages/rpc/src/serialization.ts: small but visible deserialize cost for protocol framesThis baseline does not show a renderer process pegging CPU under deterministic replay; the current bottleneck shape is repeated streaming-driven React commit/layout work plus renderer memory growth. A follow-up high-CPU reproduction should either increase chunk concurrency/frequency or run against the live provider scenario where the original CPU spike was observed.
desktop-continuous only.MAX_WORKBENCH_PANES = 4 boundary.