Files
magpie/internal
SkyJiashu a49f3745eb claudetui: use a conpty folder beside the executable before Windows' own ConPTY
Windows 10's conhost (10.0.19041) drops bracketed paste marks, so Claude Code
takes a long message as many pastes and submits only part of it (#5205).
Windows Terminal's conpty.dll with its OpenConsole.exe keeps them. When
<exe dir>/conpty holds both, CreatePseudoConsole and ClosePseudoConsole come
from it; otherwise from kernel32 as before, so nothing changes for anyone who
does not add the folder.

Landed from @ggbdpq's verification on #5205. It's opt-in: without
<exe dir>\conpty\{conpty.dll,OpenConsole.exe}, both calls still come
from kernel32. The red/green evidence is the thread's: two Windows 10
machines (19044, 19045) with Terminal's ConPTY 1.24/1.25 passed 1 to
217 KB pastes intact, and lost them with conhost 10.0.19041.

Run on xiaomi-gpu (Windows 11, no conpty folder, so the kernel32 path):
go vet ./internal/claudetui ok, go build -tags nogui ok, go test
./internal/claudetui: every test passes except
TestShimFirstMessageWaitsForTools, which fails the same way at
origin/main d987cc7d5 (-count=2, "the shim wrote 0 lines of 3 in
30s") and is #4810.
Not tried: Windows 10, and the conpty folder on this machine. Shipping
the pair with magpie so Windows 10 users need no setup is left for a
later change.
2026-11-14 19:46:12 +08:00
..
…
…
…
…
…
…
…
…
…
…
…