SSH & remote sessions
Full-fidelity SSH sessions — and turning one into a remote agent.
Type ssh user@host in Mel and you get a real interactive remote shell — password or key auth, full keyboard, full-screen TUIs — rendered live in the pane. Then, if you want, one keystroke turns that session into an agent whose tools run on the remote machine.
SSH as a live session
When Mel detects ssh (like other interactive CLIs — vim, top, and coding agents such as claude and codex), the pane switches to a live terminal grid: a full terminal emulator with alt-screen, cursor addressing, scroll regions, and 256-color support, with TERM=xterm-256color set. When the session ends, it collapses into a finished block holding the final screen, right in your scrollback.
Keyboard fidelity
Remote TUIs need exact bytes, and Mel takes this seriously:
- ctrl+C and ctrl+X are forwarded as real control bytes (0x03/0x18) — this is how remote programs expect to be interrupted.
- shift+tab sends the reverse-tab sequence; arrow keys honor the terminal's cursor-key mode.
- Pastes are wrapped in bracketed paste when the remote program enables it.
- Terminal status queries (cursor position, device attributes) are answered so full-screen apps don't stall.
- Mel's single-modifier global shortcuts are suspended while a TUI is active, so your keys go to the remote program, not to Mel.
Melt into a remote agent
Press ctrl+enter (cmd+enter on macOS) inside an SSH session and Mel melts it into an agent conversation targeting the remote host. The landing reads user@host:~, and from there the agent's tools — read_file, list_dir, grep, find_files, run_command, write_file, edit_file — all execute over the existing ssh connection details, invoked as ssh target -- <cmd>. Nothing is installed on the remote machine.
That means "find where this service logs errors and fix the config" works against a server the same way it works locally: the agent reads remote files, proposes edits, and runs remote commands — with the same approval cards as local work. Web search and plan-writing tools work in remote conversations too.
You can disable the melt behavior with the SSH setting in Settings if you'd rather ctrl+enter do nothing in SSH sessions.
Related
- Sessions — how sessions and scrollback behave
- Environment — what local commands see
- Input and the prompt — starting local agent conversations