Skip to content

Add Kitty remote-control (kitty @) terminal backend to core/computer_use_linux/terminals.py #40

Backlog

Description

@m3lonxd

Context / Motivation

LinuxDesktop._TERMINAL_APPS already recognizes kitty alongside konsole and tmux for paste-shortcut handling, and core/computer_use_linux/terminals.py provides a clean provider interface (list_terminals, read, send, history_supported) used by the CLI (terms, term-read, term-send), MCP (cul_terminals, cul_terminal_read, cul_terminal_send), and HTTP adapters.

Right now on Linux, terminals.py only inspects Konsole (D-Bus) and tmux panes. Supporting Kitty's remote control CLI (kitty @) lets AI agents list, read, and drive open Kitty windows/tabs whenever remote control is enabled, without switching terminals.

Relevant Code

  • core/computer_use_linux/terminals.py:79-103 (_konsole_list), 107-129 (_tmux, tmux_list), 132-195 (list_terminals, _parse, history_supported, read, send)
  • core/computer_use_linux/platforms/base.py:59-70 (Terminal dataclass)
  • core/computer_use_linux/platforms/linux.py:458-459 (_TERMINAL_APPS includes "kitty"), 611-626 (LinuxDesktop.terminals, terminal_read, terminal_send, terminal_history_supported)
  • tests/test_terminals_logic.py:10-23 (TestTerminalsLogic)

Acceptance Criteria

  • Add Kitty discovery in core/computer_use_linux/terminals.py using kitty @ ls (returning [] cleanly when kitty is missing or remote control is disabled), producing Terminal entries with a kitty:... ref, foreground program, cwd, title, and pid.
  • Extend _parse(), history_supported(), read(), and send() in core/computer_use_linux/terminals.py to support kitty:... refs via kitty @ get-text (with scrollback support when history > 0) and kitty @ send-text / key encoding via term_payload().
  • Add offline unit tests in tests/test_terminals_logic.py with mocked subprocess JSON/text responses covering ref parsing, listing, reading, and sending.

Getting Started / How to Verify

env -u DISPLAY -u WAYLAND_DISPLAY -u DBUS_SESSION_BUS_ADDRESS python3 tests/test_terminals_logic.py
env -u DISPLAY -u WAYLAND_DISPLAY -u DBUS_SESSION_BUS_ADDRESS python3 tests/test_smoke.py

Activity

  1. added
    enhancement
    help wanted
    on Nov 30, 2026
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

    enhancementhelp wanted

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions