Skip to content

Tools beside the thread

Editor and Terminals

The Monaco editor, external-editor handoff, dirty-state protection, conflict recovery, and integrated terminals.

  • 11 min read
  • 9 sections

Editor and Terminals ​

Work text previews and Code files share an embedded editor. Code also provides server-owned terminals. Terminal output appears while the shell is running; stopping the terminal is not required to see its prompt or command results. All authority lives server-side; the interface renders opaque file and checkout identities, never raw host paths.

Edit a Work file ​

Open an ordinary text file from Files, then choose Edit. For Markdown, choose Source to edit, Preview to read, or Split to see both. Split view stacks on narrow windows. Switching views keeps your selection and undo history.

Use Save or ⌘/Ctrl+S to write the file. Editing uses the folder access you already granted to the Work Project. It does not change the thread to Code or give the agent more access.

The editor accepts UTF-8 text files up to 5 MiB. Saved artifact versions, attachments, PDFs, images and office documents keep their existing viewers and external-app actions. If a source is unavailable or cannot be edited, Octant says so rather than editing a shortened preview.

Monaco editor ​

The Monaco editor is a full editable pane with:

  • Multiple editor panes in the persistent split-tree
  • Syntax highlighting and built-in services for TypeScript, JavaScript, JSON, CSS, and HTML
  • Find and replace, go to line, multi-cursor, undo and redo, and save
  • Diff viewing
  • Dirty-state protection and external-change detection
  • Restoration of open files and pane layout after restart
  • Local recovery of unsaved text, with comparison when the disk version changed
  • An explicit Commands menu and Editor settings disclosure

TypeScript and JavaScript files also get the Project's type errors and go to definition across files from a confined language server; see Language services. Other languages get syntax highlighting and editing fundamentals only; deeper tooling is handled through external-editor handoff.

Kept conversation, file, preview and Canvas tabs return after restarting this window, in their prior order. The saved workspace chooses the selected tab; restoration does not restart a command or send a draft. Temporary sidebar previews are not kept. A missing or unavailable tab shows the host's explanation when selected. References stay separate for each host, Project, mode and window.

For a supported provider, Force stop appears ten seconds after Stop turn if the turn has not ended. It stops only that attempt's owned runtime process. Shared runtimes do not offer it. Queued messages and conversation history stay in place, and a failure is reported instead of killing another process.

File states are dirty, saving, saved, conflicted, unavailable, and closed.

Stale-save conflict recovery ​

Code saves carry the expected file identity and digest, write an exclusive same-directory temporary file, flush, atomically rename, flush the directory, and verify the result. An external change creates a new observed identity and blocks the stale write with a conflict result:

  • A conflict keeps the prior content identity, digest, and byte length while recording state: "conflict". The authoritative file is not replaced.
  • An interrupted save keeps prior authoritative metadata and records state: "interrupted" with rescan required; the draft stays dirty and Save-enabled with reconnect and retry guidance.

Editor commands and preferences ​

The toolbar offers Commands, Find, Replace, Format, and Go to line. Commands also exposes folding, undo/redo, multi-cursor editing and other supported editor actions.

Editor settings controls line wrapping, visible whitespace, indentation, spaces or tabs, the minimap and optional formatting before save. Preferences stay on this device. Formatting availability depends on the file's language support. Code's Outline opens its symbol navigation when its language server supports it; Problems lists the file's diagnostics and jumps to their locations.

Recover unsaved edits ​

Unsent edits are kept on the device where you type them, separately from the conversation. Reopen the file after restarting to recover its draft. The host must still authorize the source before the draft is shown. If the browser cannot keep a recovery copy, a notice tells you to save before closing the window.

When the saved file changed, review the disk and draft comparison. Keep draft against this version retains your text for a later Save. Discard draft and reload takes the saved file. Neither an agent change nor a recovered draft silently replaces the other. Saving or discarding removes that recovery copy. Work saves directly through a checked file handle; an interrupted disk write can be partial, so inspect the file before retrying an uncertain save. Code uses the atomic file-save path described above.

