Agent Servers
Web terminal
Every Layerbase Agent Server has a Terminal tab: a real login shell on the server, as the ubuntu user, right in the dashboard. There is no SSH key to create, no local terminal to configure and no host key to trust. It is the quickest way to run a command, finish an agent's sign-in that asks you to paste a code back, or hand an agent a screenshot.
Agent Servers, including the web terminal, is in beta as part of the early adopter program. SSH and your editor's remote connection work alongside it.
Opening a terminal
- Open the server in the dashboard.
- Choose the Terminal tab. If no session is selected, the session picker opens so you can create or resume one.
- On a phone, a running server opens on Sessions unless the link names a tab or session. Opening this way never reconnects a session by itself: your open tabs stay listed, and a session connects only when you tap it, so a desktop browser or SSH client using it keeps control until you do.
- Type as you would in any terminal.
Project shortcuts
Open Sessions to resume active work or start a new session. On desktop, the overview has sortable repository, session, agent and status columns. On mobile, sessions appear as cards with large Resume buttons. The New session shortcut takes you straight to repository selection.
Recent and pinned repositories appear first. Only home checkouts under ~/dev appear as repositories. Agent worktrees stay grouped under their parent repository, with a worktree folder label on each session. Choose a repository, then Codex, Claude or Open shell. Available agents depend on the installed server tools. A shell opens the folder without starting an agent. At an existing shell prompt, Use this folder in current shell inserts a command for you to submit with Enter. Pins and recents are remembered in this browser for each server.
Repository icons use recognized manifests when Files access is available, or a neutral repository icon otherwise. Accent colors stay consistent for each repository. Session dots distinguish Attached here, Attached elsewhere and Detached. An agent logo identifies the foreground tool; it does not mean the agent is working. Busy or waiting state is not currently reported.
Sessions you use in this browser appear most recently used first. Explicit resumes, tab selections and sent terminal input update this local history. Output, polling and automatic reconnects do not. Sessions without local history follow in server order. This ordering does not include activity from SSH or other browsers; desktop column sorting overrides it.
On phones, Sessions and voice controls stay in a bar near the bottom of the visible screen, and a floating Keyboard control sits near the top right of the terminal. Drag its handle to move it away from other controls; its position is saved in this browser per server and stays inside the visible viewport as the keyboard opens. With the handle focused, arrow keys move it and Home restores its position. Its settings offer Show when I tap, Keep open and Keep closed. With Keep open or Keep closed chosen, the button reads Locked open or Locked closed; tapping it shows or hides the keyboard and saves that as the new setting. Follow typing reveals the prompt on deliberate input. Scrolling the page or terminal pauses following so it will not pull you back. Tap Fit view to align the terminal above the keyboard and resume following. Scroll terminal history opens Up and Down controls and lets you swipe inside the terminal to read; turn it off to scroll the page through the terminal again. History controls use terminal scrolling, never prompt-editing arrow keys. Applications without scrollback or mouse scrolling need their own history controls. These preferences are saved in this browser. Mobile browsers still control the system keyboard; use Keyboard to reopen it after a system dismissal. Secondary terminal actions are under Tools.
In a shell session, New session here offers Codex and Claude buttons for the agents installed on the server (updated server tools required). Each starts a separate session in the same folder and switches to it; nothing is typed into the current shell.
On phones, the section navigation shows Sessions and Files, with the other sections under More. The ... button in the server header opens Server actions & connections: server power controls, a status refresh, and the web terminal, IDE and SSH connection options.
If the tab asks you to update server tools, open the server's Settings tab and run Update server tools once. Agent Servers created before the terminal existed need it to get the terminal service; it takes about a minute and does not restart anything you are running.
Sessions that survive a closed tab
The shell runs inside tmux on the server, so it keeps running when the browser goes away. Close the tab, put the laptop to sleep or lose the network, and the next time you open the Terminal tab you can reopen your named session from Sessions, with long-running jobs still going. No terminal is created automatically. With updated server tools, opening a session transfers control here and detaches its other browser or SSH viewers without restarting jobs.
A dropped connection reconnects on its own. The status line shows Reconnecting while it tries, and a Reconnect button if it gives up. A connection ticket request that takes longer than 15 seconds is retried automatically. If terminal files cannot load, Reconnect tries loading them again.
Use Open terminal in the server header (Sessions on phones) to jump here. The terminal toolbar has connection status, Upload, and a fullscreen control. Fullscreen fills the display and preserves the current session; press Escape or Exit fullscreen to restore it. Use Files in the toolbar or navigation to open the dedicated filesystem browser. The Uploads tab collects files saved in the uploads folder, including screenshots pasted into Terminal. Choose Connect in the server header (the ... button on phones) for web terminal, IDE, and SSH connection options.
The Terminal and Help & shortcuts sub-tabs switch views without closing the session. Help explains tmux sessions, copy and paste, keyboard shortcuts, and copyable approval-mode commands for every supported agent, including codex --approve-for-me. Upload notifications appear at the bottom-right of the page, including in fullscreen, without moving the terminal. A shrinking line shows when a completed upload notice will disappear.
The mouse wheel scrolls the web session through tmux history; press Escape to leave history and return to live input. Keyboard Up and Down still work normally in your agent or shell. For an existing server, update server tools and reconnect the terminal to enable mouse handling. Sessions you switch to manually can have their own tmux mouse settings. Highlight text to copy it to the clipboard on the computer using the browser, including at a plain shell prompt. Copy joins recognized wraps and likely prose continuations near the right edge, keeping paragraphs and list items separate. Wrapped URLs copy and open as one link. Some applications discard wrap information; choose Copy exactly when every original line break matters, or Copy as one line to remove them all. These options are in the toolbar Copy menu and the right-click menu, which also includes Paste. Hold Ctrl or Cmd when clicking to send mouse input to the terminal application.
Choose Sessions in the Terminal toolbar to open a unified overview of active sessions. Resume returns to the same work. The row menu offers Rename session, Close view (keep running) for open tabs, and Stop session. The pencil beside a terminal tab opens a full-size rename form on phones. Agent labels require updated server tools; Unknown means the foreground application was not identified. Sessions opened over SSH appear here too. Open tabs and your selection survive a page reload. Selecting an already open session reuses its tab. Close the picker to return to Terminal without creating anything. Up to 32 sessions can be managed here.
The address bar includes the selected session, so you can bookmark it or reopen it from your phone. You still need access to the server. A session link takes priority over your saved tabs. Invalid links show a notice above the session list so you can choose one; ended sessions never silently open a new shell. If a session is still running, Resume returns to it without restarting its jobs. This can transfer control from another browser or SSH connection.
To end a session's jobs, close its terminal views in browsers and SSH clients, choose Stop session from its menu, then confirm. Stop is unavailable while another client is using the session. Closing a terminal tab does not stop its session. If a session has ended, choose a repository to start a new session or reopen an existing one. New sessions use the repository name or Shell; rename them afterward. Every tab can be closed; choose Sessions to reopen one or create another. Older servers need Update server tools; the terminal service must also support session controls.
Running agents unattended
Your session stays running
Each session keeps your shell and agents running on your server when you close a browser or terminal view. Reopen the session from Sessions to pick up where you left off. The server must stay on; stopping or restarting it interrupts running processes.
Scroll to browse terminal history and press Escape to return to live input. You can also attach to the same session over SSH.
Keyboard shortcuts
On mobile, use Keyboard or Hide keyboard in the bottom action bar. Mobile terminal settings lets you keep the keyboard open or closed. Follow typing brings the latest output and prompt back above the keyboard when you type. Browser keyboard behavior varies; use the Keyboard button if your phone dismisses it. Tap Shift, Ctrl or Alt and then a key. Modifiers apply once and reset when the session or connection changes. More keys includes Home, End, Page Up, Page Down, Delete and F1-F12. Function-key actions depend on the application running in the terminal.
Highlight terminal text to copy it automatically to this computer's clipboard when you release the mouse. This works at a shell prompt and inside agents. Copy joins recognized wraps and likely prose continuations near the right edge, keeping paragraphs and list items separate. Wrapped URLs copy and open as one link. Choose Copy exactly to keep the original line breaks, or Copy as one line to remove them all. These options are also in the right-click menu alongside Paste. Ctrl+C still interrupts the running command. Ctrl+Shift+C (Windows / Linux) or Cmd+C (Mac) also copies the selection. Hold Ctrl or Cmd when clicking to send mouse input to the terminal application. Paste with Ctrl+Shift+V (Windows / Linux) or Cmd+V (Mac).
Commands such as /copy ask to copy text to your browser clipboard. The terminal shows the request with a preview of the text, and nothing is copied until you press its Copy button. Requests are only accepted while the terminal is visible and focused.
Drag a terminal tab to reorder it. With a tab focused, use Alt+Shift+Left or Alt+Shift+Right. Your browser remembers the order for this server.
- Insert a newline in supported agents.
- CtrlC
- Interrupt the running command.
- CtrlC / C
- Copy selected text.
- CtrlV / V
- Paste text or an image.
- Drag
- Select and copy terminal text to your clipboard.
- Escape
- Exit fullscreen. Otherwise, leave tmux scrollback.
Scroll through history
- + mouse wheel
- Scroll history faster. Inside applications that handle the mouse, each wheel event scrolls about one screen.
- / toolbar buttons
- Scroll terminal history up or down one page without typing into the prompt.
- Escape
- Leave tmux scrollback and return to the live bottom. In fullscreen, Escape exits fullscreen first. Other applications may handle Escape themselves.
Drop or paste files into a connected terminal, or choose Upload. Files are saved to ~/uploads.
Agent approval commands
With Agent permissions set to Automatic (the default), new server shells use these defaults across all repositories. Choose Ask first under Settings, Agent permissions to add no permission flags, so each agent uses its own approval settings instead. Changes reach new shells after the server tools update; create a new session to pick them up.
codex --approve-for-meclaude --permission-mode autocursor-agent --auto-reviewdevin --permission-mode smartgemini --approval-mode=yologrok --always-approveOPENCODE_PERMISSION='"allow"' opencodeAutomatic review can still refuse actions. Gemini, Grok and OpenCode allow tools without a review step. Agent versions, models and account policies may limit these modes. Pass an explicit permission option to override the default, or use command codex (and similarly for other agents) to use the agent's own settings.
Codex: automatic approval review
codex --approve-for-meReviews permission requests automatically. Requests can still be denied, and the sandbox still applies.
codex resume --last --approve-for-meBypass approval prompts
These modes let the agent change files and run commands with your server user's access, including accessible credentials and network services. Use them only for work you trust. Sign-in, setup questions, and account limits can still pause a run.
codex --dangerously-bypass-approvals-and-sandboxclaude --dangerously-skip-permissionsgemini --approval-mode=yolocursor-agent --forceChoose permissions before leaving a run unattended. If a flag is unavailable, update the agent from Agents or check its --help. Other agents have their own permission settings on the Agents tab's documentation links.
If Codex rejects a permission change with "Server is draining", the change was not applied. Wait for the current work to finish, then exit and resume Codex with the command above. Reconnecting this web terminal alone does not restart Codex.
Session help
Run commands from your repository or worktree. This terminal already uses tmux: close the browser tab to leave work running, then reopen it to reconnect. The server must stay on. Ctrl+C interrupts the foreground program; it does not detach. To restart Codex intentionally, wait for its work to finish, use /quit, and wait for the shell prompt before running codex resume. If it says the conversation is still in use, wait for the previous client to close and retry; restarting tmux will not clear Codex ownership safely.
Scroll the mouse wheel to browse the web session's history, then press Escape to return to live input. Drag to select and copy terminal text. If scrolling is unavailable, update server tools and reconnect. A session you switch to manually may have its own mouse settings.
tmux list-sessionsInside this terminal, press Ctrl+b, then s to choose a session. Or switch by name. Replace your-session-name with a name from the list:
tmux switch-client -t 'your-session-name'From a separate SSH connection, transfer control of the same session to SSH without stopping its jobs:
tmux -u attach-session -d -t 'your-session-name'If Codex says a conversation is open in another app, check Sessions for the terminal already running it. Open that session to continue there. Reconnecting tmux does not require resuming Codex again. The codex resume --last command can select a conversation running in a different terminal. To move a conversation to a new terminal, close it in its original Codex client first, then retry. Do not stop every agent process to clear one conversation.
Start, stop, and restart controls are in the server header on every tab. Stop and restart interrupt running tasks. To update Codex, use Update Codex on Overview or Agents. Older servers first need Update server tools in Settings. The update uses the official installer; reopen Codex afterward to run the new version. Updating server tools and updating an agent are separate actions.
Images and files from your computer
A coding agent running on the server cannot read your laptop's clipboard, so pasting a screenshot into an agent over SSH never works. The web terminal closes that gap: drag a file onto the terminal, paste an image into it, or use the Upload button. The file is saved on the server in ~/uploads and its full path is typed at the cursor, without pressing Enter, so the agent's prompt receives it directly.
- Allowed: images (PNG, JPEG, GIF, WebP), PDFs, and text files (plain text and logs, Markdown, CSV, YAML, JSON). Other types are refused before anything is sent.
- Size: up to 20 MB per file and 5 files at a time. The server checks every file again, including that an image really is the image type it claims to be.
- Names: files are saved as
YYYYMMDD-HHMMSS-name.ext, with spaces and unusual characters replaced. An upload never overwrites an existing file. Successful upload notices disappear after six seconds; you can also dismiss them immediately. Click an image thumbnail to open a larger modal preview, including in fullscreen. The preview stays open until you close it or press Escape. Error notices stay until dismissed. - Cleanup: uploads older than 7 days are removed automatically. Files you put in the folder yourself are left alone. If the folder holds more than 200 MB, new uploads are refused until you delete some.
The Upload button appears once the server runs the current tools. If you do not see it, run Update server tools from the Settings tab.
Copy, paste and keys
Links in the output open in a new tab only when you click them. Programs on the server cannot write to your clipboard. On a phone or tablet, Copy and Paste sit at the start of the shortcut row under the terminal, alongside Esc, Tab, arrows and modifiers. Copy is available when terminal text is selected. Paste uses the terminal's paste handling without adding Enter, and requires browser clipboard permission. If access is blocked, use your keyboard's Paste option or allow clipboard access for this site. Mobile use is best effort.
Agent permissions
Each server has an Agent permissions setting under Settings. It decides how supported agents start in new interactive shells. With updated server tools, the Codex and Claude launch buttons use the same setting:
- Automatic (the default): Codex starts with
--approve-for-me, Claude Code in auto mode, Cursor with auto-review and Devin in smart mode. Gemini, Grok and OpenCode allow tools without a review step, so they can change files and run commands with your server user's access. - Ask first: no permission flags are added, so each agent uses its own approval settings, as it would on your own computer. The managed profile defaults
LAYERBASE_AGENT_PERMISSIONStomanualin each new interactive shell without exporting it; a value you set or export yourself still wins.
Saving a change updates the server tools, which rewrites the managed shell profile. It applies to new shells and terminal sessions only; sessions already open keep the mode they started with. In either mode, a permission flag you pass yourself or command codex (and the same for other agents) takes precedence.
Memory protection
Updated server tools put new terminal sessions inside a shared memory budget. Overview and Sessions identify older sessions outside that budget and show their memory use when available. Save the work in each uncovered session, start a replacement in a new session, then stop the old session. Updating tools does not restart existing jobs. Run full builds and checks one at a time on a small server. Root commands and Docker containers can still use memory outside the terminal budget.
Limits
- Up to 3 open terminal tabs per server and 10 across all your servers.
- A tab disconnects after 30 minutes without input or output, and any connection ends after 12 hours. Either way the shell keeps running in tmux. After an idle disconnect, click the terminal or press a key to reconnect. The first key only reconnects; type again once Connected appears.
- Very fast output (a large
cat) is paced so one tab cannot flood the connection. Nothing is dropped; it just arrives at a steady rate.
Security and privacy
- The server opens an outbound connection to the Layerbase terminal service. No inbound port is opened on your server and no SSH key is created for the terminal.
- Each connection uses a single-use pass that is valid for one minute and only for your server. The server checks that pass itself before it starts a shell, so the terminal service alone cannot open one.
- Only the server owner can open its terminal. When access to Agent Servers is removed or the server is deleted, new sessions are refused at once and open ones close within a few minutes.
- What you type and what the terminal shows is never logged or recorded, and neither are uploaded files or their names. We keep only connection metadata (when a session started and ended, byte counts, why it closed) to run the service.
Idle conversation hibernation
Hibernation is rolling out and is off by default. With it enabled and server tools updated, verified idle Codex and Claude sessions may hibernate after 30 minutes detached to free memory. Shells, active tasks, and sessions whose activity cannot be verified stay running. A hibernated session stays in Sessions; opening it resumes its saved conversation in the same folder and memory budget.
Current tab and Switch to tab return to tabs you already opened. Open session attaches to an existing session; Resume conversation reopens a hibernated one. These actions do not create another session. If the saved transcript or folder is missing, the CLI changed, or resume fails, the terminal shows recovery guidance and preserves the saved conversation. Restore the missing resource or resolve the error before retrying. It never silently starts a new conversation.
Troubleshooting
- Underscores instead of symbols: update server tools in Settings, then reconnect the terminal. The updated tmux connection uses UTF-8, including when reattaching to an existing session.
- "The server is connecting to the terminal service": the terminal service starts about a minute after setup or a tools update. The tab picks it up on its own.
- "Too many terminal sessions are open": close a Terminal tab in another browser window and reconnect.
- An upload is refused: check the type and size above. "The uploads folder is full" means
~/uploadsholds more than 200 MB; list it (ls -la ~/uploads), delete the files you no longer need, and try again.
