docs DocsCapabilitiesGitHub
Guides / Sessions
Guides / Sessions

Sessions

When you run aide in an interactive terminal, aide stays between your terminal and the agent for the whole session. That lets you change what the agent may do without quitting it, control the session from another pane, and come back to it later.

The sandbox of a running agent never changes. Every change on this page is staged first, confirmed by you, and applied by restarting the agent into a fresh sandbox with the conversation resumed.

To run the agent directly, without the session host, pass --no-session-host.

The in-session modal

Press Ctrl+B then m, or Ctrl+], while the agent is running. A modal opens over the dimmed terminal. Press 1 to 4 to switch tabs and Esc to close it.

Ctrl+O opens the full aide config dashboard from the modal.

Pressing Ctrl+B twice sends one Ctrl+B to the agent. All of these keys can be changed or turned off; see Preferences.

Change permissions and restart

  1. Open the modal. When the agent has just been denied a path, aide has already found it in the terminal output and offers the matching capability or path grant. Press Tab to stage it.
  2. Or select what you need on the Permissions tab: a capability, a path, a guard, the network mode.
  3. Confirm. aide shows what will change. Press y or Enter to confirm, s to change the scope, n or Esc to go back.
  4. aide checks the new policy and config, then restarts the agent in a fresh sandbox and resumes the conversation.

Switching to another agent on the Runtime tab starts a fresh conversation, because a conversation belongs to the agent that held it.

What each capability grants is in Capabilities; guards and network modes are in Sandbox.

See what is running

aide session list

This lists every active session with its PID, agent, profile, project root, terminal and panes. With none running it prints:

No active aide sessions.

aide session inspect prints one session’s live policy, capabilities, guards and staged changes. See aide session.

Control a session from another pane

aide restart --with docker

Run from a second terminal in the same project, this adds the docker capability to the running session, asks you to confirm with [y/N], and restarts the agent in place. Without --with it reloads the config from disk and restarts.

Without a target flag, aide matches the session by the directory you run the command in, and lists the candidates when several match. To name one, pass --pid, --pane or --cwd; the order they apply in is under aide session.

To prepare a change and review it before the restart:

aide session stage --with docker --open-tui   # stage it and open the modal on the session
aide session apply                            # or confirm and restart from here
aide session discard                          # or drop the staged change

stage takes the same kinds of change as the modal: capabilities, paths, network, guards, gateway, agent and scope. The flags are listed under aide session stage.

A restart always needs a person. aide restart and aide session apply ask on a terminal other than the session’s own. From a script, or from the session’s own terminal, they exit with code 78 unless a terminal integration supplies the confirmation (see Terminal multiplexers). The agent inside the sandbox cannot reach the control socket at all. See aide restart and aide session apply.

Resume a session

aide --resume

This resumes the latest session for the current directory. To resume a specific one, pass its ID: aide --resume <id>. The flag is described under aide in the CLI reference.

aide --resume is aide’s own flag. Arguments after -- go to the agent unchanged, so aide -- --resume passes the agent’s --resume flag instead.