Terminal

Use terminal tabs, shells, split panes, pane arrangement, agent presets, program status, clipboard, keyboard protocols, exit handling, and session recovery.

Every workspace has terminal tabs. The Rust runtime owns each shell or agent process; the renderer draws its screen and sends input.

Open and close tabs

  • New terminal tab (Cmd/Ctrl+Alt+T, the preset bar, or the command palette) starts the default shell.
  • Close terminal tab is Cmd/Ctrl+Alt+W. A pinned tab ignores the close command and is never closed automatically.
  • Next tab / Previous tab (Cmd/Ctrl+Alt+→ / Cmd/Ctrl+Alt+←) cycle through terminal tabs, then file tabs, and wrap around. On some Intel graphics drivers, Ctrl+Alt+Arrow is a display-rotation hotkey; rebind it in Settings → Shortcuts if it rotates your screen.

Right-click a tab for Split terminal (Split right / Split down), Move into current split (Right / Down), Move into group, Pin tab / Unpin tab, Close, Close others, Close tabs to the right, Close tabs to the left, Rename, and Tab color.

Split and arrange

  • Split the active tab with Split terminal right or Split terminal down in the command palette or the tab menu.
  • Right-click a preset in the preset bar for Split right with <preset> or Split down with <preset>; the new pane starts that preset under the normal supervisor.
  • Drag a tab to reorder it, or drop it into another tab's split. Unsplit pane moves a pane back out into its own tab.
  • In a split tab, the Arrange panes grip in a pane's hover controls opens preset layouts for the pane count and Even out panes. Drag the grip instead to dock the pane along an edge, or onto another pane to move or swap it; hold Shift to dock at one third. The command palette offers the same presets as Arrange panes: <preset> and Arrange panes: Even out.
  • Closing a pane with a running command or agent asks for confirmation.

Choose a shell

Open Settings → Shell. On Windows, Cordy detects installed PowerShell 7, Windows PowerShell, Command Prompt, Git Bash, and WSL distributions, and also accepts a custom command. New terminal tabs use the selected default; existing tabs keep their current process.

Launch a preset

The preset bar has Agent presets, More presets, Manage presets, and New terminal tab. It launches Claude Code, Codex CLI, Cursor Agent, Gemini CLI, Copilot, OpenCode, or your custom presets in the project folder and supervises the run. Configure presets under Settings → Terminal presets. See Agents.

Program status

A program that reports its status through the Program Status Protocol (OSC 7501), such as Claude Code 2.1.295 or later, shows it on its tab in any terminal tab, including one you started by hand: Working (with a percentage when reported), Needs approval, Has a question, Needs sign-in, Needs attention, Finished, or Failed. See Agents for how this relates to screen-inferred status and notifications.

Clipboard

Text that a terminal program copies with OSC 52, as Claude Code and Codex do, reaches the system clipboard. Programs can only write to the clipboard: Cordy never answers a request to read it, and an empty or malformed request never clears it.

Keyboard input

Cordy forwards terminal input according to the protocol requested by the running application. On Windows it supports win32-input-mode and the kitty keyboard protocol:

  • Codex interprets Shift+Enter and Ctrl+J as newline.
  • Claude Code interprets Shift+Enter as newline.
  • Cordy does not assign those meanings; the CLI does.
  • If an application enables kitty keyboard mode, it receives Ctrl+C as a protocol key event. In a plain shell, Ctrl+C remains the interrupt byte.

Chinese IME composition and codeless paste/dictation paths are supported.

Workspace shortcuts such as Alt+↑/↓ are off inside a focused terminal by default, so the shell keeps those keys. See Shortcuts.

Mouse and copy

When a TUI requests mouse reporting, clicks, drags, and hover go to that TUI. Hold Shift while dragging to select terminal text; macOS also accepts Option-drag. With a selection, Ctrl+C copies. Ctrl+Shift+C explicitly copies. With no selection, Ctrl+C interrupts or goes to the CLI protocol described above.

When a process exits

  • You end a shell (exit, Ctrl+D, or Ctrl+C to quit it): its tab, or just that pane in a split, closes.
  • An agent run exits, for any reason: the tab comes back as a fresh shell in the same folder.
  • A shell crashes or is killed, or the tab is pinned: the tab stays open with its output and [process exited N - press Enter to restart]. Press Enter to restart; the earlier output is kept above [session restarted].

Resume behavior

  • Renderer reload, or closing to the tray on Windows: the live runtime and PTY remain alive; the new renderer attaches to the runtime snapshot and continues.
  • Full quit: processes end. Cordy stores up to 1,000 serialized terminal history lines with the captured columns and rows, excluding alternate-screen and mode control sequences. On launch it restores that history, shows [previous session restored], and starts a fresh shell below it.
  • Close a terminal tab or delete its workspace: its stored terminal snapshot is reclaimed.

The restored text is history, not a live agent process. Start a new agent if the previous process ended with the full quit.