Interactive ChatNEW
The Sophon CLI chat surface — the full-screen terminal chat, its fallbacks, slash commands, approval and question cards, and @-mentions.
Running sophon with no arguments drops you into the interactive chat — a full-screen conversation with your agent that streams responses, renders Markdown, runs slash commands, and lets you attach files and images without leaving the terminal. It's the surface you'll spend the most time in.
sophon # bare invocation → interactive chat
sophon chat # identical — explicit formEntering and exiting
sophon chat accepts two options for picking up where you left off:
sophon chat --session <id> # -s : resume an existing session by ID
sophon chat --agent <id> # -a : chat with a specific agent (default: from config)Without --session the CLI creates a fresh session on connect; without --agent it uses defaultAgent from your config. The Gateway must be reachable at --gateway-url (default http://localhost:8080) — if the connection fails, the chat tells you to start it with sophon start.
To leave, type /exit, or press Ctrl+C twice within ~1.5 seconds. A single Ctrl+C clears the current line (or cancels a running task) and keeps you in the chat.
The full-screen surface takes over the terminal's alternate buffer, so exiting wipes its scrollback by design. On the way out it prints a resume card — the session id, this run's message count, the sophon chat --session <id> line to come back, and a pointer to /export if you wanted the transcript on disk.
The full-screen chat
Since v2.0.0 the full-screen chat is the default surface. It owns the whole screen and lays out like this:
│ ✦ Sophon · fix the parser default · ● · indigo-core │ ← header
│ │
│ …transcript (app-managed scrollback)… │
│ │
│ ● main — analyzing repository (41s) │ ← status band
│ ┃ ⚠ email.send · HIGH · 42s [A]pprove · [R]eject · … │ ← attention card
│ ❯ type here (grows up to 6 rows) │ ← composer
│ ↩ send · ⌥↩ newline · / cmds · @ files │ ← footer- App-managed scrollback — the wheel,
PgUpandPgDnscroll the transcript. Scrolling up releases follow and a↓ latestchip appears; reaching the bottom, pressingEnd, or sending re-arms it. - Status band — the active turn shows its latest phase, and each delegated subagent gets its own row with name, task, and elapsed time.
- Plan progress — while a task with an approved plan runs, the band shows
◆ plan 2/5 — <running step>, so the plan doesn't vanish the moment its approval card resolves./planexpands it into a full-height overlay. - Live token usage — each completion carries its turn's usage (agent, model, tokens) and the idle footer keeps the run's cumulative total. Both stay blank until the provider reports usage, so you never see a made-up zero.
/tokensshows the full breakdown. - Resumed history — resuming a session seeds the transcript with your recent messages behind a dim
resumed · …divider.
Select and copy
Wheel scrolling needs mouse capture, which is exactly what normally defeats native drag-selection. Two ways out:
- Hold
Shiftwhile dragging — Windows Terminal, VS Code, and most xterm-family terminals bypass capture for Shift. - Press
F2(or type/select) to release capture entirely. Plain drag then selects natively, aSELECTbadge appears in the footer, and wheel scrolling pauses untilF2toggles it back.
Approval and question cards
Requests arrive as cards in a bottom stack, one at a time, with later ones queued behind:
- Approvals show the risk level, the parameters, a scrollable preview, and a live countdown.
Aapproves,Rrejects,Sskips (which hands the decision to the server's timeout), andEopens the call in$EDITORwhen the tool allows editing. - Questions show numbered options — press a digit,
Spaceto multi-select,Enterto send — and also accept free text typed straight into the composer. - Cards arm after a short delay and never steal keys mid-typing.
Tabfocuses a card explicitly, and a timeout is always rendered, never silently defaulted.
Approvals and questions raised inside a plan step or by a sub-agent are mirrored into your main chat here, labelled with the step they came from. See Approval Gates.
Dialogs
Three dialogs open over a dimmed backdrop: /theme previews the whole screen live before you commit, /resume with no argument opens a native session picker, and /plan shows the running plan windowed around the current step. Esc closes any of them.
Fallback surfaces
The full-screen chat is a policy default, not an assumption — runtime probes decide per terminal, and the fallbacks are the surfaces that used to be the default. Nothing is lost in a fallback but the layout.
| # | Check | On failure |
|---|---|---|
| 1 | Not the Dashboard's built-in terminal | classic prompt |
| 2 | SOPHON_CLI_FULLSCREEN ≠ 0 / "fullScreen" ≠ false | pinned input |
| 3 | Not accessibility mode (SOPHON_CLI_ACCESSIBLE=1, or an active Windows screen reader) | classic prompt |
| 4 | stdin and stdout not redirected | classic prompt |
| 5 | Window at least 70×18 | pinned input |
| 6 | VT modes verifiably enabled | error, with the opt-out to re-run with |
Steps 1–5 degrade silently. Step 6 is the exception: the CLI is already connected by then, so rather than connect twice it exits and tells you to re-run with SOPHON_CLI_FULLSCREEN=0.
Shrinking the window below the minimum mid-session keeps the chat running — the layout squeezes instead of bailing out.
Pinned input is the first fallback and the previous default: the input zone is pinned to the bottom while the conversation scrolls above it, so the prompt never disappears mid-stream. You can keep typing while a task runs, and queued input is sent as soon as the current turn completes. It needs an interactive ANSI terminal of at least 40×12.
The classic prompt is the linear, framed surface underneath both. It is what a screen reader, a redirected pipe, or the Dashboard's built-in terminal gets.
CLI v2 was not removed — the pinned input zone and the classic prompt are the fallbacks, and SOPHON_CLI_PINNED=0 / SOPHON_CLI_V2=0 still work. Set SOPHON_CLI_FULLSCREEN=0 (or "fullScreen": false in ~/.sophon/config/cli.json) to drop straight back to pinned input. See Configuration.
If a crash ever leaves your terminal stranded in the alternate screen or in raw mode, run sophon doctor --reset-terminal — it blindly emits the full restore sequence.
Key bindings
| Key | Action |
|---|---|
Enter | Send the message |
Alt+Enter | Insert a newline in the full-screen chat (Shift+Enter in the pinned and classic surfaces) |
↑ / ↓ | Recall and walk through previous entries |
← / → / Home / End | Move the cursor — or, with an empty draft in full screen, jump the viewport |
PgUp / PgDn / wheel | Scroll the transcript (full screen) |
F2 | Toggle select & copy mode (full screen) |
o | Expand the newest collapsed tool card (full screen, empty draft) |
A / R / E / S | Answer the active approval card |
digits / Space | Answer the active question card |
Tab | Focus a card, or accept a slash / mention completion |
Delete | Forward-delete the character under the cursor |
Ctrl+W | Delete the previous word |
Ctrl+U | Clear the whole line |
Ctrl+C | Clear the draft → cancel active and queued tasks → press twice within ~1.5s to exit |
Ctrl+T | Attach an image (prompts for a path) |
Esc | Dismiss the open menu, dialog, or overlay |
VT terminals can't tell Shift+Enter apart from Enter, which is why the full-screen chat uses Alt+Enter (⌥↩) for a newline. The pinned and classic surfaces keep Shift+Enter.
Pasted text is auto-detected (bracketed paste) and inserted as a single block, so multi-line snippets land intact instead of triggering a send per line.
Slash commands
Type / at the start of an empty line to open a searchable picker, or type the command directly. The picker only offers what actually runs on the surface you're on.
| Command | What it does |
|---|---|
/new [agent] | Start a new session (optionally with a different agent) |
/sessions | List recent sessions |
/resume [id|title] | Resume a session — with no argument in full screen, a native session picker |
/agent <id> | Switch to a different agent |
/agents | List available agents |
/provider [id|type] [modelId] | List providers, or set a per-session provider/model override; /provider reset clears it |
/mode [graph|classic|default] | Show or set this session's execution mode |
/thinking <auto|off|fast|full> | Set the extended-thinking level (persists as defaultThinking) |
/theme [name] | Open the live-preview theme picker, or switch directly — full screen only |
/tokens | This run's turn and token breakdown — full screen only |
/select | Toggle select & copy mode — full screen only |
/clear | Reset the transcript view (the session is untouched) |
/export [format] [path] | Export the transcript (md / json / txt) |
/attach <path> | Upload a file and send it with your next message |
/save [n] [path] | Download the Nth attachment from the last batch |
/plan | Show the current plan |
/tasks | List active tasks on the server |
/approvals | List pending approvals |
/auto-approve [on [none|low|medium|high] | off | show] | Auto-approve requests up to a risk ceiling; the stored ceiling is kept when you turn it off |
/cancel | Cancel the running task or plan |
/canvas [<action>] | Act on the agent's canvas frame for the current session |
/help | Show all available commands |
/exit | Leave the chat |
/theme, /tokens and /select belong to the full-screen session itself, so the pinned and classic surfaces neither offer nor accept them. On those surfaces, pick a theme with the SOPHON_THEME environment variable instead. /rename is currently broken from the chat — rename from the Dashboard until it is re-registered.
@-mentions
Type @ to open the file picker and pull a file reference into your message. Completion is wired to your current working directory and filters as you type: keep typing to narrow the list, browse with ↑/↓, and press Tab or Enter to insert the reference inline. Esc closes the picker but keeps the @filter text you typed in the buffer, so nothing is lost.
Agent (@agent:<id>) and session (@session:<id|title>) mention categories are on the roadmap — today @ completes files.
Pasting and image attach
Press Ctrl+T to attach an image — the CLI prompts for a path and queues the file. A confirmation line like [attached photo.png] is echoed, and the image is uploaded and sent alongside your next message. Use /attach <path> for non-image files (it uploads to Documents and sends immediately), and /save [n] to pull an attachment the agent sent back down to disk.
Rendering
Assistant output streams live and renders as themed Markdown — headings, bold, italic, lists, block quotes, tables, links, and fenced code blocks all render with syntax highlighting through the active theme. Intermediate phases (thinking, tool use, memory lookups, skill execution) surface as labeled status lines while the agent works. See Extended Thinking for how reasoning is produced.
Known gaps
Stated plainly, so you don't go looking for them:
- Mouse support is wheel-only. Scrolling works; clicking a card or a tool block does not. Answer cards with the keyboard.
- No
Ctrl+Rhistory search.↑and↓walk the full history stack. - No
@agent:or@session:mentions. The picker completes file paths. - Newline is
Alt+Enterin full screen, notShift+Enter. - Very long output is trimmed. A single part elides its middle past ~2,000 rendered lines and the transcript trims its oldest entries past ~1,000, both marked where it happened.
/exportbefore you exit keeps everything. - Token counts are last-wins per turn — a turn that makes several model calls reports the latest usage the provider sent, not a summed total.
- Code fences highlight per line while streaming, so a block comment or a long table can mis-color until the fence closes and the block re-parses whole.
/renamedoesn't work from the chat — rename from the Dashboard.- Legacy conhost has no bracketed paste (a paste heuristic covers the common case) and scrolls by keyboard only.
Related
- Configuration — config file keys, env overrides, and the
fullScreen/pinnedInput/v2opt-outs - Themes — color schemes,
/theme, and selection priority - Command Reference — every
sophonsubcommand - Model Catalog — the providers and models
/providercan select - Sophon Graph — what
/modeswitches between - Extended Thinking — how reasoning is surfaced