Skip to content

fix: Hermes integration gaps + stale Claude Code task detection#549

Merged
0xNyk merged 2 commits intomainfrom
fix/hermes-integration
Apr 3, 2026
Merged

fix: Hermes integration gaps + stale Claude Code task detection#549
0xNyk merged 2 commits intomainfrom
fix/hermes-integration

Conversation

@0xNyk
Copy link
Copy Markdown
Member

@0xNyk 0xNyk commented Apr 3, 2026

Summary

Two fixes from the Hermes integration audit and Claude Code tasks UI issue.

Hermes: Missing events endpoint

The MC hook (~/.hermes/hooks/mission-control/handler.py) posts events to /api/hermes/events — but that endpoint didn't exist. Events were silently dropped.

Fix: Created POST /api/hermes/events that:

  • Receives hook events (session:start, agent:start, agent:end)
  • Logs to activity table
  • Broadcasts to SSE clients via session.updated event
  • Updates agent status on agent lifecycle events

Hermes: Cron job run count

Added runCount to HermesCronJob — counts all execution output files in ~/.hermes/cron/output/{job_id}/, giving visibility into total execution history (was only showing latest run).

Claude Code: Stale task detection

Claude Code team tasks at ~/.claude/tasks/ often get stuck as in_progress when sessions crash without cleanup. 45 of 125 tasks on the test system were stale.

Fix: Check file mtime — if task file not modified in 60+ minutes while still in_progress, mark as stale. UI shows these dimmed with "stale" label instead of misleading "in_progress".

Test plan

  • pnpm test — 892/892 pass
  • Manual: Install Hermes hook, verify events appear in activity log
  • Manual: Check Claude Code Tasks section shows "stale" for old sessions
  • Manual: Check cron job detail shows run count

0xNyk added 2 commits April 3, 2026 17:10
…istory

- Create POST /api/hermes/events to receive hook events (session:start,
  agent:start, agent:end). The hook was silently failing because this
  endpoint didn't exist.
- Events logged to activity table and broadcast to SSE clients
- Agent status updated on agent:start/agent:end events
- Add session.updated event type to event bus
- Add runCount to HermesCronJob (counts all execution output files)
Claude Code team tasks written to ~/.claude/tasks/ often get stuck as
in_progress when sessions crash or end without cleanup. Detect stale
tasks by checking file mtime — if not modified in 60+ minutes while
still in_progress, mark as stale. UI shows these dimmed with "stale"
label instead of the misleading "in_progress" badge.
@github-actions github-actions bot added the screenshot-drift UI changed — README screenshots may need updating label Apr 3, 2026
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 3, 2026

📸 Screenshot Drift Check

This PR modifies UI source files. Please verify whether the README screenshots need refreshing:

  • docs/mission-control-overview.png — main dashboard
  • docs/mission-control-agents.png — agents panel
  • docs/mission-control-memory-graph.png — memory graph
Changed UI files
src/app/api/hermes/events/route.ts
src/components/panels/task-board-panel.tsx

See docs/SCREENSHOT-GUIDE.md for instructions on capturing and optimising screenshots.

This comment is posted automatically and can be dismissed if no visual changes occurred.

@0xNyk 0xNyk merged commit d506287 into main Apr 3, 2026
1 of 2 checks passed
@0xNyk 0xNyk deleted the fix/hermes-integration branch April 3, 2026 10:35
Jake-qp referenced this pull request in Jake-qp/mission-control Apr 3, 2026
Pre-existing route added in PR #549 without OpenAPI spec.
Unblocks Docker publish for task resolution UI changes.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

screenshot-drift UI changed — README screenshots may need updating

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant