Session Management

Create, manage, and monitor AI coding sessions.

Sessions are the core of AgentOS. Each session is a terminal running an AI coding assistant like Claude Code, Codex, or Aider.

Creating Sessions

Click + New Session in the sidebar:

  1. Select agent - Claude Code, Codex, Aider, etc.
  2. Choose directory - Browse and select your project folder
  3. Optional settings:
    • Assign to a project
    • Enable git worktree for isolated branch
    • Set a custom system prompt
    • Choose a specific model

Quick Create

For faster session creation:

  • Double-click a project to create a session with that project's defaults
  • Use the quick switcher (Cmd+K) and type "new" to create a session

Session Status

AgentOS monitors sessions in real-time and detects their status:

StatusIndicatorMeaning
RunningGreenAgent is actively working
WaitingYellowNeeds your input (approval, Y/n prompt)
IdleGrayNo recent activity
DeadRedtmux session no longer exists

How Status Detection Works

AgentOS scans terminal output for:

  • Waiting patterns - [Y/n], approval prompts, "Continue?" questions
  • Busy indicators - "thinking", spinners, "esc to interrupt"
  • Activity spikes - Distinguishes bursts from sustained work

A 2-second cooldown prevents false "idle" detection when agents pause briefly.

Notifications

Get alerted when sessions need attention:

  1. Click the bell icon in the header
  2. Enable browser notifications
  3. Choose to enable sounds (optional)

You'll receive a notification whenever any session enters "waiting" status. On mobile, this works even when AgentOS isn't the active tab.

Resume & Fork (Claude Code)

Claude Code sessions support two unique features:

Resume

Pick up exactly where you left off:

  1. Click the session menu (⋮ or long-press on mobile)
  2. Select Resume
  3. Claude continues with full conversation history

AgentOS auto-detects Claude session IDs from ~/.claude/projects/, so resume works even after server restarts.

Fork

Branch a conversation to explore alternatives:

  1. Click the session menu
  2. Select Fork
  3. A new session starts with the same conversation context

Both sessions continue independently. Great for:

  • A/B testing different approaches
  • Exploring a risky change without losing the stable version
  • Letting an agent continue while you try something manually

Multi-Pane Layout

Desktop

Run up to 4 sessions side-by-side:

  • Drag the dividers to resize panes
  • Each pane can have multiple tabs
  • Click a session to open in current pane
  • Cmd/Ctrl+click to open in a new pane

Mobile

Single-pane view with quick switching:

  • Bottom tab bar shows 3 recent sessions
  • Tap to switch instantly
  • Swipe from left edge to open full session list

Tabs

Each pane supports tabbed sessions:

  • Click session - Opens in current pane's tabs
  • Click tab X - Close that tab
  • Drag tabs - Reorder within pane

Tabs let you keep multiple sessions ready without using multiple panes.

Session Groups

Organize sessions into collapsible folders:

  1. Right-click a session (long-press on mobile)
  2. Select Move to Group
  3. Create a new group or select existing

Groups appear nested under projects:

📁 My Project
   📂 Features
      └─ Auth module
      └─ Dashboard
   📂 Bug fixes
      └─ Fix #123

Click group headers to collapse/expand.

Bulk Operations

Select multiple sessions for batch actions:

Selection

  • Shift+click - Select a range
  • Cmd/Ctrl+click - Toggle individual sessions
  • Long-press (mobile) - Enter selection mode

Actions

With sessions selected:

  • Delete Selected - Remove all selected sessions
  • Move to Project - Batch reassign
  • Move to Group - Batch organize

Session Menu

Access session actions via the menu (⋮ button or long-press):

ActionDescription
ResumeContinue Claude session (Claude only)
ForkBranch conversation (Claude only)
RenameChange session name
Move to ProjectReassign to different project
Move to GroupOrganize into group
Create PROpen PR for worktree branch
Kill SessionTerminate the tmux session
DeleteRemove from AgentOS

Session Persistence

Sessions persist across:

  • Browser refreshes - Just reload, session keeps running
  • Server restarts - tmux maintains sessions independently
  • Device switches - Start on desktop, continue on phone

This is possible because each session runs in a tmux session (claude-{uuid}, codex-{uuid}, etc.) that lives independently of the web UI.

Importing Existing Sessions

If you have Claude Code or other agents already running in tmux, AgentOS can import them:

  1. Sessions matching the pattern {agent}-{uuid} appear automatically
  2. Or manually add sessions via the import feature

Session Data

Each session tracks:

  • Name - Display name (editable)
  • Agent type - Claude Code, Codex, etc.
  • Working directory - Project path
  • Status - Running, waiting, idle
  • Claude session ID - For resume/fork (Claude only)
  • Worktree info - Branch, port, PR status
  • Parent session - If spawned by a conductor
  • Timestamps - Created, last activity

This data persists in SQLite and enables features like status detection and conversation resume.