Feature - Agent Monitoring (kugetsu monitor) #122

Open
opened 2026-04-03 11:14:32 +02:00 by shoko · 0 comments
Owner

Summary

Implement kugetsu monitor command for real-time agent status tracking.

Depends On

  • #116 (Foundation - Modularize Shell Script)
  • #118 (Foundation - Structured Logging)
  • #119 (Foundation - JSON-based IPC)

Command Interface

kugetsu monitor [--tail n] [-f/--follow] [issue-ref]

Status States

  • working - agent actively processing
  • need_review - agent finished task, awaiting human review
  • need_clarification - agent blocked, needs input
  • done - task completed
  • idle - session exists but not currently active
  • error - agent crashed or failed

Shows

  • Active agent count (X/Y max)
  • Per-agent: issue ref, type, status, last update
  • Worktree git status (branch, local commits)
  • Logs with --tail n and -f/--follow flags

Flags

  • --tail n - Show last n lines of logs
  • -f/--follow - Follow mode (tail -f style live streaming)

Open Questions (Research Needed)

  1. Status detection mechanism: How to get real-time agent status?

    • Poll opencode API directly?
    • Parse recent logs for activity signals?
    • PM agent updates status based on delegation outcomes?
  2. Persistence approach: Store status in session JSON files, or query fresh each time?

  3. Worktree git status: How to efficiently detect new local commits?

0.2.x Only

This is a new feature. It will not be available on 0.1.x.

Acceptance Criteria

  • kugetsu monitor shows active agents with status
  • kugetsu monitor --tail 20 shows last 20 log lines
  • kugetsu monitor -f follows logs live
  • Worktree git status shown (branch, local commits)
  • Research issues resolved with documented decisions
## Summary Implement `kugetsu monitor` command for real-time agent status tracking. ## Depends On - #116 (Foundation - Modularize Shell Script) - #118 (Foundation - Structured Logging) - #119 (Foundation - JSON-based IPC) ## Command Interface ``` kugetsu monitor [--tail n] [-f/--follow] [issue-ref] ``` ## Status States - `working` - agent actively processing - `need_review` - agent finished task, awaiting human review - `need_clarification` - agent blocked, needs input - `done` - task completed - `idle` - session exists but not currently active - `error` - agent crashed or failed ## Shows - Active agent count (X/Y max) - Per-agent: issue ref, type, status, last update - Worktree git status (branch, local commits) - Logs with `--tail n` and `-f/--follow` flags ## Flags - `--tail n` - Show last n lines of logs - `-f/--follow` - Follow mode (tail -f style live streaming) ## Open Questions (Research Needed) 1. **Status detection mechanism**: How to get real-time agent status? - Poll opencode API directly? - Parse recent logs for activity signals? - PM agent updates status based on delegation outcomes? 2. **Persistence approach**: Store status in session JSON files, or query fresh each time? 3. **Worktree git status**: How to efficiently detect new local commits? ## 0.2.x Only This is a new feature. It will not be available on 0.1.x. ## Acceptance Criteria - [ ] `kugetsu monitor` shows active agents with status - [ ] `kugetsu monitor --tail 20` shows last 20 log lines - [ ] `kugetsu monitor -f` follows logs live - [ ] Worktree git status shown (branch, local commits) - [ ] Research issues resolved with documented decisions
shoko added the 0.2.x-onlyfeature labels 2026-04-03 11:18:21 +02:00
shoko added this to the v0.2.x milestone 2026-04-03 11:18:21 +02:00
shoko added 0.3.x-only and removed 0.2.x-only labels 2026-04-05 07:03:48 +02:00
shoko added the blocked label 2026-04-07 08:55:42 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: shoko/kugetsu#122