Definition

Grid layout

A grid layout arranges multiple terminal panes in rows and columns so you can watch several CLIs at once — the core UI pattern for AI-first terminals.

A grid layout is a terminal arrangement where panes are tiled in fixed rows and columns — two panes side-by-side, four in a 2x2 square, nine in a 3x3, and so on. Each pane is an independent PTY running a command. It's the natural UI for running multiple agentic coding CLIs at once.

Why it matters

Single-pane terminals force you to pick one task at a time. Grids let you parallelize: Claude Code fixing a bug on the left, Codex CLI writing a new feature on the right, a git status shell in the bottom corner, test output streaming somewhere else. For developers who run several autonomous agents at a time, it's the difference between juggling tabs and actually seeing what's happening.

SpaceSpider's grid layout is the product's core UI. Each space has a configurable grid (1, 2, 3, 4, 6, 8, or 9 panes) and every pane is a PTY-backed session running a CLI of your choice. See grid-layouts and first-space.

How it works

A grid UI divides the window into equal cells using CSS Grid, a layout engine, or a terminal multiplexer's pane geometry. Each cell hosts a renderer (in SpaceSpider's case @xterm/xterm) wired to a PTY session. Resize events propagate: when the window resizes, each pane recomputes its cell size and issues a pty_resize call so the child process receives a SIGWINCH and reflows its output.

Compared to freeform splits (tmux-style), fixed grids are simpler and more predictable but less flexible — you can't drag a splitter to give one pane more room. SpaceSpider trades flexibility for a "sit down and start working" experience.

How it's used

Common grid setups in SpaceSpider:

  • 2 panes: Claude Code + a shell
  • 4 panes: Claude, Codex, Qwen, Kimi running the same task for comparison
  • 6–9 panes: one per microservice or one per ticket

See cli-claude, cli-codex, cli-qwen, and cli-kimi for CLI-specific setup.

FAQ

Can I resize panes in a grid?

Not in SpaceSpider today — cells are equal. Resizable splitters are on the roadmap. Window resize still reflows everything proportionally.

What's the ideal number of panes?

Most users settle on 2 or 4. Beyond 6 the readable font size gets small on a single monitor; a larger grid makes more sense on an ultrawide display.

Related terms