# NousResearch/hermes-agent · Fix mid-turn model switching and session guard errors

## Open now

- Nothing open on GitHub.

These items address bugs in model selection and switching logic: a mid-turn model pick incorrectly deferring, a session-lifetime token counter causing the large-context switch guard to misfire, and a desktop UI showing a spurious \`failed\`-reply card during model switches.

## TL;DR

- 4 member(s): 0 open issue(s), 1 closed issue(s), 0 open PR(s), 2 merged PR(s), 1 PR(s) closed without merging.
- A fix was merged to main in PR #134906. Verify it addresses your case.
- **Recommended:** read PR #134906 (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_SPANNING`): every member is connected by structural evidence: shared changed files, or a closing/superseded reference.
- Pairwise link density `0.50`: 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

- #126343: selection_context_for_agent reads the lifetime session counter, so the large-context switch guard reports a wrong size and fires on every long session

## Prior & competing PRs

- **#134847: fix(desktop): switching models no longer shows a failed-reply card that then succeeds**. merged to main · fix tier `verified`
  - maintainer direction: category `merged`
  - files: `contributors/emails/[redacted:email]`, `hermes_cli/model_selection_guards.py`, `tests/hermes_cli/test_context_cache_switch_guard.py`, `tests/tui_gateway/test_deferred_model_switch_confirm.py`, `tui_gateway/methods_config_set.py`, `tui_gateway/model_switch.py`, `tui_gateway/session_compression.py`
- **#134906: fix(tui_gateway): a model picked mid-turn without --provider asks first instead of being dropped next turn (follow-up #134847)**. merged to main · fix tier `verified`
  - maintainer direction: category `merged`
  - files: `hermes_cli/context_switch_guard.py`, `tests/hermes_cli/test_context_switch_guard.py`, `tests/tui_gateway/test_deferred_model_switch_confirm.py`, `tui_gateway/methods_config_set.py`, `tui_gateway/session_compression.py`
- **#126346: fix(cli): ignore lifetime session tokens in the switch guard**. closed without merge
  - maintainer direction: category `implemented_elsewhere`; implication `superseded`; refs `96c2d9ff783`, `#134847`, `#134906`

## Fix status

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