feat: add debug-agent skill for admin observability#165
Merged
baudbot-agent merged 4 commits intomainfrom Feb 24, 2026
Merged
Conversation
added 3 commits
February 24, 2026 10:56
Renders a persistent widget above the editor showing: - Pi version (with update indicator if behind latest npm) - Slack bridge status (live HTTP probe) - Session health (control-agent, sentry-agent, dev-agents) - Todo stats (active/done/total) - Worktree count - Current model and uptime Refreshes every 30s with zero LLM token cost. Admin can attach to the running baudbot tmux session and see health without sending any messages. Also adds /dashboard command for immediate refresh.
message_start only fires for user/assistant/toolResult messages, not custom messages from pi.sendMessage(). Slack messages arrive as session-message custom type and were being missed. before_agent_start fires for ALL inbound messages that trigger an agent turn, including custom messages from the bridge/heartbeat. Also improved the event summary to show the actual message body excerpt alongside the sender.
Moves the dashboard extension from pi/extensions/ (auto-loaded by all
sessions) into a dedicated debug-agent skill that's only loaded when
an admin attaches to the system.
The debug-agent provides:
- Live dashboard widget showing system health at a glance
- Activity feed tailing the control-agent's session JSONL
- Quick reference for logs, sockets, tmux sessions, deploy paths
Launch via:
pi --skill ~/.pi/agent/skills/debug-agent \
-e ~/.pi/agent/skills/debug-agent/debug-dashboard.ts \
"/skill:debug-agent"
This gives baudbot three agent types:
- control-agent: always-on, handles Slack/routing/delegation
- sentry-agent: incident triage from Sentry alerts
- debug-agent: admin observability when attached via SSH
Greptile SummaryMoves the dashboard extension from Key changes:
The implementation is solid with proper error handling, file watching with polling fallback, and efficient ring buffer management for the activity feed. Confidence Score: 5/5
Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Admin SSH] -->|baudbot session attach| B[debug-agent]
B --> C[debug-dashboard.ts]
C -->|displays| D[System Health Widget]
C -->|tails| E[control-agent JSONL]
F[Slack] --> G[slack-bridge]
G --> H[control-agent]
H -->|delegates| I[dev-agent]
H -->|manages| J[sentry-agent]
D -->|shows| K[Versions, Bridge Status]
D -->|shows| L[Sessions, Todos, Worktrees]
D -->|shows| M[Heartbeat, Activity Feed]
E -->|parses| N[Tool Calls]
E -->|parses| O[Messages]
E -->|parses| P[Incoming Events]
style B fill:#e1f5ff
style H fill:#fff4e1
style I fill:#f0f0f0
style J fill:#f0f0f0
style D fill:#e8f5e9
Last reviewed commit: a7f97c4 |
The broker bridge integration test could fail with ENOTEMPTY when rmSync raced with child processes still writing to temp dirs. Add a small delay after SIGTERM and use maxRetries/retryDelay on rmSync.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Moves the dashboard extension from
pi/extensions/(auto-loaded by all sessions) into a dedicated debug-agent skill that's only loaded when an admin attaches to the system.This gives baudbot three distinct agent types:
What the debug-agent provides
Launch
Changes
pi/extensions/dashboard.ts→pi/skills/debug-agent/debug-dashboard.ts(moved out of auto-discovery)pi/skills/debug-agent/SKILL.md