A Windows terminal workspace with independently running terminals, flexible split panes, and tabs inside each pane. New projects start with one empty pane: choosing the first terminal or agent is part of creating the project. Every pane can hold terminals, agents, planning references, logs, notes, activity, tasks, and graph views.
For supervised multi-agent work, see agent communication: stable routing IDs, actual prompt delivery, reply permissions, reviewed UUID task batches and conversation tabs. Free Pi is supported through its published TUI; private local runners are opt-in adapters rather than release dependencies.
Download TermSanity.exe or the ZIP from Releases and run it. It installs or updates one managed copy under your user profile and repairs the Start menu shortcut. Node and native ConPTY bindings are embedded; Windows 11 and WebView2 are required. A signed installer is also available. TermSanity.exe --portable keeps a downloaded copy separate. Workspace data remains in the user profile in either mode.
Opening the installed app or its Start menu shortcut starts its matching bundled service automatically. If login startup is enabled, it runs the same executable in background mode, so upgrades do not leave login pointing at an older cached service. Existing terminals are reattached; active service-owned work is protected during an upgrade. See startup and recovery.
Start in the pinned Scratchpad without choosing a project. Add terminal/agent tabs and split panes as needed. Later, right-click a tab → Move tab, or drag it onto a project. The move dialog chooses the destination pane and position. Switch List / Layout to click a pane in the project's actual arrangement; the view choice is remembered. Private working files, saved input and exact agent conversation references follow the tab.
Use + beside Projects to choose a project folder. Project actions create sub-projects, show folder details, or delete a project while retaining its files. In Connections, parent/sub-project agents can exchange messages and tasks through separate directed permissions. Workspace behavior and migration limits.
- Setup & checks: Tools → Setup & checks verifies the included engine, storage and available shells/agents. Install an app-managed Codex copy from this screen without a separate Node/npm installation; sign in with your own account. Other agent CLIs and project package managers remain optional external tools. The support summary excludes logs, prompts, paths and credentials.
- Workspace templates: File → Workspace templates offers three optional starting arrangements and JSON import/export. Shared templates contain layout and tool choices. Launch commands, conversations, credentials and connections are excluded; tab names are opt-in. Imports ask for a working folder and create stopped, manual tools. Existing workspaces are preserved.
- Multiline input: Shift+Enter adds a line in terminal prompts and the agent composer. Enter submits the completed prompt. CLI draft recovery preserves those line breaks.
- Terminal links: Ctrl+click opens a web link in your default browser. Right-click offers Open link and Copy link address, including the actual destination of labeled Codex links. The menu supports arrow keys, Enter and Escape.
- Copy and interrupt: Ctrl+C copies selected terminal text. With no selection it retains the CLI's interrupt action. Ctrl+Shift+C always takes the copy path and never interrupts, including when clipboard access fails. The toolbar's copy button also copies the selection.
- ChatPort focus: ChatPort 0.3 can bring an open conversation to its exact project, pane and nested tab. The native conversation ID identifies the agent; detached pane windows take priority. This uses the authenticated local service and never launches another agent for a focus request. Resume reuses an existing matching CLI tab when available.
- Layouts: the Layout button offers a single pane, rows, columns, a main pane with a stack, optional 2×2 / 3×2 grids, and custom grids of up to four rows and columns. Split individual panes further for irregular arrangements. Rearranging preserves open tabs; reducing the number of panes merges them. Presets add no content or agents.
- Saved arrangements: Layout → name the layout → Save layout. Restoring also retains tabs opened since the save. Saved arrangements belong to the project and survive service restarts and database backups.
- Nested tabs: click + in any pane or its tab strip. Five agents inside one pane of a larger terminal layout is one supported arrangement. Drag tabs between panes. Resize dividers with the mouse or arrow keys; double-click or right-click any tab to rename it.
- Terminals: choose PowerShell 7, Windows PowerShell, CMD, WSL, SSH, or a custom executable with a JSON argument array. Closing a tab closes its view; the process remains available in the sidebar. The square stop button ends the process. Pane menu can open another native view of a pane.
- Activity: agent rows show Working, Idle, Scheduled, Needs input, or a stopped/error state. Open means a shell process exists; it does not claim that an agent is working. Codex launched inside an existing PowerShell is detected through its activity protocol and appears under Agents. Queued work is shown alongside active work.
- Pending input: message-composer drafts are saved locally and to SQLite. Native CLI draft text and Tab-queued follow-ups are committed before forwarding input. Saved input below a CLI recovers drafts/queues without pressing Enter; Input history → Sent history keeps submitted copies separately. Only unsent drafts and unconfirmed queued prompts need input review after terminal loss. Imperfect editor/history text capture does not turn a sent message into an unsent warning. Copies are never replayed automatically; image attachments and external-editor buffers are outside this text recovery path.
- CLI agents: add Codex, Claude Code, opencode, Freebuff, or a custom interactive CLI. Each instance has an Auto-deliver switch. On submits queued messages and tasks at a ready prompt, one at a time. Off gives you direct terminal input and holds the queue. The same process and conversation keep running, including the current turn. New Claude and Codex agents default to Run without asking; choose Ask before changes for approvals. Claude uses its documented
--dangerously-skip-permissionsflag; Codex uses--no-daemon --ask-for-approval never --sandbox danger-full-access. Optional Advanced → Extra options accepts ordinary options, such as--model sonnetfor Claude or-m provider/modelfor opencode. Quote paths containing spaces. No JSON is needed. The choice is saved with the instance and retained on resume. Existing custom options are preserved. Folder trust, login, and provider choices can still require direct input. Choose Take input for decisions. - Add an existing chat: in Add agent, turn on Resume existing chat. Paste an ID, resume command or copied terminal output. Local Codex history can fill in the name and working folder; your edits take priority. Leave Start after adding off to save the resume for later.
- Resume and Chats: stopped managed agents resume the exact saved conversation ID. Managed Codex tracks startup and in-process
/newIDs, retaining earlier chats in a flushed identity journal and tab history. Chats can preview and copy recorded IDs, browse local Codex history, and explicitly select the exact chat for older missing-ID tabs. Folder matches never choose a chat automatically. Switching chats holds earlier prompts for review. Unexpected process loss and native incomplete-turn records produce a warning that stays visible until reviewed; a BSOD is a possible cause, not an assumed diagnosis. See conversation tracking. - Project default: Settings → CLI agent default for this project → Automatic delivery for new CLI agents. The project stores this default; the new-agent dialog can override it. Existing instances retain their own modes. New projects default to manual.
- Messages: the composer below an agent terminal sends a real prompt. Enter sends, Shift+Enter adds a line, and Ctrl+Enter holds the prompt in the workspace queue. History distinguishes Queued, Submitting, Submitted, Answered, and Needs review. Expand a receipt to read the answer or explicitly retry after checking the terminal.
- Structured Codex: choose App Server when creating an agent. Queue work, then select Orchestrated. Command/file approvals appear in the task board and agent view. App Server takeover interrupts its turn; CLI takeover keeps its turn running. Each instance processes one delivery at a time. Separate Git worktrees are useful for parallel repository edits.
- Planning: save local notes or manually pasted ChatGPT excerpts, with a conversation link and provenance. Select text or use Send as task, review the instruction, and choose recipients. Consumer ChatGPT opens in your browser; conversation synchronization is not implemented.
- Logs: follow a UTF-8 file, pause, and filter lines. Reads are bounded to the last 128 KiB. Activity is a separate searchable structured event stream, exportable as JSONL.
- Search: the Search tab (also Ctrl+Shift+F) searches three histories side by side: every terminal's bounded output buffer, structured workspace activity, and chat transcripts from Codex, Claude Code, Grok, Gemini CLI, Copilot CLI, Cursor, Windsurf, Continue, Cline, opencode, Aider and Zed. Transcripts are read from folders those tools already write to. Nothing is uploaded, and each source can be switched off.
- Build prompts: drag files into the agent composer to insert their absolute paths, or press Alt+V to save a clipboard screenshot and insert its path. Ctrl+V remains a normal text paste. Composer drafts, including attachments, are saved in SQLite and locally, so a crash does not lose a prompt in progress.
- Prompt queue: Hold keeps a prompt in the workspace instead of sending it. Held prompts survive restarts and can be edited, copied, deleted or explicitly re-queued; interrupted submissions appear in Needs you. Recovered CLI drafts and Tab-queued follow-ups can also be edited, held in the queue, or restored into an idle prompt without submitting it.
- Needs you: Tools → Needs you is one modal over the workspace listing approvals, uncertain deliveries, interrupted tasks and held prompts, with inline responses and a link to the exact terminal. It can open itself when new work arrives.
- Change summary: review the files an agent changed with Git status, per-file additions and deletions, and a read-only diff drill-down. TermSanity never stages, commits or discards changes.
- Notifications: optional Windows toasts and a customizable sound (any
.wavor.mp3, or the built-in chime) when an agent finishes, fails, needs approval or leaves work for review. Push, email and text switches are visible placeholders and are not delivered. - Appearance: dark, light, or match Windows.
- History password: optionally encrypt activity, planning notes and indexed agent transcripts with a password-derived AES-256-GCM key. Terminal replay, task state and delivery receipts stay readable so recovery never depends on the password. There is no recovery key; a forgotten password leaves the archive unreadable.
- Retention: keep history forever (the default) or prune activity/terminal output and chat transcripts after 7–3650 days. Settings shows the measured archive and can prune immediately.
- File menu: new tab or agent, project, search, needs you, change summary, backup, prune, and bulk actions — stop all terminals, restart stopped shells, pause or resume all agents.
- Connections: drag from a source endpoint's bottom handle to a recipient's top handle. Observe reads recorded activity and task records. Message sends a prompt and records its reply. Delegate assigns tracked work with instructions, status, and a result. Delivery honors the recipient instance's mode. A sender can read replies to its own requests without broader Observe access. Arbitrary terminal control cannot be granted.
- Tests: add a Tests tab to discover and run package.json scripts, stream/filter output, stop, review history or send a failure to an agent. The project can opt into a smoke script on open. Saved tails/history survive controller restart; interrupted runs are marked for review instead of claiming a result.
- Problems and Symbols: add Problems for diagnostics and symbol navigation (definition, references, hover). TypeScript/JavaScript use the project's TypeScript or the bundled copy; Python/Rust require working PATH language servers. Server readiness and failures stay visible. The view summarizes up to 120 source files, with live saved-file updates. See how language tools work for scope, agent access and current verification.
- Browsers: contained Chrome/Edge panes use workspace-owned profiles and CDP screencasts. Link one agent per pane, then configure allowed hosts. Supported managed clients can read, navigate, snapshot accessibility refs, click/type, wait, capture JPEG screenshots, inspect console output and upload project files. The pane includes screenshot previews, download progress/reveal, a native file picker and explicit clipboard paste. Agent document navigation/redirects and password/payment inputs are guarded; manual browsing remains available. These are separate profiles from your signed-in desktop browser.
- Terminal resize: size changes settle before one changed cell size reaches the PTY. Inline agents can rebuild their transcript without showing it scroll past: the previous viewport stays visible until the repaint is ready. Output recording, device queries and input stay live; typing or scrolling reveals the current screen immediately. Different views restore their own dimensions on focus.
- Sidebar: show or hide the project/session list with the single toggle at the left of the workspace header, or use View/the command palette. The icon rail stays available, and visibility is remembered.
- Full screen:
F11toggles the native window's full-screen state. The titlebar button, View menu and command palette expose the same action. It works independently in detached pane windows. - Focus mode:
Shift F11hides the titlebar, project sidebar, navigation and status bar while retaining pane controls and nested tabs. It works windowed or together with full screen. A compact bar always provides Exit focus, Full screen/Windowed, menu visibility and current-pane controls.Ctrl Bshows/hides the menu only in focus mode; elsewhere it reaches your terminal normally. CLI Escape remains available without leaving either mode. - MCP: managed Codex, Claude and supported OpenCode launches receive scoped TermSanity tools. OpenCode uses a generated per-instance config; global config is untouched. The header shows connected only after a real tools request. Freebuff 0.2.36 remains usable as a CLI but lacks a verified per-instance MCP config override, which the pane explains. Settings → Agent tools controls call budgets and manual MCP JSON. The graph enforces permissions; managed/manual tokens are separate. Restart a CLI to refresh its launch config after a port change.
- Recovery: the shield icon shows recovery policies. Eligible ordinary shells can relaunch after Windows restarts. Settings also supports Windows sign-in startup and a consistent SQLite backup.
- Diagnostics: the service appends to a rotating
service.login its data folder and records uncaught errors there, so a crash leaves a trail. Settings → Recovery & storage → Copy diagnostics puts the version, runtime, workspace counts and the log tail on the clipboard. Terminal toolbar buttons offer per-terminal text size and compact controls; Settings → Appearance sets the workspace font default.
The status bar counts running terminals in the selected project. Connection trouble appears as Reconnecting to terminals…. The app has no decorative LOCAL or healthy-service badge. Updates retire unused placeholders from early builds while preserving explicitly created agents and those with launch history, tasks, or connections.
| Failure | Behavior |
|---|---|
| UI closes or crashes | Detached hosts and the controller continue. Reopening restores saved views and bounded output. |
| Controller crashes | The supervisor restarts it. Independent hosts keep the same ConPTY processes. The UI reauthenticates and reconnects. |
| Cached runtime is missing or damaged | Startup verifies bundled files against the executable's SHA-256 manifest, extracts a separate repaired copy and replaces an idle controller. Existing runtime folders and independent terminal hosts are retained. Active tests, browser panes, CLI installation or structured work block replacement with a reason. |
| CLI delivery was running | A surviving host continues its turn and reconciles its durable receipt. If submission is ambiguous or its host is lost, the attempt needs review and is never silently replayed. |
| App Server task was running | It becomes interrupted after controller recovery. The agent pauses; retry is explicit. |
| One host crashes | Its execution cannot be restored. Other hosts continue. Its session and active work require recovery. |
| Windows restarts or loses power | Processes cannot survive. Eligible ordinary shells relaunch in the last reported folder, with a restarted notice. Previous commands are never replayed. |
PowerShell prompt integration reports the current folder. Other programs retain the initial folder unless they emit OSC 7 markers. Replay is bounded output history rather than a full saved terminal or process state. Additional pane windows share the same pane and use single-owner input. See operations and recovery.
Requires Node 22.13+ (tested with 22.22.3), Rust, Visual Studio C++ build tools, and WebView2.
npm ci
npm run desktop # native app + Vite + independent service
npm run dev # browser development harness
npm run dist # portable Windows executablenpm run check
npm run build
npm test # real ConPTY, routing, and recovery tests
npm run dev:ui # leave running for the browser tests
npm run test:ui
node tests/native-smoke.mjsTERMSANITY_DATA selects an isolated data directory; TERMSANITY_ROOT sets the initial project's root. Tests use .test-data. tests/real-cli-smoke.mjs is an opt-in read-only model turn through the installed Codex CLI and requires a trusted test folder and signed-in account; tests/real-cli-launch.mjs <opencode|freebuff> drives either TUI through the service the same way. See validation.
app-icon.svg is the shared source for the frontend mark, Windows taskbar/window icon, and tray. Production builds regenerate the native PNG/ICO assets from this SVG.
The React/TypeScript UI uses xterm.js and React Flow. Tauri launches a detached per-user Node supervisor. Each ConPTY host runs independently. SQLite uses WAL, FULL synchronization, integrity checks, append-only events, FTS search, atomic queue/idempotency writes, and layout revision checks.
Data defaults to %LOCALAPPDATA%\TermSanity. Pasted screenshots are copied to attachments/ in that folder because the webview does not always reveal a clipboard file's original path. Loopback RPC and WebSockets require authentication and validate browser origins. Terminal replay is limited to 512 KiB per session. Chat indexing reads at most 400 files per source per pass, and encrypted transcript search decrypts a bounded recent window and reports when it truncates. Recognized token patterns are redacted, but arbitrary sensitive output may remain. Provider login credentials stay with the installed CLIs. TermSanity keeps private scoped communication tokens in host records and token hashes in SQLite. The app saves logical prompt text, including unsubmitted CLI drafts and Tab-queued follow-ups, to provide input recovery. It does not keep a raw keystroke log. These saved texts are part of private workspace data and database backups.
Hosted checks exercise installed Codex and Freebuff TUIs with synthetic loopback backends. Freebuff 0.2.36 accepts automatic multiline paste and Enter, renders a streamed response, and returns it in a completed task receipt. A backend-only random reply token prevents an echoed prompt from passing. This is terminal compatibility testing; no live Freebuff or Claude account inference is claimed. Claude launch flags and hooks use documented interfaces, with backend and UI regressions for approvals and exact resume. opencode and Freebuff are detected from their boxed prompt; OpenCode receives managed MCP tools, while Freebuff currently has the isolated-config limitation described above. Neither has a completion hook, so automatic delivery completes when the working indicator clears and the screen settles. Freebuff session confirmation and retry dialogs show Needs input. opencode keeps the submitted prompt visible in its box after a turn, so an empty prompt is not required. opencode launches with OPENCODE_DISABLE_AUTOUPDATE=1, because its self-upgrade reinstalls through npm while the running binary is locked, which fails half-applied and hides the prompt behind an update dialog. A visible provider error fails the delivery, and a turn that stays silent is marked for review after five minutes (TERMSANITY_CLI_WATCHDOG_MS tunes this). Custom CLIs require a recognizable input prompt, bracketed paste, and either a completion hook or a visible busy-to-ready transition. Compatibility depends on the CLI. Provider activity reports drive Codex status; unsupported CLIs fall back to their prompt display. Unknown activity stays Unknown. The configured CLI arguments control approval and sandbox behavior.
The original specification includes later features. Real OS power loss, unattended upgrades, broad WSL/SSH reconnection, and uninstall/reinstall continuity need broader testing. API-backed planning chat, task dependencies, lessons/versioned instructions, restoring additional windows automatically, and off-machine notification delivery (push, email, text) are not implemented.
Release and update workflow: updates. Feature scope: roadmap. Validation gates: validation. A local build is produced by npm run dist; publication uses the reviewed version tag and GitHub workflow.
Implementation references: Tauri sidecars, node-pty, React Flow, Codex App Server, Node SQLite, Codex notifications, Claude hooks, and Codex MCP.