Skip to content

Attaching to tmux sessions

Every row in the session list (agent sessions, workspace shells, and external sessions under Other tmux) is backed by a real tmux session. ainb gives you two ways to attach:

  1. Full-screen attach (a): The TUI suspends and the standard tmux client takes over your terminal.
  2. In-pane attach (A): The preview pane becomes a live embedded tmux client inside ainb.

Leaving either mode never kills the session: detaching only disconnects the client, and the agent continues running in the background.

Full-screen attach (a)

Full-screen attach: 'a' suspends the TUI into the real tmux client, a command runs inside the session, Ctrl+B d detaches back to ainb

Press a on any selected session. The TUI suspends and tmux attach-session fills the entire terminal. You have access to the full tmux status bar, prefix keys, copy mode, and scrollback.

s open the session list
a full-screen attach: TUI suspends, tmux takes terminal
echo FULLSCREEN_OK ⏎ executed inside the session
Ctrl+B d detach: ainb resumes, session continues running

Use full-screen attach when you want to work inside a session for an extended period.

In-pane attach (A)

In-pane attach: Shift+A turns the preview pane into a live embedded tmux client with an INTERACTIVE badge

Press A (Shift+A) to turn the right preview pane into an interactive terminal in place. An INTERACTIVE badge appears and all keystrokes route directly into the session.

s open the session list
A in-pane attach: INTERACTIVE badge, embed fills the pane
echo INPANE_OK ⏎ executed inside the embedded session
Ctrl+Q release: badge clears, read-only preview restores

While active, Ctrl+Q is the reserved shortcut to release keyboard focus back to ainb. Press B to collapse the left sidebar for extra terminal width.

Use in-pane attach for quick interventions: answering prompts, confirming commands, or clearing errors without leaving the session list.

Comparison

FeatureFull-screen (a)In-pane (A)
SurfaceWhole terminal (TUI suspends)Right pane (ainb remains visible)
Visual indicatorFull tmux status bar● INTERACTIVE badge on pane
Exit commandCtrl+B d (standard tmux detach)Ctrl+Q
Return stateResumes TUI session listReturns to read-only live preview
Session survivalSurvives disconnectSurvives disconnect

Keyboard controls

KeyAction
aFull-screen attach to selected session
AIn-pane embedded attach
Ctrl+B dDetach from full-screen session
Ctrl+QRelease in-pane embed back to TUI
1 to 9Quick-attach using row index badges
BToggle sidebar to expand pane width

Next steps