# Menu Bar Status Logic

## Overview

This page documents how OpenClaw displays agent work state through menu bar indicators and status messaging.

## Key Display Features

The system surfaces current agent activity via:

- Menu bar icon reflecting work state
- Status row showing session and activity information
- Health status (visible only when idle)
- Device list from paired nodes
- Usage metrics when available from providers

## Session Management

Sessions receive events containing a `runId` and `sessionKey`. The "main" session takes priority—when active, it immediately displays in the menu. If main is idle, the most recently active non-main session appears instead, preventing constant switching during transitions.

## Activity Indicators

Two activity types generate status updates:

**Jobs** represent high-level command execution with states: started, streaming, done, or error.

**Tools** show operational phases (start/result) with associated metadata and arguments.

## Visual States

The icon system includes four states:

- **Idle**: Normal display
- **Working main**: Full badge animation
- **Working other**: Muted badge
- **Overridden**: Debug mode

Activity kinds map to glyphs:

| Kind | Glyph |
|------|-------|
| exec | terminal |
| read | document |
| write | pencil |
| edit | notepad |
| attach | paperclip |
| others | wrench |

## Status Labels

Active work displays as: `<Session role> - <activity label>` (e.g., "Main - exec: pnpm test").

The system labels activities by extracting command first lines, shortened file paths, and inferred change types from diffs.