Replace text across Code files ​

Open content search with ⌘/Ctrl+Shift+F and expand Replace in matching files. Enter literal replacement text, choose Preview replacements, and review the before/after text for every file. Only Save reviewed replacements writes the changes.

Replacement is case-insensitive and limited to the matching files currently listed. A partial search says so. One review covers up to 16 files and refuses files with unsaved editor drafts. Save or discard those drafts first. Saves stop at the first conflict or failure, and earlier successful saves remain. Plan can prepare the review but cannot save it.

Ask the agent about a selection ​

Select text in a Code file and choose Send selection to agent. Octant puts the selection in the conversation draft as a quote chip naming the file and line range, followed by a request for one replacement block; send it from the conversation when ready (Quote into the composer).

Back in the file, Use latest agent response loads a reply containing one fenced code block. You can also paste a proposed replacement. Choose Preview replacement, review the comparison, then Apply replacement to draft. The complete draft must still match what you selected; otherwise select the current text again. Applying edits the draft only. Save writes the file.

External-editor handoff ​

You can open a file in an external editor. Handoff is desktop-only, authenticated, and fail-closed:

  • The editor is configured in Settings as an explicit executable plus a structured argument template — never a shell string, and never an authoritative host path.
  • The process launches without a shell against the exact authoritative checkout, file, and line.
  • The server accepts the target only when the thread and checkout are active and matching, the path is confined, and the file reference is available, read-only, or completed. Archived, waiting, conflicting, mismatched, missing-path, and out-of-scope targets are rejected.
  • Failures map to a sanitized 503 unavailable; private paths and exception details never cross the boundary, and a failed handoff does not change Octant state.

Terminals ​

Terminals are server-owned PTY processes in the selected checkout, rendered by Xterm. They appear as movable workspace panes and multiple terminals can run concurrently.

  • Explicit shell selection with a sanitized inherited environment and credential references resolved only at launch
  • Bounded input and output; each pane retains at most 8 MiB of redacted output in 64 KiB chunks, with an explicit truncation marker
  • Backpressure, resize coalescing, cancellation, and graceful shutdown that escalates to a verified process-group kill — never a kill by broad process name
  • Renderer reload reattaches while the server and PTY stay alive; a full restart restores the transcript, exit state, and an explicit rerun action — it never restarts a command silently
  • If the thread's checkout can no longer be read, the terminal shows the reason the checkout observation reported — not a generic line — and offers Use the Project's checkout; a refusal explains itself in its own words

A terminal sends Tab, Shift+Tab, Escape and function keys to its shell, so those keys cannot leave it. Press ⌘/Ctrl+Escape to move focus to the next control and ⌘/Ctrl+Shift+Escape to the previous one; nothing is sent to the shell. The terminal shows the chord under its output while it has focus. See Keyboard shortcuts to rebind it.

Terminal settings are independent of editor typography: font family, size, line height, ligatures, cursor style, scrollback, shell, and theme-derived colors. An open terminal follows a light/dark, theme, or contrast change in place, and so does turning Glass or Reduced transparency on or off. It also lifts any colored output too faint to read against its background, so deliberately faint text, such as a dim prompt hint or a dark grey 256-color, shows lighter in a dark theme and darker in a light one; text a program marks as dim keeps a lower bar than ordinary text. The default terminal font stack falls back to installed Nerd Fonts (Symbols Nerd Font Mono, MesloLGS NF, Hack Nerd Font Mono) so prompt glyphs render when you have one; set your own family in Settings to prefer another.

Authority ​

Your own Project terminal runs unconfined, as your shell does outside Octant, in Work Projects too, unless Strict is on for it. Under Strict it runs in Octant's sandbox with a Code thread terminal's rules, which the rest of this section describes. A terminal on a Plan checkout stays read-only either way.

