Kat800
A terminal multiplexer built for AI agent workflows. Run multiple agents side-by-side, orchestrate pipelines, and manage sessions — all from one terminal window on Linux Mint.
Quick Start
# Install via apt (Linux Mint / Ubuntu)
sudo apt install kat800
# Or build from source
git clone https://github.com/Hyperquader-Coders/kat800
cd kat800 && make install
# Start a new session
kat800 new -s agents Features
Named sessions
Create and name sessions for different agent workflows. Switch instantly without losing context.
Pane layouts
Split your terminal into panes — one for the agent, one for logs, one for your shell.
Agent-aware status bar
The status bar surfaces running agents, their state, and resource usage at a glance.
Persistent state
Sessions survive disconnects. Your agents keep running while you're away.
KatKlips integration
Pipe any pane output directly into KatKlips bookmarks or notes with a single keybind.
Scriptable via DBus
Control Kat800 sessions from external scripts and other Amber Linux services.
Under the Hood: PTY, VTE & the Escape Sequence Maze
Building a terminal multiplexer means confronting forty years of accumulated chaos in how terminals talk to programs. Here is an honest account of what Kat800 deals with under the surface.
/dev/pts/N tty.The pseudo-terminal
A PTY (pseudo-terminal) is a kernel mechanism that creates a pair of file descriptors —
master and slave — that together behave exactly like a
real hardware serial terminal. The slave end looks like a standard tty device
(/dev/pts/N) to any process that opens it. The master end is what Kat800
reads from and writes to.
Sitting between the two is the kernel's line discipline: the software
layer handling input echoing, line buffering, and control character translation. When you
press Ctrl+C, the line discipline sends SIGINT to the foreground
process group on the slave — Kat800 never sees it. To the child process, Kat800 is
completely invisible; it sees only a standard tty at the other end of a pipe.
VTE — the rendering engine
Kat800 uses libvte — GNOME's Virtual Terminal Emulator library — to render pane output to screen. VTE implements the full VT220 / xterm state machine: it parses byte streams from each master fd, interprets escape sequences, maintains cursor position and colour attributes, manages the alternate screen buffer used by vim and htop, and renders to a GTK drawing surface.
Using libvte means Kat800 inherits a decade of compatibility work: wide characters, combining characters, 24-bit colour, bracketed paste, mouse tracking, and the Kitty keyboard protocol are all handled by VTE rather than reimplemented from scratch.
The escape sequence problem — a brief history
Every byte a program sends to the terminal is either printable text or a control sequence — how programs move the cursor, set colour, clear the screen. The problem: there has never been a single agreed standard for what those byte sequences should be. What exists instead is fifty years of layered archaeology.
0x1B) is standardised as a "control extender" in
ASCII. Its use for terminal control is undefined — it simply means "escape from normal
character interpretation." The seeds of thirty years of incompatibility are planted.
ESC A
(cursor up), ESC B (cursor down), ESC J (erase to end of
screen). Simple, proprietary, and with no room for parameters or extensibility.
ESC [,
CSI) — a two-byte prefix followed by variable parameters and a final command byte.
ESC [2J clears the screen. ESC [32m sets foreground green.
This parametric structure is used by every terminal emulator alive today, including
Kat800 and the applications running inside it.
$TERM environment variable selects the active entry. A pragmatic solution
that acknowledged the chaos rather than resolving it — and which every terminal
multiplexer including Kat800 still depends on.
ESC OP in xterm and ESC [11~ in
rxvt. Both are "standard."
The same key. Four different byte sequences.
This is why Shift+F6 works in one application and does nothing in another, and why terminal multiplexers have to think carefully about what they intercept and what they pass through.
| Key | VT100 / xterm | rxvt | VTE (GNOME) | Kitty protocol |
|---|---|---|---|---|
| F1 | ESC OP | ESC [11~ | ESC OP | ESC [11u |
| Shift+F1 | ESC [1;2P | ESC [23~ | ESC [1;2P | ESC [1;2P |
| Ctrl+Left | ESC [1;5D | ESC Od | ESC [1;5D | ESC [1;5D |
| Backspace | 0x7F DEL | 0x08 BS | 0x7F DEL | 0x7F DEL |
| Alt+Enter | ESC 0x0D | ESC 0x0D | ESC 0x0D | ESC [13;3u |
| Ctrl+Shift+U | undefined | undefined | unicode input | ESC [85;6u |
How Kat800 handles it
Kat800 implements its own VT220 parser for each pane's master fd — tracking cursor position, colour attributes, and alternate screen mode independently. Multiplexing decisions are made at this level, not by VTE's internal state.
Applications inside Kat800 see $TERM=kat800-256color. This terminfo entry accurately describes what Kat800 supports, so curses-based apps generate exactly the byte sequences Kat800 expects — no guessing, no translation layer, no surprises.
When a pane application advertises Kitty keyboard support, Kat800 passes the full protocol through transparently. Modifier-key combinations that would be lost under classic VT encoding arrive at the application correctly and unambiguously.
Kat800's own prefix key (Ctrl+a) is consumed before the byte stream reaches any pane — it never appears in program output. Applications inside panes see a clean stream with no multiplexer artefacts.
Key Bindings
Default prefix is Ctrl+a. All bindings are rebindable in ~/.config/kat800/kat800.conf.
| Keys | Action |
|---|---|
| Prefix c | New window |
| Prefix " | Split pane horizontally |
| Prefix % | Split pane vertically |
| Prefix n/p | Next / previous window |
| Prefix k | Send output to KatKlips |
| Prefix d | Detach session |
| Prefix $ | Rename session |
| Prefix ? | Show all keybindings |