Forum

Using AT with Claud...
 
Notifications
Clear all

Using AT with Claude Code AI gives wild screen I/O updates resullting in as many as six duplicate chunks in the scrollback buffer

1 Posts
1 Users
0 Reactions
3 Views
(@taa1)
Trusted Member
Joined: 12 years ago
Posts: 59
Topic starter  

In order to do some analysis on this, I did a "select all" of the scrollback buffer, copy-and-pasted into a text file. I then asked Claude Code AI to analyze the file. Claude generated the following. Due to privacy issues I'm not attaching the file, nor a normal raw File->Open LOG type capture in AT; these files have been sent to Brian Pence's private email address.

Absolute Telnet -- Scrollback Duplication on Copy/Paste
=======================================================


SUMMARY

When using "Select All" / "Copy" from the Absolute Telnet scrollback
buffer during an SSH session running Claude Code (Anthropic's CLI tool),
the captured text contains large blocks of duplicated content. The
duplicated blocks appear to be triggered by ANSI cursor-movement
sequences that Claude Code uses to update the display in-place
(collapsing tool output, updating progress indicators, etc.).


ENVIRONMENT

  SSH Client:          Absolute Telnet 13.16 RC21
  Remote Application:  Claude Code (Anthropic CLI), running over SSH
                       on a Raspberry Pi (Linux 6.12, bash)
  Session Type:        Interactive AI-assisted coding session,
                       approximately 3960 lines of captured output


OBSERVED BEHAVIOR

A copy-and-paste of the full SSH session scrollback contains 6 copies
of a 497-line block that should appear only once. The total captured
output is 3960 lines, but only approximately 1475 lines are unique
content. The remaining ~2485 lines are duplicates.


Block structure in the captured text:

  Block   Line Range    Repeated Base   Unique New Content
  -----   ----------    -------------   ------------------
    1       1-573        497 lines        76 lines
    2     574-1166       497 lines        96 lines
    3    1167-1864       497 lines       201 lines
    4    1865-2571       497 lines       210 lines
    5    2572-3272       497 lines       204 lines
    6    3273-3960       497 lines       191 lines

Each block starts with an identical copy of the same 497 lines
(verified byte-for-byte via diff), followed by a progressively larger
section of new, unique content representing the ongoing session output.


Boundary where duplication begins:

The first repetition starts at line 574. The boundary falls in the
middle of a unified diff display:

  Line 573:  7 -VERSION=26.074.19.34      <-- last "new" line before repeat
  Line 574:  7 +VERSION=26.074.19.50-1    <-- identical to line 1; repeat starts here

Line 574 is simultaneously the "plus" side of the diff AND a repeat of
line 1 of the entire session. This is the point where Claude Code would
have been updating the screen (collapsing a tool-output display after
an edit operation completed).


LIKELY CAUSE

Claude Code makes extensive use of ANSI escape sequences to update the
terminal display in-place:

  - Collapsing tool output: When a tool call finishes, multi-line
    verbose output is replaced with a single summary line (e.g., a
    file diff collapses into "Update(/dropbox-nix/tls.sh)")

  - Progress indicators: Status lines like "Cogitated for 35s" are
    updated in-place using cursor movement

  - Screen redraws: Replacing N lines of output with fewer lines
    requires cursor-up, erase-line, and rewrite sequences

The relevant ANSI sequences likely include:

  Sequence    Function
  --------    --------
  ESC[nA      Cursor up n lines
  ESC[nF      Cursor to beginning of line, n lines up
  ESC[2K      Erase entire line
  ESC[nJ      Erase display (below cursor, or entire)
  ESC[nG      Cursor to column n
  CR          Carriage return (overwrite from start of line)


HYPOTHESIS

When Claude Code sends cursor-movement sequences to collapse or redraw
content, Absolute Telnet appears to be appending the redrawn content to
the scrollback buffer as new lines rather than updating the existing
scrollback entries in-place. Each redraw event causes the visible screen
content (or a portion of it) to be duplicated into the scrollback.

When the user subsequently does "Select All" and copies from the
scrollback, these duplicated renders are all included in the copied
text.

Evidence supporting this hypothesis:

  1. The repeated base block is exactly 497 lines -- a plausible match
     for the visible terminal area plus some scrollback context that
     gets redrawn.

  2. Repetitions occur at points where Claude Code collapses tool
     output -- specifically, at diff displays being collapsed after
     edit operations complete.

  3. Each block contains the same base followed by growing amounts of
     new content -- consistent with periodic re-renders at different
     points in the session, each capturing the original scrollback
     plus whatever new output has been added since the last re-render.

  4. The base block is byte-for-byte identical across all 6 occurrences
     -- this is a verbatim copy, not a similar-but-different rendering.

  5. The string "Cogitated for 35s" appears 6 times (at lines 432,
     1005, 1598, 2296, 3003, 3704) -- once per block, always at the
     same offset within the repeated base section.


HOW TO REPRODUCE

  1. Open an SSH session in Absolute Telnet to a Linux host.
  2. Run Claude Code ("claude") and perform interactive tasks that
     involve tool calls (file edits, command execution) -- these
     trigger the collapse/expand behavior.
  3. Let the session run long enough that multiple tool-output collapse
     events occur.
  4. Use "Select All" / "Copy" to capture the scrollback.
  5. Paste into a text editor and search for content that should be
     unique -- it will appear multiple times.


EXPECTED VS. ACTUAL BEHAVIOR

  Expected: "Select All" / "Copy" from scrollback produces a linear
            transcript of the session with each line appearing once.

  Actual:   Scrollback contains multiple copies of earlier content,
            inserted at points where the remote application used
            cursor-movement sequences to update the display.


COMPARISON

This issue does not occur when copying the same session output from
other terminal emulators (e.g., the native terminal on the host
machine), suggesting the issue is specific to how Absolute Telnet
handles cursor-movement sequences in its scrollback buffer.

 


   
Quote
Share: