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.
Related terms
- Space — the SpaceSpider unit that owns a grid
- Terminal multiplexer — the text-mode alternative
- PTY — what backs each pane
- tmux — the incumbent split-pane tool
- Agentic coding — why you'd want a grid in the first place
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
- Agentic codingAgentic coding is software development where an LLM-powered agent plans, edits, runs, and verifies code on its own using tools, not just autocomplete.
- AI pair programmingAI pair programming is a collaboration style where an LLM assistant sits alongside you, suggesting code and reviewing changes in real time as you work.
- ANSI escape codesANSI escape codes are control sequences that terminals interpret for colors, cursor movement, and screen clearing — the language of every modern CLI UI.
- Autonomous agentAn autonomous agent is an AI program that perceives, decides, and acts on its own toward a goal — the architecture behind modern coding CLIs.
- CheckpointA checkpoint is a saved snapshot of file state that lets you roll back an AI coding agent's changes to a known-good point.
- Claude CodeClaude Code is Anthropic's official command-line agent that plans, edits, runs, and verifies code across your repo using Claude models and tool use.