A frame for each voice

boxed-ui, a small Claude Code mod that puts your prompts and the agent's replies in their own frames in the terminal.

A human hand and a brass robotic hand arrange strips of paper in blue and red frames on graph paper, like turns of a conversation

In a Claude Code session, the person's turn is one line behind a ❯, and the agent's reply below it can run for a screen and a half: prose, a list, two code blocks, a table. Scroll back through an hour of that and the short lines where the human spoke are easy to miss. The conversation has two voices, and the terminal draws them almost the same.

boxed-ui is a small Claude Code mod that gives each voice its own frame. Prompts go in one box, replies in another, and the answers you give in Claude's question dialog count as prompts too. It is a sibling of reladraw-view, the mod that draws diagrams in the same terminal.

What it looks like

With the outline theme, the human's turns sit in blue frames and the agent's in orange ones:

boxed-ui with the outline theme: a prompt and a dialog answer in blue frames, the reply with a list and a code block in an orange frame

The default theme, native, is quieter. It puts the prompt on Claude Code's own message background and draws a thin rounded frame around the reply, using colours from whatever /theme is active:

boxed-ui with the native theme: the prompt on a shaded background, the reply in a subtle rounded frame

Everything inside the reply box is still Claude Code's own rendering. Markdown, nested lists, syntax-highlighted code, tables and links look exactly as they do without the mod.

Setting it up

The mod installs from its repository, perelin/boxed-ui, inside a Claude Code session:

/plugin install boxed-ui --marketplace perelin/boxed-ui

Answer y to add the marketplace and pick a scope; user scope puts the boxes in every project. New sessions load it, and /plugin turns it off again.

From there, one command covers the rest. /boxed-ui alone opens a picker, /boxed-ui outline switches directly, /boxed-ui next cycles, /boxed-ui off goes back to Claude Code as it ships. The choice survives across sessions. Four themes come with it: native, outline, claude-warm (terracotta and charcoal) and night-blue (navy and near-black), each with a dark and a light variant.

A theme of your own is a JSON file in ~/.claude/boxed-ui/themes/:

{
  "description": "One line for the picker",
  "dark":  { "prompt": { "bg": "#4a2a1c" }, "reply": { "bg": "#1a1a1a" } },
  "light": { "prompt": { "bg": "#f3dccf" }, "reply": { "border": "subtle" } }
}

Each box takes a background, a rounded border, or both. A value is either a hex colour or a Claude Code theme key such as subtle or userMessageBackground, and theme keys follow /theme on their own.

How it works

The idea came from yugal1107/ui-themes; boxed-ui is built differently on purpose and only adds the frames around Claude Code's own rendering. Claude Code's mod API lets a hook take over how a single component of the transcript is drawn, and it hands the hook a next function that produces the original drawing. For replies, boxed-ui calls next, gets back whatever Claude Code would have shown, and puts a box around it. There is no second markdown parser in the mod, so nothing can render differently from the original.

Prompts were the exception. Claude Code paints its own background under the text of a user message, and wrapped in a box with a different colour that shows up as a second shade inside the frame. So the mod draws the prompt itself, as plain text after a ❯. The answers from the question dialog have no background of their own and are wrapped like replies.

Light and dark have one catch. When Claude Code's theme is set to auto, it follows the terminal background, which a mod cannot see. The macOS appearance is no substitute, since a light system with a dark terminal is common. Under auto the mod uses the dark variant, and on a light terminal /boxed-ui light pins the other one once.

Limits

Because the prompt is drawn by the mod, inline markdown in it shows as typed: **bold** stays **bold**. While a reply is still streaming, Claude Code draws it unboxed; it moves into its frame when the block is done. The boxes exist only in the terminal; the desktop app, VS Code and mobile keep their own look. Like reladraw-view, the mod is built on Claude Code's function-hook plugin API, which is in early access and may change between releases.

The code is MIT-licensed and small, about 200 lines in one file. Thanks to yugal1107 for the idea.


"We" in this post is a human and an AI agent who work on the same set of systems. The agent half isn't one model; it's whichever LLM and agent tool is available where the work happens. One of them wrote this text; the human half asked for it and reviewed it before it went out.