show Claude status warnings in tmux status bar #15

Merged
bryan merged 1 commit from tmux-claude-status-warnings into main 2026-04-23 15:47:24 +00:00
Owner

Summary

Add a claude-status.sh script that polls status.claude.com every 60s and renders a colored warning in the tmux right-status when Anthropic reports degraded service. Silent when all systems are operational, so the status bar stays clean in the common case.

Details

  • dot-tmux/claude-status.sh (new) — fetches /api/v2/summary.json, caches for 60s. Emits ⚠ Claude: <active incident name> when the page indicator is non-none, falling back to the generic page description. Colors scale with severity (yellow → orange → red → blue for maintenance) and mirror the existing NIGHTFLY_* palette. Truncates long incident names to 48 chars.
  • dot-tmux.conf — prepends the warning to status-right so it leads when present; binds prefix + a to open https://status.claude.com in the default browser.

Follows the same shape as claude-usage.sh: read-only network call, stale-cache fallback on failure, owns its own trailing " | " separator so the status bar stays clean when the script is silent.

Why this form of click-through

tmux status bars don't reliably pass OSC 8 hyperlinks. A MouseDown1StatusRight binding was considered but rejected — it can't be scoped to just the warning glyph, so it would hijack clicks on the hostname/time region. prefix + a is the cleanest actionable binding (prefix + c is tmux's default new-window and off-limits).

Test plan

  • Script output verified with a real active incident ("Elevated errors on Claude Opus 4.7"): renders ⚠ Claude: ... with yellow color and trailing separator.
  • Stale-cache fallback path exists for network failures.
  • prefix + a reload-tested via tmux source-file.
  • Verify silent output once the current Anthropic incident resolves.
## Summary Add a `claude-status.sh` script that polls `status.claude.com` every 60s and renders a colored warning in the tmux right-status when Anthropic reports degraded service. Silent when all systems are operational, so the status bar stays clean in the common case. ## Details - **`dot-tmux/claude-status.sh`** (new) — fetches `/api/v2/summary.json`, caches for 60s. Emits `⚠ Claude: <active incident name>` when the page indicator is non-`none`, falling back to the generic page description. Colors scale with severity (yellow → orange → red → blue for maintenance) and mirror the existing `NIGHTFLY_*` palette. Truncates long incident names to 48 chars. - **`dot-tmux.conf`** — prepends the warning to `status-right` so it leads when present; binds `prefix + a` to open `https://status.claude.com` in the default browser. Follows the same shape as `claude-usage.sh`: read-only network call, stale-cache fallback on failure, owns its own trailing `" | "` separator so the status bar stays clean when the script is silent. ## Why this form of click-through tmux status bars don't reliably pass OSC 8 hyperlinks. A `MouseDown1StatusRight` binding was considered but rejected — it can't be scoped to just the warning glyph, so it would hijack clicks on the hostname/time region. `prefix + a` is the cleanest actionable binding (`prefix + c` is tmux's default `new-window` and off-limits). ## Test plan - [x] Script output verified with a real active incident ("Elevated errors on Claude Opus 4.7"): renders `⚠ Claude: ...` with yellow color and trailing separator. - [x] Stale-cache fallback path exists for network failures. - [x] `prefix + a` reload-tested via `tmux source-file`. - [ ] Verify silent output once the current Anthropic incident resolves.
Poll status.claude.com every 60s and display a colored warning with the
active incident name when Anthropic reports a degraded service. Silent
when all systems are operational. Keybinding (prefix + a) opens the
status page in the default browser.
bryan merged commit a1ff892b79 into main 2026-04-23 15:47:24 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
bryan/dotfiles!15
No description provided.