# NousResearch/hermes-agent · Guard optional prompt_toolkit imports in CLI code

## Open now

- Nothing open on GitHub.

These items address unguarded prompt_toolkit imports in cli.py that cause hard failures when the package is absent or incomplete. The fixes add defensive import handling so dependent modules degrade gracefully instead of crashing.

## TL;DR

- 2 member(s): 0 open issue(s), 1 closed issue(s), 0 open PR(s), 1 merged PR(s), 0 PR(s) closed without merging.
- A fix was merged to main in PR #128314. Verify it addresses your case.
- **Recommended:** read PR #128314 (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: `resolved` · deciding PR(s): `pr-128314`. This is distinct from the fix status above. Weigh it yourself.

## How this cluster was grouped

- Link evidence (`STRUCTURAL_SPANNING`): every member is connected by structural evidence: shared changed files, or a closing/superseded reference.
- Pairwise link density `0.67`: 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

- #96075: cli.py imports prompt_toolkit unguarded; tui_gateway/slash_worker imports cli, so a CLI-only dep hard-fails desktop turns

## Prior & competing PRs

- **#128314: fix(cli): degrade gracefully when prompt_toolkit.patch_stdout is missing**. merged to main · fix tier `verified`
  - maintainer direction: category `merged`
  - files: `cli.py`, `tests/hermes_cli/test_cli_import_without_patch_stdout.py`
- **#96083: fix(cli): guard prompt_toolkit imports defensively in cli.py (#96075)**. closed without merge
  - maintainer direction: category `uncategorized`; implication `needs_llm`; refs `#96075`
  - files: `cli.py`, `tests/cli/test_cli_imports_guard.py`

## Fix status

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