Terminal
Integrated terminal emulator with multiple sessions, real-time execution output, and search.
Terminal Overview
AgentsInFlow includes a full PTY-backed terminal emulator built on xterm.js. Every agent execution runs inside a dedicated terminal instance, giving you direct visibility into tool calls, file edits, and command output as they happen. You can also open standalone shell terminals for manual work.
Terminals are transient: they exist while open and are not persisted to disk. Closing a terminal tab discards its session. Execution terminals are tied to the lifecycle of their execution attempt.
The terminal uses a scrollback buffer of up to 5 million lines, so long-running agent sessions remain fully searchable.
Terminal Types
There are two types of terminals, each serving a different purpose.
| Type | Created by | Lifecycle | Backend |
|---|---|---|---|
| Execution terminal | Starting an execution | Tied to the execution attempt | PTY or spawn |
| Persistent shell | User via the + button | Lives until the tab is closed | PTY |
Execution terminals are created automatically when you start an execution. The AI coding CLI (Claude Code, Codex, or Cursor) launches inside the terminal with the ticket context injected. Persistent shells are general-purpose terminals you open manually for running git commands, build scripts, or any other shell work within the project directory.
Terminal Tabs & Sessions
Each terminal session opens in its own tab. You can run multiple sessions in parallel, for example: one execution terminal running an agent, a persistent shell for manual testing, and another execution on a different ticket.
Switch between sessions by clicking tabs. The terminal preserves full scrollback content when switching, so you never lose output. To keep memory usage low, AgentsInFlow mounts at most five xterm DOM instances at a time. Background tabs retain their session controller and output buffer but release the rendering surface until you switch back.
Click + in the tab bar to open a new persistent shell.
The shell opens in the project's working directory (or the worktree root if branching is active).
Close a tab to terminate the session. This is permanent as terminals are not persisted.
Real-Time Execution Output
When an agent runs, the terminal streams its output in real time. You see every tool call, file read, edit, and shell command as the CLI produces it. The terminal auto-scrolls to follow new output.
If you scroll up to review earlier output, auto-scroll pauses to avoid jumping the viewport. Scroll to the bottom or click the follow indicator to resume auto-scroll. File paths in the output are rendered as clickable links: click one to open the file directly in the editor.
File links include line and column numbers when available, so clicking jumps to the exact location the agent referenced.
Sending Input to Executions
When an agent pauses for confirmation or asks a question, you can respond directly in the terminal. The input bar supports two modes:
Submit Mode
Press Enter to send immediately. Best for quick responses like "yes", "no", or accepting a tool call.
Insert Mode
Type freely with Enter adding newlines. Use the submit button or keyboard shortcut to send. Best for multi-line input and careful composition.
A session-backed input history stores your previous inputs. Press Up / Down to cycle through recent entries or open the history panel for a full list. Submitted input lines can be visually highlighted in the terminal output so you can distinguish your responses from agent output.
The terminal also supports pasting images from your clipboard for CLIs that accept image input.
Scrollback & Search
Press Cmd+F (macOS) or Ctrl+F (Windows) to open the find widget. It searches the entire scrollback buffer, including content that has scrolled out of view.
| Feature | Description |
|---|---|
| Regex mode | Toggle regex patterns for advanced matching (validated in real time) |
| Case sensitivity | Toggle case-sensitive or case-insensitive search |
| Whole word | Match whole words only to filter out partial hits |
| Match counter | Shows current/total matches (e.g., "3/45") with a limit of 5,000 highlights |
| Navigate | Use Enter / Shift+Enter to jump between matches |
This is especially useful for long agent sessions where you need to locate a specific error message, file path, or command output from earlier in the run.
Secret Redaction
API keys, tokens, and credentials that appear in terminal output are automatically redacted. This prevents sensitive values from being persisted in execution logs or accidentally visible in screenshots you share.
Redaction is best-effort. Avoid echoing raw secrets in commands where possible. Store credentials in environment variables rather than passing them inline.
Terminal Themes & Appearance
The terminal inherits its color scheme from the application theme via CSS custom properties. All ANSI colors map to the current theme palette automatically.
| Setting | Default |
|---|---|
| Font family | JetBrains Mono, Menlo, Monaco, Consolas, monospace |
| Font size | 13px |
| Line height | 1.2 |
| Cursor style | Block with blink |
| Scrollback | 5,000,000 lines |
ANSI color mapping follows the application theme:
The terminal automatically adjusts rendering when moving windows between displays with different pixel densities.
Keyboard Reference
| Shortcut | Action |
|---|---|
Cmd+F | Open find widget |
Enter / Shift+Enter | Next / previous match (in find widget) |
Escape | Close find widget |
Up / Down | Cycle input history |
Cmd+C | Copy selected text (or send interrupt if no selection) |
See Keyboard Shortcuts for the full shortcut reference.