# NousResearch/hermes-agent · Windows piped-stdout crash fixes and Kanban worker patches

## Open now

- 0 issues, 1 PR open on GitHub.
- PR #65811: fix(cli): degrade _cprint to plain output when stdout has no console (fixes #65558)

Most members address a Windows-specific crash where prompt_toolkit raises NoConsoleScreenBufferError when stdout is redirected, with fixes falling back to plain print. A smaller cluster covers Kanban worker configuration and lane-dispatch behavior.

## TL;DR

- 8 member(s): 0 open issue(s), 3 closed issue(s), 1 open PR(s), 1 merged PR(s), 3 PR(s) closed without merging.
- A fix was merged to main in PR #28330. Verify it addresses your case.
- **Recommended:** read PR #28330 (and any competing PRs below) before filing. Confirm the merged change covers your symptom.

## Maintainer resolution verdict

- Internal-tracker verdict over this cluster's issue members: `unresolved`. This is distinct from the fix status above. Weigh it yourself.

## How this cluster was grouped

- Link evidence (`STRUCTURAL_PARTIAL`): some members are connected by structural evidence (shared changed files, or a closing/superseded reference); the rest are joined by an automated relevance judgement over their text.
- Members outside that structural core may belong to a different underlying problem.
- Pairwise link density `0.20`: the share of member pairs that carry a link, counting a structural link in full and a relevance-only link at 0.36. `1.00` means every pair is linked.

## Closed / duplicate issues

- #22445: Windows: Kanban worker crashes with NoConsoleScreenBufferError when stdout is redirected
- #25535: \[Setup\]: Hermes Kanban
- #65558: prompt_toolkit crashes with NoConsoleScreenBufferError on Windows when \`hermes chat -q\` stdout is piped (non-interactive/automated use)

## Prior & competing PRs

- **#28330: fix(windows): handle redirected stdout in _cprint fallback (#28083)**. merged to main · fix tier `verified`
  - maintainer direction: category `merged`
  - files: `cli.py`
  - fix hunks:
  - `cli.py`

    ```diff
    @@ -1785,7 +1785,16 @@ def _cprint(text: str):
         # direct prompt_toolkit print is safe and matches existing behavior
         # (spinner frames, streamed tokens, tool activity prefixes, …).
         if app is None or not getattr(app, "_is_running", False):
    -        _pt_print(_PT_ANSI(text))
    +        try:
    +            _pt_print(_PT_ANSI(text))
    +        except Exception:
    +            # Fallback when stdout is not a real console (e.g. subprocess
    +            # worker logging to a file). prompt_toolkit raises
    +            # NoConsoleScreenBufferError (Windows) or OSError (other).
    +            try:
    +                print(text)
    +            except Exception:
    +                pass
             return
     
         try:
    ```
- **#22482: fix(cli): fall back to plain print when prompt_toolkit has no Win32 console**. closed without merge
  - maintainer direction: category `merged_via`; implication `superseded`; refs `#28330`
- **#25556: fix(cli): handle NoConsoleScreenBufferError in _cprint on Windows**. closed without merge
  - maintainer direction: category `implemented_elsewhere`; implication `superseded`
- **#65811: fix(cli): degrade _cprint to plain output when stdout has no console (fixes #65558)**. open
  - maintainer direction: category `superseded_by_pr`; implication `superseded`
  - files: `cli.py`, `tests/cli/test_cli_cprint_no_console.py`, `tests/cli/test_cprint_bg_thread.py`
- **#65850: fix(cli): plain-print fallback when stdout has no console — Windows piped/automated use (#65558)**. closed without merge
  - maintainer direction: category `stale_abandoned`; implication `active`

## Fix status

- Merged to main in PR #28330 (cited above). No release data is tracked. Verify downstream.
- Fix last verified (merged) `2026-05-19`.
- Subsystem: `hermes_cli`
