hermes - 💡(How to fix) Fix fix(kanban): dispatcher worker spawn broken in headless/no-TTY environments

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…

The kanban dispatcher spawns workers using hermes chat -q "work kanban task <id>". This fails when the dispatcher runs in a headless environment (no TTY) — the chat command initializes the TUI (ui-tui/src/entry.tsx), which detects the missing TTY, prints hermes-tui: no TTY to stderr, and exits without ever running the model or calling kanban_complete.

The result: every dispatched worker immediately exits with protocol_violation ("worker exited cleanly without calling kanban_complete"), and the task is auto-blocked after failure_limit consecutive crashes.

Root Cause

In hermes_cli/kanban_db.py:_spawn_worker() (line ~3648), the worker is spawned as:

hermes -p <profile> --skills kanban-worker chat -q "work kanban task <id>"

The chat command initializes the TUI subsystem, which requires a TTY. When spawned via subprocess.Popen(stdin=subprocess.DEVNULL, ...), there is no TTY, and the TUI bails immediately.

Fix Action

Fix / Workaround

The kanban dispatcher spawns workers using hermes chat -q "work kanban task <id>". This fails when the dispatcher runs in a headless environment (no TTY) — the chat command initializes the TUI (ui-tui/src/entry.tsx), which detects the missing TTY, prints hermes-tui: no TTY to stderr, and exits without ever running the model or calling kanban_complete.

The result: every dispatched worker immediately exits with protocol_violation ("worker exited cleanly without calling kanban_complete"), and the task is auto-blocked after failure_limit consecutive crashes.

Dispatched workers should run their task (call kanban_show, execute work, call kanban_complete) regardless of whether a TTY is present.

Code Example

hermes -p <profile> --skills kanban-worker chat -q "work kanban task <id>"

---

# Before:
cmd.extend(["chat", "-q", prompt])

# After:
cmd.extend(["-z", prompt])
RAW_BUFFERClick to expand / collapse

Description

The kanban dispatcher spawns workers using hermes chat -q "work kanban task <id>". This fails when the dispatcher runs in a headless environment (no TTY) — the chat command initializes the TUI (ui-tui/src/entry.tsx), which detects the missing TTY, prints hermes-tui: no TTY to stderr, and exits without ever running the model or calling kanban_complete.

The result: every dispatched worker immediately exits with protocol_violation ("worker exited cleanly without calling kanban_complete"), and the task is auto-blocked after failure_limit consecutive crashes.

Root cause

In hermes_cli/kanban_db.py:_spawn_worker() (line ~3648), the worker is spawned as:

hermes -p <profile> --skills kanban-worker chat -q "work kanban task <id>"

The chat command initializes the TUI subsystem, which requires a TTY. When spawned via subprocess.Popen(stdin=subprocess.DEVNULL, ...), there is no TTY, and the TUI bails immediately.

Expected behavior

Dispatched workers should run their task (call kanban_show, execute work, call kanban_complete) regardless of whether a TTY is present.

Proposed fix

Replace chat -q with -z (one-shot mode) in _spawn_worker(). The one-shot mode:

  1. Does not initialize the TUI (no TTY dependency)
  2. Is documented as "intended for scripts/pipes"
  3. Auto-bypasses approvals (correct for a worker)
  4. Supports --skills and all env vars (HERMES_KANBAN_TASK, etc.)
  5. Has been tested end-to-end and works correctly

The change is in hermes_cli/kanban_db.py, lines 3648-3650:

# Before:
cmd.extend(["chat", "-q", prompt])

# After:
cmd.extend(["-z", prompt])

Environment

  • Hermes v0.12.0
  • macOS 14
  • Python 3.11.13
  • Dispatcher running via launchd gateway (headless)

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…

FAQ

Expected behavior

Dispatched workers should run their task (call kanban_show, execute work, call kanban_complete) regardless of whether a TTY is present.

Still need to ship something?

×6

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

Back to top recommendations

TRENDING