Tracking upstream cmux manaflow-ai#6500 — applicable to our fork but needs a product/scope decision.
Assessment: Confirmed: v2SurfaceReadText at Sources/TerminalController.swift:5808 wraps the entire read in v2MainSync, and readTerminalTextBase64 calls ghostty_surface_read_text three times on main when includeScrollback=true. CLAUDE.md socket threading policy explicitly lists surface.read_text as a main-thread command due to snapshot-consistency requirements. Moving the heavy C call off-main requires first verifying ghostty_surface_read_text thread-safety in the Ghostty Zig implementation. Needs both a thread-safety audit and a policy decision.
Upstream: manaflow-ai#6500
Tracking upstream cmux manaflow-ai#6500 — applicable to our fork but needs a product/scope decision.
Assessment: Confirmed:
v2SurfaceReadTextat Sources/TerminalController.swift:5808 wraps the entire read inv2MainSync, andreadTerminalTextBase64callsghostty_surface_read_textthree times on main whenincludeScrollback=true. CLAUDE.md socket threading policy explicitly lists surface.read_text as a main-thread command due to snapshot-consistency requirements. Moving the heavy C call off-main requires first verifyingghostty_surface_read_textthread-safety in the Ghostty Zig implementation. Needs both a thread-safety audit and a policy decision.Upstream: manaflow-ai#6500