← Back to Plugins
Channels

Statusbar

Shor73 By Shor73 ⭐ 1 stars 👁 57 views ▲ 0 votes

Telegram status line plugin for OpenClaw

GitHub

Install

npm install
npm

Configuration Example

{
  "enabledByDefault": false,
  "defaultMode": "detailed",
  "defaultProgressMode": "predictive",
  "throttleMs": 4000,
  "minThrottleMs": 2500,
  "liveTickMs": 2500,
  "autoHideSeconds": 0,
  "newMessagePerRun": true
}

README

# openclaw-statusbar

```
๐Ÿ–ฅ exec โ”‚ โ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘ 52% โ”‚ 00:15โ†’13s
๐ŸŸข done โ”‚ opus-4.6|High โ”‚ 00:31s โ”‚ 1.5kโ†‘340โ†“
```

> A live status bar for your AI agent, pinned right inside Telegram.  
> See what Claude is doing, how long it's been thinking, and when it'll finish โ€” in real time.

[![Version](https://img.shields.io/badge/version-1.1.0-blueviolet?style=flat-square)](./CHANGELOG.md)
[![OpenClaw](https://img.shields.io/badge/OpenClaw-plugin-111111?style=flat-square)](https://github.com/openclaw/openclaw)
[![Telegram](https://img.shields.io/badge/Telegram-live%20pin-26A5E4?style=flat-square&logo=telegram)](https://telegram.org/)
[![TypeScript](https://img.shields.io/badge/TypeScript-strict-3178C6?style=flat-square&logo=typescript)](https://www.typescriptlang.org/)
[![License](https://img.shields.io/badge/license-MIT-green?style=flat-square)](./LICENSE)

---

## What it does

When your OpenClaw agent starts working, a live message appears (or updates, if pinned) in Telegram showing:

- **Phase icon** โ€” unique emoji per tool (๐Ÿ–ฅ exec, ๐Ÿ” web_search, ๐Ÿ“– Read, ๐Ÿ’ฌ messageโ€ฆ)
- **Progress bar** โ€” estimated completion (predictive, based on history)
- **Elapsed time** โ€” how long the agent has been running
- **ETA** โ€” predicted time to finish (smooth countdown, auto-adjusting)
- **Model + thinking level** โ€” which LLM and reasoning depth
- **Token usage** โ€” total in/out at completion

No polling. No manual refreshes. Just a pinned message that updates itself.

---

## Live preview

### During execution

```
๐Ÿ’ญ thinking โ”‚ โ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘ 18% โ”‚ 00:05โ†’22s
๐Ÿ–ฅ exec โ”‚ โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘ 52% โ”‚ 00:15โ†’13s
๐ŸŒ web_fetch โ”‚ โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–‘ 71% โ”‚ 00:21โ†’09s
๐Ÿ” web_search โ”‚ โ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘ 35% โ”‚ 00:08โ†’15s
๐Ÿ“– Read โ”‚ โ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘ 22% โ”‚ 00:03โ†’11s
โœ๏ธ Write โ”‚ โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘ 68% โ”‚ 00:12โ†’06s
๐Ÿ’ฌ message โ”‚ โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–‘ 85% โ”‚ 00:20โ†’04s
```

### On completion

```
๐ŸŸข done โ”‚ opus-4.6|High โ”‚ 00:31s โ”‚ 1.5kโ†‘340โ†“
๐ŸŸข done โ”‚ haiku-4.5|High โ”‚ 00:08s โ”‚ 820โ†‘210โ†“
โŒ error โ”‚ opus-4.6|High โ”‚ 00:12s โ”‚ 340โ†‘89โ†“
```

---

## Tool icons

Every tool gets its own emoji โ€” you always know what the agent is doing at a glance:

| Icon | Tool | Icon | Tool |
|------|------|------|------|
| ๐Ÿ–ฅ | exec | ๐Ÿ“– | Read |
| โœ๏ธ | Write | ๐Ÿ” | Edit |
| โฑ๏ธ | process | ๐Ÿ” | web_search |
| ๐ŸŒ | web_fetch / browser | ๐Ÿ’ฌ | message |
| ๐Ÿ”Œ | gateway | ๐ŸŽจ | canvas |
| ๐Ÿ”— | nodes | โฐ | cron |
| ๐Ÿงฌ | sessions_spawn | ๐Ÿ“ค | sessions_send |
| ๐Ÿค– | subagents | ๐Ÿ“‹ | session_status |
| ๐Ÿ–ผ | image | ๐Ÿง  | memory_search / memory_get |
| ๐Ÿ”Š | tts | ๐Ÿ”ง | *fallback (unknown tool)* |

**Phase icons:** ๐Ÿ”œ queued ยท ๐Ÿ’ญ thinking ยท ๐ŸŸข done ยท โŒ error

---

## Display modes

Switch mode anytime with `/sbmode <mode>`.

### `minimal`
Just the phase and elapsed time. Ultra-clean.
```
๐Ÿ’ญ thinking โ”‚ 00:15
๐Ÿ–ฅ exec โ”‚ 00:31
```

### `normal`
Phase + progress bar + time + ETA. The sweet spot.
```
๐Ÿ–ฅ exec โ”‚ โ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘ 52% โ”‚ 00:15โ†’13s
```

### `detailed` *(default)*
Everything: model, thinking level, tokens, ETA.
```
๐Ÿ–ฅ exec โ”‚ โ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘ 52% โ”‚ 00:15โ†’13s
๐ŸŸข done โ”‚ opus-4.6|High โ”‚ 00:31s โ”‚ 1.5kโ†‘340โ†“
```

---

## Install

```bash
# 1. Clone the plugin
git clone https://github.com/Shor73/openclaw-statusbar ~/.openclaw/extensions/openclaw-statusbar

# 2. Enable it
openclaw plugins enable openclaw-statusbar

# 3. Restart gateway
openclaw gateway restart
```

Then in Telegram, send `/sbon` to activate in the current chat.

---

## Commands

| Command | What it does |
|---|---|
| `/sbon` | Enable statusbar in this chat |
| `/sboff` | Disable statusbar in this chat |
| `/sbpin` | Pin the status message (persistent across runs) |
| `/sbunpin` | New message per run instead |
| `/sbmode minimal\|normal\|detailed` | Switch display mode |
| `/sbreset` | Recreate the status message |
| `/sbstatus` | Debug info โ€” session state, config values |
| `/sbsettings` | Show current settings + command reference |
| `/sbbuttons` | Toggle inline buttons on/off |

---

## Configuration

Add to your `openclaw.json` under `plugins.entries.openclaw-statusbar.config`:

```json
{
  "enabledByDefault": false,
  "defaultMode": "detailed",
  "defaultProgressMode": "predictive",
  "throttleMs": 4000,
  "minThrottleMs": 2500,
  "liveTickMs": 2500,
  "autoHideSeconds": 0,
  "newMessagePerRun": true
}
```

| Key | Type | Default | Description |
|---|---|---|---|
| `enabledByDefault` | `boolean` | `false` | Auto-enable for new chats |
| `defaultMode` | `minimal \| normal \| detailed` | `normal` | Default display mode |
| `defaultProgressMode` | `strict \| predictive` | `predictive` | How progress is estimated |
| `throttleMs` | `number` | `4000` | Base edit throttle (ms) |
| `minThrottleMs` | `number` | `2500` | Throttle floor (ms) |
| `liveTickMs` | `number` | `2500` | Tick interval for live updates |
| `autoHideSeconds` | `number` | `0` | Auto-hide after done (`0` = disabled) |
| `newMessagePerRun` | `boolean` | `true` | New message per run when not pinned |

### โšก Want faster updates?

Lower the throttle for fluid seconds display. This increases Telegram API calls โ€” use with caution:

```json
{
  "throttleMs": 2000,
  "minThrottleMs": 1000,
  "liveTickMs": 1000
}
```

The built-in circuit breaker protects against 429 bans even with aggressive settings.

---

## Inline buttons

Interactive buttons appear below the status bar message โ€” no need to type commands.

### During execution
```
๐Ÿ–ฅ exec โ”‚ โ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘ 52% โ”‚ 00:15โ†’13s
[ ๐Ÿ“Š normal ] [ ๐Ÿ“Œ Pin ] [ โน Off ]
```

### On completion
```
๐ŸŸข done โ”‚ opus-4.6|High โ”‚ 00:31s โ”‚ 1.5kโ†‘340โ†“
[ ๐Ÿ“Š normal ] [ ๐Ÿ”„ Reset ] [ โน Off ]
```

### Available buttons

| Button | When | Action |
|---|---|---|
| `๐Ÿ“Š <mode>` | Always | Cycle display mode (minimal โ†’ normal โ†’ detailed โ†’ minimal) |
| `๐Ÿ“Œ Pin` / `๐Ÿ“Œ Unpin` | Active | Toggle pin mode |
| `โน Off` | Always | Disable statusbar |
| `๐Ÿ”„ Reset` | Done/Error | Recreate the status message |

### Toggle buttons

Don't want buttons? Turn them off:

```
/sbbuttons     โ† toggles on/off
```

> **Note:** When using pin mode, buttons are attached to the message but not visible in the Telegram pin bar preview. Tap the pin bar to jump to the message and see the buttons.

---

## Progress estimation

### `predictive` mode *(default)*

The plugin tracks historical run data (duration, steps) and predicts:
- Total steps for the current run
- Estimated time to completion (ETA)
- Smooth countdown between steps with auto-adjustment

After 10+ runs, predictions become tight. Cold start uses conservative defaults.

```
๐Ÿ–ฅ exec โ”‚ โ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘ 52% โ”‚ 00:15โ†’13s    โ† ETA from predicted end time
```

### `strict` mode

No guessing. Shows only what's confirmed.

```
๐Ÿ–ฅ exec โ”‚ โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘ ?? โ”‚ 00:15
```

---

## How it works

OpenClaw emits lifecycle events for each agent run. This plugin hooks into:

| Event | Action |
|---|---|
| `message_received` | Transition to `queued` |
| `before_agent_start` | Transition to `running` |
| `before_tool_call` | Transition to `tool`, update tool name + icon |
| `after_tool_call` | Transition back to `running` |
| `agent_end` | Transition to `done` or `error`, show final stats |

Each state change triggers an **urgent flush** (bypasses throttle) so you see the transition immediately. Between transitions, a live ticker updates the elapsed time and ETA countdown every `liveTickMs`.

---

## Delivery reliability

Telegram Bot API rate limits are brutal. This plugin has multiple layers of protection:

- **Global circuit breaker** โ€” blocks all requests to `(bot, chat)` after a 429, respects `retry_after`
- **Adaptive throttle** โ€” edit rate capped at `throttleMs`, with per-phase floors
- **Fetch timeouts** โ€” 10s for edits, 15s for send/pin โ€” no infinite hangs
- **Smart retry policy** โ€” 0 retries for edits (ephemeral), 4 retries for send/pin (critical)
- **Auto-recovery** โ€” if the status message gets deleted, it recreates itself silently
- **Memory-safe** โ€” stale sessions auto-cleaned after 2h inactivity

---

## Requirements

- OpenClaw `2026.2.x` or later
- Telegram bot with send + pin message permissions
- Node.js 20+

---

## Development

```bash
git clone https://github.com/Shor73/openclaw-statusbar
cd openclaw-statusbar
npm install
npm run typecheck
```

To test locally, symlink or copy into your extensions folder and restart the gateway.

---

## Changelog

See [CHANGELOG.md](./CHANGELOG.md).

---

## License

MIT โ€” do whatever you want with it.

---

*Built for [OpenClaw](https://github.com/openclaw/openclaw) โ€” the open-source AI agent platform.*
channels

Comments

Sign in to leave a comment

Loading comments...