Terminal mode
Terminal mode is the regular Code view with a terminal session where the thread was. Turn it on with Terminal in the status row under the prompt. While it is on, that button reads Thread: press it to go back to the thread. The icon at the top right of the session does the same: it switches between the thread and Terminal, like the bottom-right control. A terminal session’s card in the Code overview, and the session panel’s Terminal row, turn it on too.- The session line at the top shows the session’s name, then
zshand the repo and branch for a shell, or the bot’s address for a Terminal bot. With the left rail collapsed, it starts after the window’s back, forward and sidebar buttons. - The session fills the rest of the view. On Desktop it is always dark, in light and dark mode, like the terminal cards in the Code overview. The prompt and status row sit on the same dark surface, and the prompt’s dashed frame stays visible on it.
- The prompt types into the session. What you run goes to the shell (or the bot’s CLI) as a line, followed by Enter. You can also click the session and type in it directly.
- A Terminal bot opened from the overview is shown as the session. Shell on the session line goes back to your own shell.
- The same panes and session panel as the thread. Terminal, Changes, Browser, Computer, Files, Artifacts, Transcript, Tasks, Code map (with local gizzi) and the project’s own panels open beside the terminal session from the same toolbar, and Session details docks on the right. As in thread mode, panes need a session: the new-thread screen has none.
- No computer connected (for example ai.allternit.com with no computer paired) shows Not connected with a Connect button instead of an error.
- On a cloud computer terminals work the same way as on your Mac when its image has the Factory pane engine: they keep running when the computer’s
allternit-noderestarts, and they show titles and previews. On an older image they still work, but they end whenallternit-noderestarts (details).
Switching sessions
The session switcher sits at the top right of the Code view, in the session header (or, before the first message, in the tools at the top right). It follows the mode:
See all at the bottom opens the Code overview on that kind, in List, Grid or Deck. See Session overview.
On a phone, the count button in the header does the same: in the terminal it opens the overview on Terminal sessions.
On a phone, the terminal is always one shell at a time with a strip of tabs. See Code on a phone.
Coding agents in the terminal
When a coding agent runs in a Code terminal, Allternit hides the agent’s own input box and its composer drives the agent instead. This covers Claude Code, Codex, Kimi, Antigravity (agy), opencode and Gizzi. Grok and Qwen show the full screen. See which tools work how.
- The composer reads “Message <agent>…” (for example “Message Claude Code…”). What you send is typed into the agent and submitted.
- A chip on the composer’s top edge shows the agent and its state: Idle, Working or Needs you. While it works, Stop (Esc) interrupts the turn.
- Permission and choice prompts become buttons. Yes, No or the numbered options replace the agent’s dialog, and a click presses that key (or moves the selection) in the agent.
- A mode button in the bottom bar shows the agent’s own mode (such as Bypass permissions or Plan mode). A click cycles it, the same as Shift+Tab in the agent.
- Slash and @ menus still open, just above the composer, because what you type is mirrored into the agent as you type.
- A screen Allternit does not recognise shows the full terminal, including the agent’s own box. Nothing is hidden when Allternit cannot tell where the input box is.
exitbrings the full shell back. When the agent quits, the composer returns to the normal terminal prompt.
Tabs, the Terminals menu and live cards
- Tabs (Desktop). Each terminal is a tab. New opens another terminal and Close ends one. A tab takes the agent’s name once it runs, for example “Claude Code”.
- The Terminals menu (the switcher at the top right in Terminal mode) lists Your shell, your Terminal bots and every terminal, each with its title, folder and status (Working, Needs you or Idle), such as
claude · allternit-platform · Working. A row opens that exact terminal, with its history. The menu is fully opaque. - Live cards. In the Code overview, every terminal, plain shells included, is a live card in List, Grid or Deck: its title, folder, the agent and its state, and the last lines of the screen above the agent’s input box. A runtime that cannot list terminals still shows “Terminal session”. The cards update only while the overview is open.
- On this Mac. The menu, the overview and the phone sessions sheet also list every agent session running outside Allternit (Terminal, iTerm2, Ghostty), with Move here, Open a copy and New session here. See Move a session into Allternit.
Delete, reuse and names
- Hold to delete. In the Terminals menu, the overview and the tabs, hold Delete (or Close on a tab) until it fills. A quick click does nothing. Deleting ends the shell. A Terminal row in a list or grid says Hold to end and delete; press and hold the row or card to do it.
- Recents. Terminal sessions and Code sessions show in the shell rail’s Recents in every mode.
- One shell per place. Opening a terminal where one is already running and idle attaches to it. It no longer starts a second zsh each time. Each session is labelled with where it was opened.
- Readable names. A session never shows its raw default name (“New session - 2026-11-18T04:47:31.282Z”). It shows the first prompt, or “New session · Nov 17”.
- No stray characters. Reports a terminal sends back on its own (cursor position and colour replies) are not typed into the shell, so
3R30;no longer appears at a prompt.
Harness support
Move and Open a copy keep the flags the old process was started with (such as
--dangerously-skip-permissions). A Qwen started without a session id on its command line, or any session whose id was not found, cannot move or copy; New session here still works. Details: Live agent sessions.
Prompt
In Code, the prompt is one input line in a dashed frame across the whole width of the Code view. On the line: + (attach),❯, the text you type, voice and run. On the frame’s top edge, the prompt cache’s state (cache warm, cache expiring or cache cold) is at the left, and the model with its status dot is at the right. The cache state shows only when the provider reports it. As you type more, the line grows upward (up to about ten lines). Press Enter to run, Shift+Enter for a new line.
Directly under the line is the status row:
Under the status row, a usage line shows the last run: tokens in and out, the cached share and the cost, such as
52.8k in · 152 out · 88% cached · $0.03. A phone leaves out tokens out. It shows only what the provider reported, and it hides when there is no run yet.
Context bar position. Click the context meter to open the usage panel, then set Context bar to Bottom (the blocks in the status row, the default) or Above (a thin bar on its own line just above the prompt, with the percent at its end). The bar turns amber at 75% and red at 90%, and a plan limit near its end also colors it. Click the bar to open the same panel. The choice is kept on this device.
Before a session starts, the computer and repo open pickers. In a running session the repo and branch are plain text, because the session’s folder is fixed. Chat and other modes keep the rounded composer.
Console drawer replaced
The old bottom Console drawer is gone (2026-10-28). Its shell tab is Terminal mode above. In its place is the system drawer, a developer tool turned on in Settings → Developer: Needs you, Bots, Running and Problems across every session and mode, opened with ⌘J, the dot on Gizzi or the menu bar menu. The preview pane’s View session activity link went with the old drawer.Background
Code mode can show the same moving background as bot chats. Each workspace can have its own: the brush button in the session toolbar lists the looks, and on phones it is Background in the pane menu. In the iPhone app, tap the session name at the top and pick Background. A look picked there applies to that workspace only. Same as Settings follows Settings → Appearance → Background, which shows in Code only when Show on → Code mode is on (off until you turn it on). It plays behind the session view, but not on the canvas board or while Terminal mode is on, and the shell rail beside it wears the same background. ASCII looks sit under a stronger veil here so code and text stay easy to read. See Stage backgrounds for the looks and options.For developers
- Terminal mode:
src/views/code/CodeTerminalCanvas.tsxandcode-terminal.css(.code-terminal-dark,.code-terminal-session-line). On Desktop it renders the session line, then oneTerminalSurface(dark scheme), orBotSession(the bot’sPaneMirrorView) after afactory-attach-panerequest. CodeCanvas renders it in place of the thread and keeps the session header, prompt and status row; the prompt dock gets.code-terminal-darkwhile it is open. With no runtime (useRuntimeAvailable) it shows Not connected. - Open state and input:
useCodeTerminalStoreinsrc/views/code/code-terminal.store.ts(open,toggle,openCodeTerminal(),sendInput). The open session setssendInput;handleSendinCodeCanvas.tsxhands the prompt to it (shell:sendTerminalInput(id, text + "\r"); bot:sendPaneInputviaterminalDataToPaneInput). The status row’scode-bottom-status-terminalbutton (CodeTerminalButton) toggles it and reads Thread while open. Factory bot attach (src/components/factory/pane/attach.ts) andMultiTabTerminalcallopenCodeTerminal(). - Session switcher:
src/views/code/CodeSessionSwitcher.tsx(code-session-switcher). It readsuseCodeTerminalStore.openfor the kind, listsuseModeOverview("code")rows, setsuseCodeTerminalStore.botIdfor a Terminal bot with a live pane (elseopenOverviewItem), and See all callsrememberOverviewLayout("desktop:code", layout), setsuseCodeOverviewKindand openscode-threads. It sits inCodeSessionHeaderand, before the header shows, inCodeTopRightTools(code-top-right-tools,CodeThreadView.tsx) with the session toolbar (CodeSessionLauncher placement="inline") or the canvas toggle.CodeTopRightToolspublishes its width as--code-floating-tools-w, which the session line uses as right padding. Phone:PhoneOverviewButton kind. - Terminal hygiene:
UnifiedTerminal.tsxdrops xterm report replies (CPR, DA, OSC colour) unless the view is the focused interactive one and not replaying scrollback.UnifiedTerminal.tsxandCodeTerminalCanvas.tsxreuse an existing idle shell for the place before starting one. Names come fromsrc/lib/sessions/session-display-title.ts. Delete and Close use the shared hold-to-confirm button. - Collapsed rail:
.code-terminal-session-line[data-at-top](launchpad) andCodeSessionHeaderpad by--titlebar-controls-wunder[data-rail-collapsed=true]. - Dashed frame:
.code-terminal-darksets--polish-hairline/--polish-hairline-strongforcomposer-terminal-input. - The shown Terminal bot is
useCodeTerminalStore.botId(null = your shell). The Gizzi companion sits above the prompt line (bottom: 100%) and hides in Terminal mode. - The
<ConsoleDrawer />mount insrc/shell/ShellApp.tsxis commented out, not deleted. - Mounts:
src/views/code/CodeCanvas.tsx(launchpad and conversation). Both drop their padding whileterminalCanvasOpenis true; the dockedCodeSessionPanelstays available. - iPhone app:
surfaces/allternit-mobile/ios/Features/Code/CodeComposer.swift(CodePromptEdge,CodeContextBar,CodeRunUsage). Usage comes from the chat stream’s finish frame, so the app shows it only for runs in the open session, not for threads loaded from history. The preference isallternit-code-composer-context-bar. - Prompt:
src/views/chat/ChatComposer.tsx,codeTerminalbranch.composer-terminal-linestackscomposer-terminal-edge(the frame’s top edge, drawn in segments so a background shows through:composer-terminal-cache, thenmodel-picker-trigger),composer-terminal-input(attach, text, voice, run),composer-compact-controls(the status row) andcomposer-terminal-usage. The last run’s numbers come from the newestmetadata.telemetryin the session (src/views/code/code-composer-status.tsx), and the position preference isuseCodeComposerPrefs(allternit-code-composer-v1).ComposerContextBarinsrc/components/usage/ContextUsage.tsxreplacesComposerUsageMeterwhen it is Above, and both takepanelFooterforContextBarPlacement.bottomDockContentfills its left side (CodeBottomStatusBarwithCodeWorkspaceBarasleading), andbottomDockTrailingits right end (CodeTerminalButton). The textarea auto-grows from 24 to 200 px. - Agent composer:
src/lib/terminal/agent-frame.tsreads the visible rows of the terminal and returns anAgentFrame(agent,hideFrom,status,dialog,mode) ornullfor an unrecognised screen;agentNameFromnames the agent from the screen or terminal title.src/views/code/agent-composer.tsxdraws the status chip, Stop, the dialog buttons and the mode button, and the composer placeholder. The Swift and Kotlin ports (Features/Code/AgentFrame.swift,feature/code/.../AgentFrame.kt) are checked against the shared fixture corpus insurfaces/allternit-mobile/agent-frame-fixtures/; the TypeScript fixtures aresrc/lib/terminal/__fixtures__/agent-frame/. - Terminals menu, cards and On this Mac:
src/views/code/terminal-sessions.store.ts(useTerminalSessions,useTerminalSessionsPolling,selectAgentFor,selectExternalSessions),src/lib/agents/live-sessions-api.ts(listLiveSessions,adopt,getAdoptJob),src/components/session-overview/TerminalPreview.tsxandsrc/views/code/OnThisComputerRows.tsx. Terminals are paired with Terminal bot panes bypane_idon/terminal/list.