[BUG] Long prompt silently truncated from the start on macOS/Warp: 762 of 2,211 characters delivered, cut mid-word

Status Open
Reported on v2.1.251
Maintainer reply None cached
Activity 3 comments · opened Aug 31, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

A long prompt reached Claude Code with the first 1,449 characters silently removed. Only the final 762 characters were delivered. No warning, no error, and no visual indication that anything had been dropped.

The cut fell mid-word, inside the word "for", so the message Claude received began:

r company. 10k for numbers and 3k for expenses.

The original text at that point read "...1% for salesman and 7% for company. 10k for numbers...".

Because the surviving fragment read as coherent prose, neither I nor the model could tell from the text alone that two thirds of the message was missing. The model acted on the fragment as though it were the whole instruction.

Two things distinguish this from the existing paste-truncation reports (#49673, #49337, #51129, #49869), which are all Windows and all clipboard pastes:

  1. This is macOS, in Warp. No existing report covers that combination.
  2. The lost portion was TYPED, not pasted. The prompt was composed in Warp's expanded input editor for CLI agents (opened with Ctrl-G). Roughly the first two thirds were typed by hand; the last third had been pasted in from a notes file. The truncation removed the typed portion and left the pasted portion intact. That suggests the fault is in how Claude Code consumes a large input burst arriving from the terminal, regardless of whether that burst originated as a clipboard paste.

What Should Happen?

The full prompt should reach Claude Code exactly as composed.

Failing that, the truncation should not be silent. Either would be enough to make it survivable:

  • Restore the "[Pasted text #N +X lines]" placeholder behavior described in #49337, which preserved the full content rather than discarding part of it.
  • Or emit a visible warning when the input actually received is shorter than the input event that produced it, so the user knows to re-send before the model acts on a fragment.

Error Messages/Logs

There is no error message. That is the core of the problem: the failure is entirely silent.

What can be shown is that the loss happens BEFORE Claude Code records the input. I verified this rather than assuming it:

- Session transcript, ~/.claude/projects/<encoded-path>/<session-id>.jsonl: the user message is recorded as 762 characters.
- ~/.claude/history.jsonl: the same entry is recorded as 762 characters.

Both hold the already-truncated text, so the input was already short when Claude Code wrote it down.

I also confirmed the source text was intact by reading it back from the macOS clipboard: 2,211 characters, complete. So nothing was lost in the copy, and nothing in Claude Code's own records holds the missing 1,449 characters.

Steps to Reproduce

  1. Run Claude Code in Warp on macOS, with Warp's composer for CLI agents enabled (auto_open_composer_on_cli_agent_start = true in ~/.warp/settings.toml).
  2. Compose a prompt of roughly 2,000 or more characters across several paragraphs. Type most of it by hand in the composer; paste the remainder in from another file.
  3. Submit it.
  4. Ask Claude to repeat the prompt back verbatim, or inspect the last entry in ~/.claude/history.jsonl, and compare the character count against the source text.
  5. Observe that the opening of the prompt is missing and that nothing indicated this.

Intermittent. The same terminal and the same method sometimes deliver the full text. On 2026-08-26 it hit at least 5 of 14 prompts in a single working day.

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.1.251 (Claude Code)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Warp

Additional Information

Environment detail:

  • macOS 26.6.2 (build 25G83), arm64
  • Warp 0.2026.08.26.17.59.01
  • zsh
  • Node v20.20.2
  • Warp setting in effect at the time: auto_open_composer_on_cli_agent_start = true

Frequency: not a one-off. On 2026-08-26, at least 5 of 14 prompts in one working day arrived clipped the same way, each beginning mid-word. Two harmless examples of what survived: "om our experience..." where the original began "from our experience...", and "m open for a call to discuss this." where the original was a multi-paragraph message. That second one was acted on as if complete, precisely because the fragment happened to be a grammatical sentence.

Why silent truncation of the START is worse than the end: the opening of a prompt is where the task, the constraints and the context sit. What survives is trailing detail, which reads as a complete instruction stripped of its purpose. Neither the user nor the model can detect it.

Related:

  • #49673, #49337, #51129, #49869, #13328, #14771, #66192 (paste truncation, all Windows)
  • warpdotdev/warp#9365 (Warp-side rendering fault with Claude Code on macOS; a different bug, but the same pairing)

View original on GitHub ↗

3 Comments

yhattav · 1 month ago

Independent confirmation with a mechanism narrowed down, from a machine that hits this at scale. No message content included (internal), but the structure is fully characterized.

Mechanism observed: when a large text block is delivered into the composer — a human Cmd+V through a terminal, or automated typing (tmux send-keys from an agent-orchestration tool) — it arrives at the TUI in ~1KB chunks. The composer folds the first chunk into a [Pasted text #1 +N lines] attachment and appends the later chunks inline after the placeholder. Intermittently the attachment's content is dropped at submit, so the model receives only the inline tail — a prompt silently truncated from the start, cut mid-word, exactly as this issue describes.

Key evidence:

  • Deterministic cut point per payload. A 1270-byte plain-UTF-8 text (no control characters) cuts at byte 1022 every time it cuts — the chunk boundary is fixed for fixed content. The visible composer state right before a failing submit shows [Pasted text #1 +8 lines] followed by the inline tail.
  • Intermittent, ~2/3 for that payload. Re-pasting the identical clipboard sometimes goes through whole (attachment expands correctly), sometimes tail-only.
  • Receiver-side, not transport. Same clipboard pasted into another app is always intact; OS pasteboard round-trips are 100/100 clean. On this machine, automated cross-session messages arriving at Claude Code panes land tail-only in 38% of observed arrivals (n=361 over 5 days) vs 7% on Codex CLI panes receiving comparable traffic (n=30) — the delta points at the paste-folding path, not the pipe.
  • Likely the same defect as the paste-truncation half of #86954.

Env: Claude Code 2.1.258, macOS 26.4, tmux 3.6a panes managed by an orchestration app (dev-3.0), ~25 concurrent sessions (load appears to amplify the failure rate). Happy to run diagnostics on request — this machine reproduces it daily.

sjswerdloff · 1 month ago

same here. just updated from 2.1.220 and all heck broke loose.
The following from one of my Claude agents:

Independent reproduction on a second fleet, with two controls I have not seen posted here: the
transport is clean, and the version boundary is pinned by binary size rather than --version.

Environment: macOS, tmux 3.6a, ~10 concurrent Claude Code sessions in tmux panes, each receiving
messages injected by an external process via tmux send-keys. Symptom is exactly as described —
head silently dropped, contiguous tail retained, no error anywhere.

1. The bytes reach the pane intact. The loss is above the PTY.

A raw-mode PTY reader on the affected machine, fed through the identical tmux send-keys path
used for real deliveries, with a 3000-byte payload:

captured 3003 / 3000 bytes — starts ETE.

The same 3000 bytes delivered to a live Claude Code session on that machine arrived as its final
~36 bytes. Six further trials with t0–1.10 s apart) also captured both
bodies intact at the PTY, with no interleaving.

So tmux, the PTY, and the sending path are all exonerated on the machine that fails. Whatever
discards the prefix is in the application reading the pane.

2. Version boundary, pinned by size match against the npm cache

claude --version reports the installed binary, not the image a running process — this
misled three of our sessions into reporting themselves as a newer version than they were running.
We matched each running process's mapped executable by inode and size instead:

2.1.220   256,908,272   never truncates   (verified against npm cache tarball)
2.1.227   285,046,400   never truncates   (independently measured on a second host)
2.1.252   197,220,928   truncates

Same host, same delivery path, same byte-identical payload across all three. Two sessions on 2.1.252
truncate; three sessions on 2.1.220/2.1.227 did not, across 68+ multi-KB messages.

Caveat, stated because it matters: given the ~38% intermittency already reported here, a clean
run of N is weak individually — 3 clean arrivals has a ~24% chance of occurring on an affected
build. The boundary rests on the consistency across three receivers, not on any one of them.

3. The cut offset is deterministic given the same input

Three arrivals of one byte-identical 3000-byte payload, two senders, two hosts, all cut at the
identical token. On a 999-byte payload (1138 bytes once JSON-enveloped) the surviving tail was 116
bytes — 1138 mod 1022 = 116, exact. One of the agents predicted the surviving token of an
unsent probe in advance; it landed one byte off.

So: the cut LOCATION looks deterministic in the input length, while WHETHER it cuts is
intermittent
— consistent with a fixed-size read boundary plus a race on the placeholder.

4. Why this is data loss rather than a display bug

The tail alone frequently reads as a complete short message. We caught it only because breaks landed
mid-word. In one case the discarded head contained the answer to a safety question that had been
asked, and the recipient would have proceeded without it had the break fallen one sentence later.

Workaround

We stopped injecting bodies entirely: the sender now writes the message to a file and injects only a
short fixed-length pointer, well undee-line fold threshold. That is
reliable across all versions tested.

Note for anyone applying that threshold: the rule is 800 characters OR more than three lines, and
the line arm fires far earlier in practice. Across 151 of our machine-generated payloads: zero
exceeded 800 bytes; 151 of 151 exceeded three lines
, minimum 17. A byte-only guard clears the
commonest case.

sergeiwallace · 6 days ago

A related case is now filed as https://github.com/anthropics/claude-code/issues/100955. On Claude Code 2.1.283, about 800 characters of text the author typed vanished from the middle of an 11,265-character prompt before submit, far below the 50,000-character cap. Claude Code's own prompt history, paste cache and session transcript all agree byte for byte on the damaged text, so the loss happened inside the composer before anything was written, and no local copy survives to recover it from.