Skip to content

Sessions

Overview

Sessions are managed through the Flaio terminal UI. Each session runs an AI agent (Claude Code or Gemini CLI) in its own tab with a full PTY terminal.

Creating a Session

Press Ctrl+T inside the Flaio TUI to create a new session:

  1. Select an agent driver — Claude Code or Gemini CLI.
  2. Choose a model (e.g., Claude Sonnet 4.6, Claude Opus 4.6, Gemini 2.5 Pro).
  3. Enter a working directory (tab completion supported).

The agent spawns in the selected directory and is ready for interaction.

Supported Agents

AgentModels
Claude CodeClaude Sonnet 4.6, Claude Opus 4.6, Claude Haiku 4.5
Gemini CLIGemini 2.5 Pro, Gemini 2.5 Flash

Session Lifecycle

Sessions go through the following states:

StateDescription
idleJust started
runningAgent is processing
waiting_inputWaiting for your prompt
waiting_permissionAwaiting tool permission approval
exitedProcess terminated

Session Metadata

Each session tracks:

  • Model — the active model name
  • Cost — cumulative cost in USD (toggle display with ui.showCost setting)
  • Context — context window usage percentage
  • Lines changed — total lines added and removed
  • Exit code — 0 for clean exit, non-zero for errors

Closing Sessions

Press Ctrl+W to close the active session tab. Press Ctrl+Q to quit the app (closes all sessions).

Adopting Standalone Agents

If you have a Claude Code or Gemini CLI process running outside of Flaio, you can adopt it:

  1. Press Alt+A (or å on macOS) to open the adoption dialog.
  2. Select the detected agent from the list.
  3. The external process is terminated and the session continues in a managed tab.

Flaio scans for standalone agents every 5 seconds (configurable via agents.detectorInterval).

Scrolling

  • Mouse wheel — scroll up and down
  • Ctrl+U — scroll up
  • Ctrl+D — scroll down
  • Shift+Drag — select text