Skip to content

TUI: a Kitty graphics delete sequence (Ga=d,d=I,...) leaked into the prompt input as typed text #4352

Open

Description

@code-yeongyu

Summary

A user's omo terminal session showed the literal text Ga=d,d=I,i=1578415760,q=2 in the prompt input right after a turn finished. That is the body of a Kitty graphics-protocol APC: a delete-image command (a=d,d=I, image id, q=2 quiet), with its ESC _ / ESC \ framing gone. So an image-cleanup sequence ended up as typed input instead of being consumed by the terminal or classified as a terminal report.

Credit: 누워있는 죠르디 (OmO KakaoTalk room). The screenshot is kept privately. The terminal app and version are requested.

Likely mechanism (hypothesis, to verify)

  • Split read: the APC arrives split across stdin reads (or with its ESC eaten by the key parser), so isTerminalReport doesn't classify it, and the remaining printable bytes reach the editor as text.
  • Echo: a terminal (or multiplexer) without Kitty graphics support echoes or forwards the unknown APC back to the app's input.
  • Related: herdr Kitty graphics probe follow-ups: late-reply latch, public latch API, non-graphics outer terminal #3712 notes a late probe reply 'falls through to the input listeners (harmless today: isTerminalReport classifies APC as a report and the editor ignores ESC-initiated input)'. This report shows a case where that protection did not hold.

Expected (ideal state)

  • No terminal-protocol bytes (APC/DCS/OSC/CSI replies or echoes) ever reach the prompt input, whether split across reads, with lost framing, or late.
  • The input layer reassembles escape sequences across read boundaries with a bounded buffer and timeout, and drops recognised protocol bodies.
  • On a terminal without graphics support, the app doesn't send image delete or cleanup commands at all.

Acceptance

  • A test feeds the APC split at every byte boundary (and with the ESC delivered separately) into the input parser and asserts nothing reaches the editor.
  • A test asserts image cleanup is not emitted when the graphics protocol is not detected.
  • The reporter's terminal is identified, and the case is reproduced or explained.

Related: #3712, #3698.

Activity

  1. code-yeongyu commented on Oct 26, 2026

    @code-yeongyu
    OwnerAuthor

    Reporter follow-up: omo 5.1.43 running inside herdr 0.9.4, and it keeps happening, not just once. That points at the herdr path, the subject of #3698 (inline images inside herdr) and #3712 (herdr Kitty graphics probe follow-ups, including LOW-3: an unverified non-graphics outer terminal behind herdr). Likely: senpi detects or probes Kitty graphics as available inside herdr and emits image delete APCs, but this herdr version (or its outer terminal) doesn't consume them and returns the body as input.

    Two things to fix:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    source:kakaoReported in the OmO KakaoTalk room

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions