hermes - ✅(Solved) Fix [Feature]: Kanban — push notification on task block/crash [1 pull requests, 1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
NousResearch/hermes-agent#22995Fetched 2026-05-11 03:31:49
View on GitHub
Comments
0
Participants
1
Timeline
4
Reactions
0
Author
Participants
Timeline (top)
labeled ×3cross-referenced ×1

Fix Action

Fix / Workaround

  • Kanban dispatcher retries up to failure_limit (default 2)

  • After exhausting retries, task transitions to blocked

  • notify-subscribe exists but is per-task only — user must proactively subscribe to each task

  • No global notification mechanism for block/fail events

  • Users don't need cron hacks or per-task subscriptions

  • Zero token cost (dispatcher already knows about the block)

  • Especially valuable for unattended kanban workflows where no one is watching hermes kanban list

When enabled, the dispatcher sends a message to the configured channel whenever a task transitions to blocked due to crash/failure.

PR fix notes

PR #23120: feat(kanban): push notification when a task transitions to blocked

Description (problem / solution / changelog)

Summary

Closes #22995.

Adds a global block-notifier so unattended kanban workflows surface a stall without requiring a per-task notify-subscribe. Off by default for backward compatibility.

New config keys (hermes_cli/config.py, default config block):

kanban:
  notify_on_block: false           # push when a task transitions to blocked
  notify_on_block_channel: ""      # empty = broadcast to all home channels;
                                   # or "<platform>:<chat_id>[:<thread_id>]"

When notify_on_block is true, a new gateway watcher (_kanban_global_block_watcher) tails task_events for kinds blocked (manual kanban block) and gave_up (auto-block on failure_limit) across every board and delivers one message per event to either every connected platform's home channel (default) or a single explicit platform:chat_id[:thread_id] target.

The watcher persists its cursor in a new tiny kanban_kv table so it survives gateway restarts. On first enable the cursor is seeded to MAX(task_events.id) per board so a long-running install doesn't flood the home channel with historical block events the moment the flag flips on.

The watcher mirrors the existing _kanban_notifier_watcher pattern:

  • All SQLite work runs via asyncio.to_thread so the event loop never blocks on the WAL lock.
  • Failed sends do not advance the cursor — the next tick retries.
  • Malformed notify_on_block_channel disables the watcher with a clear warning log line rather than silently swallowing events.
  • Cross-board fan-out reuses the same list_boards iteration as the per-task notifier.

Why this is independent of the existing notifier

_kanban_notifier_watcher already delivers terminal events, but only to chats in kanban_notify_subs — i.e. the user must run kanban notify-subscribe for every task. The issue points out this scales poorly for fleet/multi-agent workflows where a single blocked task can stall every downstream task. The new watcher is the zero-subscription, zero-token-cost path the issue asks for.

Files

FileChange
hermes_cli/config.pyTwo new keys in the default kanban block
hermes_cli/kanban.pyUpdated kanban daemon --force config snippet
hermes_cli/kanban_db.pyNew kanban_kv table; get_kv/set_kv helpers; max_event_id, get/set_block_notify_cursor, unseen_block_events
gateway/run.pyNew _kanban_global_block_watcher + asyncio.create_task registration
tests/hermes_cli/test_kanban_core_functionality.pyKV + cursor + event-filter tests
tests/hermes_cli/test_kanban_notify.py5 watcher tests (disabled default, cursor seeding, gave_up, channel override, malformed config)

The new schema is added via CREATE TABLE IF NOT EXISTS so existing DBs migrate transparently on the next connect() — same pattern as the existing kanban_notify_subs table.

Test plan

  • pytest tests/hermes_cli/test_kanban_core_functionality.py -k "kv or block_notify or max_event_id or unseen_block_events" — 4 new passing
  • pytest tests/hermes_cli/test_kanban_notify.py — 12 passing (5 new + 7 existing, no regressions)
  • python3 -m py_compile clean on all modified files
  • Manual: end-to-end smoke run; confirm watcher exits silently when flag is off
  • Reviewer: run scripts/run_tests.sh against the full suite (my local minimal venv doesn't include FastAPI/dashboard plugin deps; the only failures I saw were the pre-existing plugins/kanban/dashboard tests that require those)

Tested on macOS (darwin 25.3.0, Python 3.11.14). No OS-specific syscalls touched — all changes are SQLite + asyncio so cross-platform behavior is unchanged.

🤖 Generated with Claude Code

Changed files

  • gateway/run.py (modified, +249/-0)
  • hermes_cli/config.py (modified, +16/-0)
  • hermes_cli/kanban.py (modified, +2/-0)
  • hermes_cli/kanban_db.py (modified, +119/-0)
  • tests/hermes_cli/test_kanban_core_functionality.py (modified, +84/-0)
  • tests/hermes_cli/test_kanban_notify.py (modified, +287/-0)

Code Example

kanban:
  notify_on_block: true          # push notification when task blocks
  notify_on_block_channel: ""    # override delivery target (defaults to home channel)

---
RAW_BUFFERClick to expand / collapse

Problem or Use Case

Problem

When a kanban task crashes repeatedly (reaching failure_limit) and transitions to blocked status, there is no notification sent to the user. The task silently blocks and the user has no idea until they manually check hermes kanban list.

This is especially critical in multi-agent workflows where one task blocks and downstream dependent tasks stall indefinitely.

Current Behavior

  • Kanban dispatcher retries up to failure_limit (default 2)
  • After exhausting retries, task transitions to blocked
  • notify-subscribe exists but is per-task only — user must proactively subscribe to each task
  • No global notification mechanism for block/fail events

Benefits

  • Users don't need cron hacks or per-task subscriptions
  • Zero token cost (dispatcher already knows about the block)
  • Especially valuable for unattended kanban workflows where no one is watching hermes kanban list

Proposed Solution

Add a kanban.notify_on_block config option (boolean, default false for backward compatibility):

kanban:
  notify_on_block: true          # push notification when task blocks
  notify_on_block_channel: ""    # override delivery target (defaults to home channel)

When enabled, the dispatcher sends a message to the configured channel whenever a task transitions to blocked due to crash/failure.

Alternatives Considered

No response

Feature Type

New tool

Scope

None

Contribution

  • I'd like to implement this myself and submit a PR

Debug Report (optional)

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

hermes - ✅(Solved) Fix [Feature]: Kanban — push notification on task block/crash [1 pull requests, 1 participants]