[Bug] Incomplete text copying from terminal output on Linux when selecting upward

Status Open
Reported on v2.1.263
Maintainer reply None cached
Activity 3 comments · opened Sep 7, 2026

Bug Description
Copy / Paste is sometimes incomplete. On my Linux Mint system I run Claude Code in a terminal. I entered "generate the text for my next prompt" which creates a lengthy block of text. I select all of it with the mouse starting from the bottom and dragging to the top of the generated text. I then /clear the session and enter CTRL-V to paste the new prompt but sometimes some of the text (a few words at the end of the line) is missing. I have made two screenshots where the problem is clearly visible, hopefully I can add them to this ticket somehow. The problem occurs only occasionally but when it occurs then it is reproduceable by /resume the session, make the selection again, /clear the session, pasting whatever is in the buffer.

See the attached screenshots. One is the text that I have copied in the old session, the other is what I have pasted in the new session. Look for the strings "which tests were red", "make check is" and "asserts the msgid" at the bottom of both screenshots. You see that in the pasted session the text is partially truncated.

Environment Info

  • Platform: linux
  • Terminal: gnome-terminal
  • Version: 2.1.263
  • Feedback ID: f53ab978-28bd-4c32-8a74-f1a0fa1090c7

Errors

[]

<img width="1294" height="850" alt="Image" src="https://github.com/user-attachments/assets/c52d2b24-e3b9-469c-8341-21cb3efc6413" />
<img width="1294" height="850" alt="Image" src="https://github.com/user-attachments/assets/9cf1b695-9147-4a6c-b270-9b36afcc9928" />

View original on GitHub ↗

3 Comments

schirmacher · 6 days ago

it seems to happen at the same character position in all truncations.

schirmacher · 6 days ago

The truncation happens at copy time, not paste time. Here is the text of the buffer itself:

Start the test session of the disposition of the review of plan 006a-2 (issue #171).

Read first: CLAUDE.md, PROCESS.md §5 and §6.4, ADR-046, ADR-106, and the
Disposition section at the end of docs/reviews/006a-2-the-search-and-the-screen.md,
in particular "What the two sessions after this one owe". Then read spec 006 §8.2,
§14.2 criteria 12a, 14a, 16a, 17 and 17a, §18 and §19.1 as amended on 2026-09-07.

Create the branch: git fetch origin main && git switch -c slice/006a-2-disposition-tests origin/main

This session writes tests and fixtures only. It writes no code under src/ and no
code under web/src other than test files. Do not make a red test green.

Write, in one commit:

  1. Criterion 12a: a body with a question of 1 001 characters in the table of refused

bodies of tests/integration/test_baurecht_query_api.py, and a body of 1 000
characters that is accepted. A test in web/src/screens/BaurechtScreen.test.tsx that
the question input carries maxLength 1000. Red.

  1. Criterion 16a: the id "²" in the 404 test of the chunk endpoint. Red.
  2. Criterion 17 and ADR-106: two chunks "§ 40 Abs. 1 bis 2 TestG" and

"§ 40 Abs. 3 bis 4 TestG" in the fixture of the integration module; one test that
the question "§ 40 TestG" puts both chunks first in that order and that the limit
counts them; one test that "§ 40 Abs. 3 TestG" puts the second chunk first. A unit
test in tests/unit/test_baurecht_search.py for the pure choice among Fundstelle
strings, in the shape ADR-106 points 2 and 3 give; name the function the domain
will export and record the name in the plan. Red.

  1. Criterion 14a: a long chunk with one occurrence of a word written before a short

chunk with one occurrence, and the short chunk comes first. Red, because the
shipped rank ties them and the id order puts the long one first.

  1. Criterion 17a: one open chunk of source type MVV_TB with bundesland "NW", and "NW"

is not in the coverage. Expected green.

  1. Spec §18: the screen test asserts the msgid baurecht.screen.blurb under the name

and no a.lbo-agent.blurb; a card test in CatalogueScreen.test.tsx asserts that the
LBO-Agent and the LV check carry no "Geplant" badge and every other agent does
(issue #151); the passage test asserts that "Read the whole passage" shows the whole
text and sends no request. Red.

  1. EXPECTED_TEST_COUNTS in tests/harness/test_gate_coverage.py.

Run each new test and record in docs/plans/006a-2-the-search-and-the-screen.md,
under "What changed during execution", which tests were red at t
for which reason, with the spec clause each one holds.

Commit with the message "test: the tests of the disposition of the review of
plan 006a-2 (#171)". Do not push. End with /log. make check is r
this session, and that is correct.

schirmacher · 6 days ago

After resizing the terminal window and selecting the text again, the text was complete.