Plan mode cannot start or stop terminals. Opening or selecting the Terminal tab yourself starts a shell without a prompt in every other posture — your click is the approval. A Terminal tab that merely reopens with a restored layout starts nothing: it waits for Start terminal or for you to select the tab again. If its process is still running, the restored tab reattaches to it without starting another. A full restart never launches a new shell just because its tab was saved. Approval-gated mode still prompts before an agent starts or stops a terminal; Full access allows it. The shell keeps its history and prompt caches in an Octant-owned directory of its own repository root, since the sandbox never lets it write inside your home and one repository's shell state is never readable by another's. On macOS the shell starts as a login shell and can read, but never change, your shell configuration, its frameworks, and the version managers your PATH uses (mise, asdf, pyenv, rbenv, Volta, nvm, Bun, rustup); credential directories such as ~/.ssh and ~/.aws stay unreadable. A Code thread terminal can also be switched on so that a provider CLI you start in it can use the thread's Browser; see Browser for a CLI in a terminal. Local process monitoring covers only processes Octant launches and owns; arbitrary host-process discovery and control are deferred.

Move between a thread's terminals ​

With several terminals open for a Code thread, press ⌘/Ctrl+Shift+↓ in one to go to the next, or ⌘/Ctrl+Shift+↑ for the previous. The keys walk the panes, then the bottom panel, then the dock's terminal tabs, and wrap around. A terminal behind a tab comes to the front with the caret in it; a tab restored from before a restart may start its shell, as clicking the tab does. Terminals you cannot see to type in are skipped: minimised ones, those in a closed dock or bottom panel, panes hidden by a focused pane, a narrow window's dock or an open preview, and panes whose shell has exited. So are other threads' terminals and Project terminals. Nothing is sent to the shell. With one terminal open the keys do nothing.

Open a provider terminal ​

In a Code thread on Claude Code, Codex, Google Antigravity, or Gemini CLI, a terminal's actions offer Open provider terminal (such as Open Codex terminal) beside New terminal. It opens a terminal tab named for the program and starts that program in its own interface, in the thread's folder, with the same account and settings the thread's turns use. For Antigravity that is agy, and for Gemini CLI gemini.

In Work, once the Project's developer tools are on, the Project terminal card in Zen offers the same Open provider terminal beside Stop terminal for the active task. It opens as a Project terminal for that task, in the task's folder, and follows the task's access level rather than the Project terminal's.

  • Only you can open one or type into it, from a window on this computer or a phone or browser you paired yourself. No agent can, with or without an approval.
  • The program runs on its own, with its own approvals. What happens in it is outside the thread's record, transcript and usage, and Octant does not read it back. The tab says so.
  • It runs the way the thread's turns run. Outside Strict, it runs without Octant's sandbox, on the provider's own approvals, with your own environment. A Gemini CLI or Antigravity terminal opens on the same home folder as the thread's turns, which outside Strict is your real home folder. Under Strict, or when the thread kept its sandbox or chose a sandbox policy, it stays sandboxed like an ordinary Code terminal, so the program may be unable to sign in or save its session there. Under Strict it gets the provider's short fixed list of variables plus the names you let through; your shell's startup files still run and may set a credential again.
  • Let providers send their own telemetry and update themselves apply as they do in the thread's turns, from the next time you open the terminal: both to Claude Code, and self-update to Antigravity. Under Strict, or when the thread kept its sandbox or chose a sandbox policy, those stay off whatever the switches say. They change nothing for Codex and Gemini CLI. Antigravity's telemetry opt-out is a launch argument its own program does not get here, so its telemetry follows your Antigravity settings, under Strict too. Provider telemetry and updates has the whole list.
  • It carries no API key. An account that signs in through its own folder starts signed in; an API-key or gateway account's program asks you to sign in.
  • Plan, a Project on a server, and other providers, including the other ACP agents, do not offer it. Restarting the tab restarts the program, and the tab cannot use the thread's Browser.

Next steps ​

Octant documentation · local-first by design