Chapin2018's message of nineteen images between words (the issue's
script, Claude Code 2.1.319, claude-fable-5-1) ended the interactive
helper "after 13s (exit status 1)" and the client got a 502, while -p
answered. The cause is how the helper saw a paste taken. It looked for
"[Image #N]" and "[Pasted text #N" only in what Claude Code drew after
the paste. Once the prompt runs past a row, Claude Code draws it again
only where it changed and moves the cursor past cells that are already
right. After the 33rd piece the drawing held "\r\x1b[16C\x1b[1B3": one
digit of "[Image #33]". The helper waited out pasteWait (10s) and ended.
Text marks came out in part too ("[Pasted t xt #16"), so several word
pieces each sat out their own 10s before that. There is no limit in
Claude Code's TUI: the same paste is on its screen whole, so no -p
fallback is needed.
Each check now also reads the prompt as the 200x50 screen grid shows
it: the rows between its last two rules, words one space apart (a mark
can wrap onto the next row). The mark that ends it counts (lastMark),
an image's [Image #N] or a whole [Pasted text #N +k lines], numbered
past the piece before, and so do words the prompt ends with. The
stream check stays first.
Run:
- Real, macOS arm64, this Mac, sandbox HOME and CLAUDE_CONFIG_DIR
(token by env, nothing rotated, DISABLE_AUTOUPDATER=1), the issue's
script unchanged, --images 19, Claude Code 2.1.319:
- origin/main a46190e1f: exit 1 after ~32s, stderr as reported.
2.1.316 failed the same way. -p: success, 5.8s.
- This change: exit 0 in 5.3 to 12.1s on 5 runs, subtype success.
The transcript's user row has all 19 image blocks and the words in
order, and the model answered. The script's answer_ok stays false
because the helper's result line has no "result" text (-p's does).
The gateway reads the assistant events, not that field.
- TestShimSeesPastesOnAPromptDrawnInPart feeds the real run's bytes
(testdata/paste-images-2.1.319.bin, folder name replaced at the same
length). Each of the 33 pastes must be seen taken.
- Broken by hand: drop the prompt checks from imageTaken and textTaken
and it goes red on text 12, text 22 and image 33, the pieces whose
marks were drawn in part.
- WSL magpie-desktop (Ubuntu 24.04 amd64, go1.26.8), because mote is
down:
- gofmt -l . is clean.
- go vet -tags nogui ./... and GOOS=windows go vet ./... pass. Plain
vet there lacks gtk4 headers.
- go test ./internal/claudetui/ is ok (120s).
- The darwin build used for the real runs above.
Not tried: Linux arm64 (the reporter's system) with a real account, the
gateway's /v1/messages path end to end with 19 images, and the full
suite (not run at push).
Refs #5654: kept open for the reporter to confirm.
Reported-by: Chapin2018
1 line
10 KiB
Plaintext
1 line
10 KiB
Plaintext
7[r8[?25h[?2004h[?2031h[?1004h[<u[>5u[>4;2m]0;✳ Claude Code\[?1049h[2J[H[<u[>5u[>4;2m[?1000h[?1002h[?1003h[?1006h[?25l[?25l[?2026h[H
|
||
[1B[38;2;215;119;87m ▐[48;2;0;0;0m▛███▛█[12G[39m[49m[1mClaude Code[24G[22m[38;2;153;153;153mv2.1.319
|
||
[1B[38;2;215;119;87m▝▜[48;2;0;0;0m█████[49m█▀[12G[38;2;153;153;153mFable 5.1 · Claude API
|
||
[1B[38;2;215;119;87m ▝▝ ▝▝ [12G[38;2;153;153;153m/home/user/wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww/work
|
||
[182C[42B● high · /effort
|
||
[1B[38;2;136;136;136m────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
|
||
[1B[39m❯ [2mTry "fix lint errors"
|
||
[1B[22m[38;2;136;136;136m────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
|
||
[2C[1B[38;2;153;153;153m⏸ manual mode on · ? for shortcuts · ← for agents[39m[50;1H[48;3H[?25h[?2026l[>0q[?u]7501;?\[c[?2026h[?25l[H
|
||
[177C[43B[38;2;153;153;153mctrl+g to edit in Vim
|
||
[1B[38;2;136;136;136m────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
|
||
[1B[39m❯ Synthetic[13Gimage[19G1.[183G[K
|
||
[1B[K
|
||
[1B[K
|
||
[18C[2B[K[50;1H[48;3H[?25h[?2026l[?2026h[?25l[H
|
||
[2C[49B[38;2;153;153;153mPasting…[39m[K[50;1H[48;3H[?25h[?2026l[?2026h[?25l[H
|
||
[2C[47B[Image[10G#1]
|
||
[2C[2B[38;2;153;153;153m⏸ manual mode on[39m[50;1H[48;13H[?25h[?2026l[?2026h[?25l[H
|
||
[12C[47B[Pasted[21Gtext[26G#2[29G+4[32Glines]
|
||
[2C[2B[38;2;153;153;153mpaste [10Ggain to expand[39m[50;1H[48;38H[?25h[?2026l[?2026h[?25l[H
|
||
[37C[47B[Image[45G#3]
|
||
[2C[2B[38;2;153;153;153mP[7Ging…[39m[K[50;1H[48;48H[?25h[?2026l[?2026h[?25l[H
|
||
[47C[47B[Pasted[56Gtext[61G#4[64G+4[67Glines]
|
||
[2C[2B[38;2;153;153;153mp[7Ge again to expand[39m[50;1H[48;73H[?25h[?2026l[?2026h[?25l[H
|
||
[72C[47B[Image[80G#5][50;1H[48;83H[?25h[?2026l[?2026h[?25l[H
|
||
[82C[47B[Pasted[91Gtext[96G#6[99G+4[102Glines][50;1H[48;108H[?25h[?2026l[?2026h[?25l[H
|
||
[107C[47B[Image[115G#7][50;1H[48;118H[?25h[?2026l[?2026h[?25l[H
|
||
[117C[47B[Pasted[126Gtext[131G#8[134G+4[137Glines][50;1H[48;143H[?25h[?2026l[?2026h[?25l[H
|
||
[142C[47B[Image[150G#9][50;1H[48;153H[?25h[?2026l[?2026h[?25l[H
|
||
[152C[47B[Pasted[161Gtext[166G#10[170G+4[173Glines][50;1H[48;179H[?25h[?2026l[?2026h[?25l[H
|
||
[178C[47B[Image[186G#11][50;1H[48;190H[?25h[?2026l[?2026h[?25l[H
|
||
[177C[42B[38;2;153;153;153mctrl+g to edit in Vim
|
||
[1B[38;2;136;136;136m────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
|
||
[1B[39m❯ Synthetic image 1.[K
|
||
[1B[K
|
||
[2C[1B[Image[10G#1][Pasted[21Gtext[26G#2[29G+4[32Glines][Image[45G#3][Pasted[56Gtext[61G#4[64G+4[67Glines][Image[80G#5][Pasted[91Gtext[96G#6[99G+4[102Glines][Image[115G#7][Pasted[126Gtext[131G#8[134G+4[137Glines][Image[150G#9][Pasted[161Gtext[166G#10[170G+4[173Glines][Image[186G#11][Pasted
|
||
[2C[1Btext #12 +4 lin[19Gs][K[50;1H[48;21H[?25h[?2026l[?2026h[?25l[H
|
||
[177C[42B [38;2;153;153;153m●[185Ghigh · /effort[39m[50;1H[48;21H[?25h[?2026l[?2026h[?25l[H
|
||
[2C[49B[38;2;153;153;153m⏸ manu[10Gl mode on[39m[K[50;1H[48;21H[?25h[?2026l(B[?2004h[<u[>5u[>4;2m[?1000h[?1002h[?1003h[?1006h[?2026h[?25l[H
|
||
[20C[47B[Image[28G#13][50;1H[48;32H[?25h[?2026l[?2026h[?25l[H
|
||
[31C[47B[Pasted[40Gtext[45G#14[49G+4[52Glines]
|
||
[2C[2B[38;2;153;153;153mpaste [10Ggain to expand[39m[50;1H[48;58H[?25h[?2026l[?2026h[?25l[H
|
||
[57C[47B[Image[65G#15][50;1H[48;69H[?25h[?2026l[?2026h[?25l[H
|
||
[68C[47B[Pasted[77Gtext[82G#16[86G+4[89Glines][50;1H[48;95H[?25h[?2026l[?2026h[?25l[H
|
||
[94C[47B[Image[102G#17][50;1H[48;106H[?25h[?2026l[?2026h[?25l[H
|
||
[105C[47B[Pasted[114Gtext[119G#18[123G+4[126Glines][50;1H[48;132H[?25h[?2026l[?2026h[?25l[H
|
||
[131C[47B[Image[139G#19][50;1H[48;143H[?25h[?2026l[?2026h[?25l[H
|
||
[142C[47B[Pasted[151Gtext[156G#20[160G+4[163Glines][50;1H[48;169H[?25h[?2026l[?2026h[?25l[H
|
||
[168C[47B[Image[176G#21][50;1H[48;180H[?25h[?2026l[?2026h[?25l[H
|
||
[182C[41B[38;2;153;153;153m● high · /effort
|
||
[1B[38;2;136;136;136m────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
|
||
[1B[39m❯ Synthetic image 1.[K
|
||
[1B[K
|
||
[2C[1B[Image[10G#1][Pasted[21Gtext[26G#2[29G+4[32Glines][Image[45G#3][Pasted[56Gtext[61G#4[64G+4[67Glines][Image[80G#5][Pasted[91Gtext[96G#6[99G+4[102Glines][Image[115G#7][Pasted[126Gtext[131G#8[134G+4[137Glines][Image[150G#9][Pasted[161Gtext[166G#10[170G+4[173Glines][Image[186G#11][Pasted
|
||
[2C[1Btext #12 +4 lin[19Gs][Image #13][Pasted text[46G14 +4 lines][Image #15][Pasted t[79Gxt #16 +4 lin[93Gs][Image[102G#17][Pasted text #18 +4[126Glines][Image #19[144GPast[149Gd text #20 +4 lines][Image #21][P[183Gsted text #22 +4
|
||
[2C[1Blines][K[50;1H[48;9H[?25h[?2026l[?2026h[?25l[H
|
||
[182C[41B[K[50;1H[48;9H[?25h[?2026l[?2026h[?25l[H
|
||
[2C[49B[38;2;153;153;153m⏸ manu[10Gl mode on[39m[K[50;1H[48;9H[?25h[?2026l(B[?2004h[<u[>5u[>4;2m[?1000h[?1002h[?1003h[?1006h[?2026h[?25l[H
|
||
[8C[47B[Image[16G#23][50;1H[48;20H[?25h[?2026l[?2026h[?25l[H
|
||
[19C[47B[Pasted[28Gtext[33G#24[37G+4[40Glines]
|
||
[2C[2B[38;2;153;153;153mpaste [10Ggain to expand[39m[50;1H[48;46H[?25h[?2026l[?2026h[?25l[H
|
||
[45C[47B[Image[53G#25]
|
||
[2C[2B[38;2;153;153;153mP[7Ging…[39m[K[50;1H[48;57H[?25h[?2026l[?2026h[?25l[H
|
||
[56C[47B[Pasted[65Gtext[70G#26[74G+4[77Glines]
|
||
[2C[2B[38;2;153;153;153mp[7Ge again to expand[39m[50;1H[48;83H[?25h[?2026l[?2026h[?25l[H
|
||
[82C[47B[Image[90G#27][50;1H[48;94H[?25h[?2026l[?2026h[?25l[H
|
||
[93C[47B[Pasted[102Gtext[107G#28[111G+4[114Glines][50;1H[48;120H[?25h[?2026l[?2026h[?25l[H
|
||
[119C[47B[Image[127G#29][50;1H[48;131H[?25h[?2026l[?2026h[?25l[H
|
||
[130C[47B[Pasted[139Gtext[144G#30[148G+4[151Glines][50;1H[48;157H[?25h[?2026l[?2026h[?25l[H
|
||
[156C[47B[Image[164G#31][50;1H[48;168H[?25h[?2026l[?2026h[?25l[H
|
||
[167C[47B[Pasted[176Gtext[181G#32[185G+4[188Glines][50;1H[48;194H[?25h[?2026l[?2026h[?25l[H
|
||
[41B[38;2;136;136;136m────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
|
||
[1B[39m❯ Synthetic image 1.[K
|
||
[1B[K
|
||
[2C[1B[Image[10G#1][Pasted[21Gtext[26G#2[29G+4[32Glines][Image[45G#3][Pasted[56Gtext[61G#4[64G+4[67Glines][Image[80G#5][Pasted[91Gtext[96G#6[99G+4[102Glines][Image[115G#7][Pasted[126Gtext[131G#8[134G+4[137Glines][Image[150G#9][Pasted[161Gtext[166G#10[170G+4[173Glines][Image[186G#11][Pasted
|
||
[2C[1Btext #12 +4 lin[19Gs][Image #13][Pasted text[46G14 +4 lines][Image #15][Pasted t[79Gxt #16 +4 lin[93Gs][Image[102G#17][Pasted text #18 +4[126Glines][Image #19[144GPast[149Gd text #20 +4 lines][Image #21][P[183Gsted text #22 +4
|
||
[2C[1Blines][Image #23][Pasted[28Gtext #24 +4[40Glines][Image #25][Pasted[65Gtext #26 +4[77Glines][Image #27][Pasted[102Gtext #28 +4[114Glines][Image #29][Pasted[139Gtext #30 +4[151Glines][Image #31][Pasted[176Gtext #32 +4[188G[K
|
||
[16C[1B3[20G[K[50;1H[48;20H[?25h[?2026l[?2026h[?25l[H
|
||
[2C[49B[38;2;153;153;153m⏸ manu[10Gl mode on[39m[K[50;1H[48;20H[?25h[?2026l |