This document covers Claude Code's terminal rendering system, keyboard input handling, progress indicators, and user experience enhancements. These systems provide the interactive interface between users and the agent system, managing everything from text rendering and color handling to keyboard shortcuts and visual feedback.
For information about the underlying agent system and tool execution, see Agent System & Subagents. For session management features like resume and fork, see Session Management.
Claude Code uses a custom terminal rendering system built on React components that output ANSI escape sequences. The rendering pipeline transforms React element trees into terminal-compatible text with proper layout, colors, and formatting.
The rendering system operates in two modes depending on terminal capabilities:
ink2 Mode: Modern rendering system with advanced layout capabilities using Yoga WASM for flexbox-style layout calculations. This mode provides precise control over text positioning and wrapping.
Legacy Mode: Fallback rendering for terminals with limited capabilities, using simpler line-based layout.
Sources: CHANGELOG.md480 CHANGELOG.md19 CHANGELOG.md22 CHANGELOG.md300
Multiple optimizations ensure responsive rendering even during intensive operations:
| Optimization | Description | Benefit |
|---|---|---|
| Screen data layout caching | Cached screen layout structure to avoid recalculation | Reduced CPU overhead CHANGELOG.md300 |
| Memory pooling | Controlled writes prevent cursor state corruption | Improved stability CHANGELOG.md510 |
| Yoga memory management | Periodic parser resets prevent WASM memory growth | Prevents unbounded memory growth CHANGELOG.md18 CHANGELOG.md22 |
| Deferred rendering | Keystroke capture before REPL ready | Better startup experience CHANGELOG.md427 |
| Tree-sitter reset | Parser reset prevents memory accumulation | Long-session stability CHANGELOG.md524 |
| Stream buffer release | API stream cleanup after use | Memory efficiency CHANGELOG.md39 |
| Layout jitter reduction | Fixed-width spinner characters | Visual stability CHANGELOG.md246 CHANGELOG.md454 |
Sources: CHANGELOG.md172-176 CHANGELOG.md391 CHANGELOG.md457
Claude Code handles full Unicode character width properly for international text:
CJK Wide Characters: Characters that occupy two terminal columns (Chinese, Japanese, Korean) are measured correctly to prevent misalignment CHANGELOG.md71 CHANGELOG.md331
Thai/Lao Spacing Vowels: Special handling for combining vowel characters that don't advance cursor position CHANGELOG.md231
Japanese IME Input: Full-width (zenkaku) characters from Input Method Editors are handled correctly for both text input and option selection CHANGELOG.md238 CHANGELOG.md311
Sources: CHANGELOG.md71 CHANGELOG.md231 CHANGELOG.md238 CHANGELOG.md311 CHANGELOG.md331
The keyboard input system processes key events, manages input modes, and provides shortcuts for common operations. It handles multiple terminal protocols and input methods.
Terminal Protocol Features:
Sources: CHANGELOG.md442 CHANGELOG.md476-477 CHANGELOG.md546 CHANGELOG.md530
| Shortcut | Action | Context |
|---|---|---|
Ctrl+B | Background current task | Bash commands and agents CHANGELOG.md7 CHANGELOG.md50 CHANGELOG.md563 |
Ctrl+C / ESC | Cancel/interrupt | Two-press confirmation with background agents CHANGELOG.md11 |
Ctrl+F | Kill all background agents | Two-press confirmation CHANGELOG.md7 CHANGELOG.md50 |
Ctrl+G | Open external editor | Input field CHANGELOG.md325 CHANGELOG.md436 |
Ctrl+S | Stash current input | Prompt stash/restore CHANGELOG.md361 |
Ctrl+Z | Suspend to shell | Terminal suspend CHANGELOG.md442 |
Shift+Enter | Insert newline | Multiline input CHANGELOG.md546 |
Shift+Down | Navigate teammates | Agent team cycling CHANGELOG.md52 |
Shift+Tab | Quick-select option | Plan mode CHANGELOG.md520 |
Tab | Autocomplete | Command/file completion CHANGELOG.md181 CHANGELOG.md299 |
Custom Keybindings: Users can configure custom keyboard shortcuts via /keybindings command CHANGELOG.md372 The system supports chord sequences and context-specific bindings.
Sources: CHANGELOG.md372 CHANGELOG.md7-11 CHANGELOG.md50 CHANGELOG.md325 CHANGELOG.md442 CHANGELOG.md546
Vim mode provides modal editing for users familiar with Vim keybindings:
Text Objects: iw, aw, iW, aW, i", a", i', a', i(, a(, i<FileRef file-url="https://github.com/anthropics/claude-code/blob/0d996a7c/, a[, i{, a{ [CHANGELOG.md#L569-L569" min=569 file-path=", a[, i{, a{` [CHANGELOG.md">Hii
Operators:
d (delete) with motionsc (change) with motionsy (yank) with motions CHANGELOG.md569p/P (paste) CHANGELOG.md569Motions:
h, j, k, l, w, b, e, 0, $f, F, t, T (find character);, , (repeat find motions) CHANGELOG.md569Line Operations:
yy/Y (yank line) CHANGELOG.md569dd (delete line)J (join lines) CHANGELOG.md569>>, << (indent/dedent) CHANGELOG.md569Arrow Key Integration: Up/down arrows navigate command history when cursor cannot move further in Vim normal mode CHANGELOG.md324
Sources: CHANGELOG.md569 CHANGELOG.md324
The input field provides rich editing capabilities with autocomplete, history, and multiline support:
History Navigation:
Ctrl+R for fuzzy search through history CHANGELOG.md554! prefix enables bash history-based autocomplete CHANGELOG.md397Multiline Handling:
Shift+Enter inserts newlines natively in modern terminals CHANGELOG.md546Ctrl+G) for complex input CHANGELOG.md325Paste Operations:
Sources: CHANGELOG.md333 CHANGELOG.md397 CHANGELOG.md546 CHANGELOG.md551 CHANGELOG.md411
Visual feedback systems keep users informed about agent activity, resource usage, and session state.
The spinner provides real-time feedback during agent processing:
Customization Options:
spinnerVerbs: Array of custom verbs (e.g., "Processing", "Analyzing") CHANGELOG.md293spinnerTipsOverride: Custom tip strings shown during processing CHANGELOG.md112showTurnDuration: Toggle turn duration messages like "Cooked for 1m 6s" CHANGELOG.md446Visual Refinements:
/model or /theme CHANGELOG.md453Sources: CHANGELOG.md293 CHANGELOG.md112 CHANGELOG.md446 CHANGELOG.md454 CHANGELOG.md342 CHANGELOG.md453 CHANGELOG.md95
Extended thinking mode displays the model's reasoning process:
Display Behavior:
Integration:
Sources: CHANGELOG.md17 CHANGELOG.md209 CHANGELOG.md176 CHANGELOG.md342
Tool execution displays contextual progress information:
Progress States:
Special Cases:
Sources: CHANGELOG.md345 CHANGELOG.md123 CHANGELOG.md317 CHANGELOG.md56 CHANGELOG.md346 CHANGELOG.md67 CHANGELOG.md255
The status bar displays session information and resource usage:
Display Elements:
| Element | Description | Source |
|---|---|---|
| Session name | Current or custom session title | CHANGELOG.md60 CHANGELOG.md99 |
| PR status | Colored dot showing PR review state | CHANGELOG.md326 CHANGELOG.md302 |
| Background tasks | Count of running background agents | CHANGELOG.md281 CHANGELOG.md506 |
| Added directories | Directories from /add-dir command | CHANGELOG.md64 |
| Context usage | Token usage and percentage | CHANGELOG.md468 |
| Git branch | Current branch (VS Code) | CHANGELOG.md217 |
Statusline JSON Output: The status bar data is available as JSON for external scripts via statusline output, including workspace.added_dirs field CHANGELOG.md64 CHANGELOG.md468
PR Status Indicator:
Sources: CHANGELOG.md64 CHANGELOG.md281 CHANGELOG.md326 CHANGELOG.md302 CHANGELOG.md468 CHANGELOG.md217
Claude Code provides rich interactive components for file selection, command completion, and history navigation.
The autocomplete system provides context-aware suggestions for commands, files, and options:
Autocomplete Features:
/ anywhere in input, not just at start CHANGELOG.md571@ prefix shows file picker with icons and folder navigation CHANGELOG.md404 CHANGELOG.md483! prefix enables history-based completion CHANGELOG.md397Display Improvements:
File Suggestions:
Sources: CHANGELOG.md571 CHANGELOG.md397 CHANGELOG.md404 CHANGELOG.md483 CHANGELOG.md511 CHANGELOG.md58 CHANGELOG.md42 CHANGELOG.md428
The @ mention system enables precise file and directory references:
Capabilities:
@README.md#installation) CHANGELOG.md159pages: "1-5" parameter CHANGELOG.md251.gitignore (configurable via respectGitignore setting) CHANGELOG.md547Display:
Sources: CHANGELOG.md404 CHANGELOG.md159 CHANGELOG.md251 CHANGELOG.md547 CHANGELOG.md428 CHANGELOG.md483
Ctrl+G opens the configured external editor for complex input:
Features:
Configuration: Uses system EDITOR or VISUAL environment variable to determine which editor to launch.
Sources: CHANGELOG.md325 CHANGELOG.md436 CHANGELOG.md268 CHANGELOG.md469
Claude Code uses colors, animations, and hyperlinks to provide rich visual feedback.
Text styling enhances readability and provides semantic meaning:
Supported Features:
Windows Compatibility:
\r\n line ending issues causing incorrect line counts CHANGELOG.md35Sources: CHANGELOG.md35 CHANGELOG.md37 CHANGELOG.md339 CHANGELOG.md472
Subtle animations provide feedback without distraction:
| Animation | Element | Purpose |
|---|---|---|
| Braille spinner | Thinking indicator | Shows active processing CHANGELOG.md454 |
| Shimmer effect | Thinking status | Indicates extended thinking CHANGELOG.md342 |
| Reduced motion | Global setting | Accessibility option CHANGELOG.md256 |
| iTerm2 progress | Terminal integration | Native progress bar CHANGELOG.md410 |
Configuration: reducedMotion setting disables animations for accessibility CHANGELOG.md256
Sources: CHANGELOG.md454 CHANGELOG.md342 CHANGELOG.md256 CHANGELOG.md410
OSC 8 escape sequences create clickable hyperlinks in compatible terminals:
Features:
Supported Terminals: iTerm2, kitty, WezTerm, and other terminals supporting OSC 8 standard.
Sources: CHANGELOG.md518 CHANGELOG.md101 CHANGELOG.md326
Visual elements help identify and track sessions:
Terminal Title:
/rename command CHANGELOG.md99/clear CHANGELOG.md60Session Attribution:
Demo Mode: IS_DEMO environment variable hides email and organization for screen recordings CHANGELOG.md548
Sources: CHANGELOG.md486 CHANGELOG.md99 CHANGELOG.md60 CHANGELOG.md437 CHANGELOG.md548
Claude Code adapts to different terminal emulators and platforms, with special handling for platform-specific features.
| Terminal | Special Features | Sources |
|---|---|---|
| iTerm2 | Shift+Enter native support, Cmd+V image paste, progress bar integration, OSC 8 links | CHANGELOG.md546 CHANGELOG.md577 CHANGELOG.md410 |
| Kitty | Keyboard protocol support, Ctrl+Z suspend, native multi-key sequences | CHANGELOG.md442 CHANGELOG.md476-477 |
| WezTerm | CSIu protocol, Shift+Enter, Option+Return newlines | CHANGELOG.md546 CHANGELOG.md477 |
| Ghostty | Kitty protocol support, Shift+Enter | CHANGELOG.md442 CHANGELOG.md546 |
| Warp | Native Shift+Enter (no prompt) | CHANGELOG.md70 |
| Windows Terminal | Git Bash for hooks, MSYS2/Cygwin compatibility | CHANGELOG.md90 CHANGELOG.md41 |
| VS Code | Scroll behavior fixes, dimming during dialogs, native Python venv | CHANGELOG.md180 CHANGELOG.md96 CHANGELOG.md319 |
Sources: CHANGELOG.md546 CHANGELOG.md442 CHANGELOG.md476-477 CHANGELOG.md577 CHANGELOG.md70 CHANGELOG.md90 CHANGELOG.md180
Windows:
\t, \n CHANGELOG.md456macOS:
Linux/WSL:
scp) CHANGELOG.md531Sources: CHANGELOG.md284 CHANGELOG.md456 CHANGELOG.md49 CHANGELOG.md78 CHANGELOG.md86 CHANGELOG.md98 CHANGELOG.md83 CHANGELOG.md530 CHANGELOG.md105 CHANGELOG.md115 CHANGELOG.md68 CHANGELOG.md531
The system provides helpful guidance for terminal configuration:
Setup Recommendations:
Detection Logic:
Sources: CHANGELOG.md530 CHANGELOG.md70 CHANGELOG.md531
The UI/UX system maintains responsive performance through various optimizations:
Rendering Performance:
Memory Management:
Startup Performance:
Sources: CHANGELOG.md391 CHANGELOG.md300 CHANGELOG.md40 CHANGELOG.md26 CHANGELOG.md20 CHANGELOG.md22 CHANGELOG.md524 CHANGELOG.md39 CHANGELOG.md43-44 CHANGELOG.md139 CHANGELOG.md265 CHANGELOG.md27 CHANGELOG.md25
Refresh this wiki