# NousResearch/hermes-agent · Splitting large cli.py into smaller mixin modules

## Open now

- Nothing open on GitHub.

A bug report and two refactoring efforts focused on breaking up an oversized cli.py file by moving behavior into topical mixin sibling modules. The work tracks line-count reduction across incremental refactoring steps.

## TL;DR

- 3 member(s): 0 open issue(s), 1 closed issue(s), 0 open PR(s), 2 merged PR(s), 0 PR(s) closed without merging.
- A fix was merged to main in PR #117688. Verify it addresses your case.
- **Recommended:** read PR #117688 (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-117642`. 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

- #116911: \[Bug\]: cli.py 4,823-line god-file — behavior must move to hermes_cli/cli_*_mixin siblings

## Prior & competing PRs

- **#117642: refactor(cli): HermesCLI init and TUI run-loop phases move into mixin siblings, cli.py 4,835 -> 3,959 lines (#116911)**. merged to main · fix tier `verified`
  - maintainer direction: category `merged`
  - files: `cli.py`, `hermes_cli/AGENTS.md`, `hermes_cli/cli_init_mixin.py`, `hermes_cli/cli_tui_runtime_mixin.py`, `tests/agent/test_grid_sweep_cli_tui_stream_diagnostics.py`, `tests/agent/test_org_skill_namespace.py`, `tests/hermes_state/test_hermes_state_ids.py`
- **#117688: refactor(cli): cli.py module-level helper clusters move into topical siblings; cli.py lands under 2,000 lines (#116911)**. merged to main · fix tier `verified`
  - maintainer direction: category `merged`
  - files: `cli.py`, `hermes_cli/AGENTS.md`, `hermes_cli/cli_auto_maintenance.py`, `hermes_cli/cli_config_load.py`, `hermes_cli/cli_render.py`, `hermes_cli/cli_shutdown.py`, `hermes_cli/cli_single_query.py`, `hermes_cli/cli_terminal_input.py`, `tests/agent/test_auxiliary_config_bridge.py`, `tests/hermes_cli/test_bracketed_paste_timeout.py`, `tests/hermes_cli/test_cli_quiet_stdout_leak.py`

## Fix status

- Merged to main in PR #117688 (cited above). No release data is tracked. Verify downstream.
- Fix last verified (merged) `2026-09-21`.
