anthropics / anthropics/claude-code

[FEATURE] Don't truncate long diff lines (2000-char cap hides edits in long paragraphs)

Open
#95,541 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area:tui enhancement platform:linux
Dominant language
TypeScript
Stars
146k
Forks
23.8k
PR merge metrics
PR metrics pending

Description

Preflight Checklist
  • I have searched existing requests and this feature hasn't been requested yet
  • This is a single feature request (not multiple features)
Problem Statement

Diff lines longer than 2000 characters are cut off and shown as … [+N chars] (Edit/Write diffs in the transcript and permission prompts). Noticed after updating to 2.1.276.

In Markdown and similar files, a whole paragraph is often one long line. If Claude changes a word past char 2000, the diff shows no visible change. I can't properly review or approve the edit then.

Unless I'm missing something, there's no setting or env var to change this.

Proposed Solution

Either:

  • a setting to disable or raise the limit, or
  • truncation that always keeps the changed region of a line visible (show context around the word-diff instead of cutting at a fixed offset).
Alternative Solutions

No response

Priority

Medium - Would be very helpful

Feature Category

Interactive mode (TUI)

Use Case Example
  1. I have a .md file with a paragraph that's a single ~3000-char line.
  2. I ask Claude to reword a sentence near the end of it.
  3. The Edit diff shows the line cut off with … [+N chars]; the actual change is invisible.
  4. With the change, I'd see and verify the edit directly in the diff.
Additional Context

Claude Code 2.1.276, Debian 12, kitty.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files or tests are named. Start by tracing the Edit/Write diff rendering used in transcript output and permission prompts, then reproduce the behavior with a Markdown line longer than 2000 characters and a change near its end. Done means the changed region remains visible, either through configurable or context-aware truncation, with coverage for the long-line case.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
cli
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.