Skip to main content
Version: 1.2.0

The ClaudusCode Terminal

The ClaudusCode terminal is the centerpiece of ClaudusBridge: a real, in-editor terminal — running an actual shell and a fully bundled AI coding agent — docked right inside the Unreal Editor. You sign in with your own Claude, ChatGPT/Codex, or Gemini account, type a prompt, and the agent works on your project while it drives the editor through the 900+ MCP tools the bridge exposes.

There is no separate window, no external terminal app, and no API key to paste. It is the same agent experience you would get from a standalone CLI, but living in a dock tab next to your viewport.

Opening the terminal

ClaudusCode adds a dedicated Artificial Intelligence section to the editor's Tools menu (placed above the engine's Programming section):

Tools ▸ Artificial Intelligence ▸ ClaudusCode

The entry is a toggle — clicking it opens and focuses the ClaudusCode tab, or closes it if it is already open (a checkmark shows while it is open). Because it is a nomad tab, you can drag it anywhere in your layout, dock it beside the viewport or the Output Log, and the editor will restore it on the next launch.

The tab title shows the live MCP tool count (e.g. ClaudusCode — 900+ tools), so you always know the bridge is up and how many tools the agent can reach.

What's under the hood

SClaudusCode is a native Slate terminal emulator — not a web view, not an embedded browser. It paints a character-cell grid directly through Slate's draw elements and is backed by three cooperating pieces:

ComponentRole
FClaudusCodeBufferThe screen + scrollback cell grid (default 131072 rows of scrollback).
FVTParserA VT/ANSI escape-sequence parser (colors, cursor moves, bracketed paste, mouse tracking).
IClaudusCodeSessionThe PTY backend that actually runs the shell + agent process.

Because it is a true terminal, it renders the agent's full TUI: colored output, spinners, progress bars, interactive prompts, and the agent's own permission/selection menus all behave exactly as they do in a standalone shell.

PTY backends

ClaudusCode talks to a real operating-system pseudo-terminal, so programs behave as if they were launched from a normal terminal (line editing, signals, window size, TERM=xterm-256color, and so on). The backend is selected per platform:

  • WindowsFConPTYSession uses the Win32 ConPTY API (dynamically loaded). It creates a pseudo-console, attaches the shell process to it, and runs asynchronous I/O on a background reader thread that stages output for the game thread.
  • macOS / LinuxFPosixPTYSession uses forkpty, the classic Unix pseudo-terminal fork, and reads/writes the master fd.

Both implement the same IClaudusCodeSession interface (Create, WriteInput, Resize, ConsumeOutput, IsRunning, Shutdown), so the widget is identical across platforms. Resizing the tab resizes the PTY, and the running agent reflows to fit.

How the agent launches

When a fresh terminal opens it runs the configured startup commands. Out of the box ClaudusBridge seeds a sensible default sequence so the agent runs immediately for a new install:

  1. Set TERM=xterm-256color.
  2. cd into the active Unreal project directory.
  3. Launch the agent.

The launched agent comes from the AgentCommand setting:

  • Empty (the default) launches the embedded CCAG bundle that ships inside the plugin (Resources/Agent/cli-node.js), invoked through your system Node as node "<…>/cli-node.js". This means a Fab buyer gets a working agent terminal with nothing more than a system Node install — no separate CLI to download.
  • An explicit value (for example claude, or ccb for a ClaudeCodeAntigravity install on your PATH) is sent to the shell verbatim, so any PATH-resolvable command — with flags — works.

On a developer machine without the bundle present, it falls back to plain claude.

Sign in with your own account

The agent uses your Claude (Anthropic), ChatGPT/Codex (OpenAI), or Gemini (Google) login via the normal OAuth flow — no API keys, no per-token billing from the plugin. Everything runs locally; only your provider's own login and model calls leave the machine. The first time you launch, follow the agent's on-screen sign-in prompt.

Settings

ClaudusCode is configured under Project Settings ▸ ClaudusCode (stored per-user in EditorPerProjectUserSettings):

SettingDefaultWhat it does
ShellExecutablePath(empty)Shell to run. Empty uses the system default (COMSPEC on Windows, SHELL on Unix).
FontFamilyCascadiaMonoMonospace font stem from the system Fonts directory (e.g. consola for Consolas).
FontSize10Font size in points (6–72).
ScrollbackLimit131072Maximum scrollback rows retained.
ColorSchemeNameDefaultColor scheme; must match a JSON file in Config/ColorSchemes/.
StartupCommands(seeded)Commands run on a new terminal, each sent separately. Override to fully customize startup.
AgentCommandclaude (see note)The agent CLI launched on a fresh terminal when StartupCommands is unset. Empty launches the embedded bundle.
bPreventCloseDuringActivitytruePrompt for confirmation if you close the editor while a terminal is still producing output.
ActivityTimeoutSeconds5.0Seconds of silence after which a terminal is considered idle (1–60).
Don't lose work to a stray close

With bPreventCloseDuringActivity on, ClaudusBridge intercepts the editor close while the agent is mid-task and asks for confirmation, so a long-running agent run is not silently killed when you quit the editor.

Color schemes

Color schemes are JSON files in the plugin's Config/ColorSchemes/ directory, loaded by UClaudusCodeSubsystem at startup and selected with the ColorSchemeName setting. The subsystem can reload them from disk on demand, and falls back to a built-in default scheme if the named scheme is missing.

Copy and paste

The terminal supports OS clipboard copy/paste with the platform-native shortcut — Cmd on macOS (matching the iTerm2 convention) and Ctrl elsewhere:

  • Copy — select text with the mouse (single / double / triple click for char / word / line, drag to extend, Shift+Arrow to extend from the keyboard), then press the copy shortcut to put the selection on the system clipboard.
  • Paste — the paste shortcut inserts the clipboard into the running program. When the agent has enabled bracketed-paste mode, ClaudusCode wraps the pasted text in the bracketed-paste escape sequences so multi-line pastes are delivered atomically (no accidental command execution mid-paste).

A subtlety worth knowing: Ctrl+C sends an interrupt (ETX) to the agent when there is no selection, but copies when there is one — exactly like a normal terminal.

Mouse, scrollback, and selection

  • The external scrollbar reflects scroll position and lets you scroll back through history; the mouse wheel scrolls too.
  • When the running program enables mouse tracking, ClaudusCode forwards mouse events as the appropriate escape sequences, so TUIs that respond to clicks work.
  • Drag-selecting near the top/bottom edge auto-scrolls so you can select beyond the visible viewport.

Relationship to the rest of ClaudusBridge

The terminal is the interactive way to drive ClaudusBridge: you talk to the agent, the agent calls MCP tools on the running editor. If instead you want to drive the same embedded agent programmatically from C++ — no terminal, no TUI — use the ACP drive path (FClaudusAcpClient), described on the ACP Drive Path page. Both launch the very same bundled agent described on the Embedded Agent Bundle page.