# NousResearch/hermes-agent · context_length config override lost after /model switch

## Open now

- 1 issue, 3 PRs open on GitHub.
- #40979: model.context_length global config override is not re-read after /model switch
- PR #41270: fix(config): re-read model.context_length from config after /model switch (#40979)
- PR #59125: \[codex\] preserve context length on model re-pick
- PR #70210: fix(agent): restore model.context_length pin when /model returns to the configured default

These issues and PRs concern a bug where the global model.context_length configuration is not reapplied when switching models via the /model command. Multiple fix attempts address preserving or restoring this override after a model switch.

## TL;DR

- 5 member(s): 1 open issue(s), 0 closed issue(s), 3 open PR(s), 0 merged PR(s), 1 PR(s) closed without merging.
- No fix has been merged to main; one or more PRs were attempted (see below).
- **Recommended:** review the prior/competing PR(s) below. A fix was attempted but not merged; your case may extend or revive that work.

## 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.40`: 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.

## Open related issues

- #40979: model.context_length global config override is not re-read after /model switch

## Prior & competing PRs

- **#41010: fix(agent): restore global model.context_length override on /model switch**. closed without merge
  - maintainer direction: category `silent_close`; implication `active`
- **#41270: fix(config): re-read model.context_length from config after /model switch (#40979)**. open
  - maintainer direction: category `uncategorized`; implication `needs_llm`
  - files: `agent/agent_init.py`, `agent/agent_runtime_helpers.py`, `scripts/release.py`, `tests/run_agent/test_primary_runtime_restore.py`, `tests/run_agent/test_switch_model_context.py`
- **#59125: \[codex\] preserve context length on model re-pick**. open
  - maintainer direction: category `uncategorized`; implication `needs_llm`; refs `057dcdf236`, `74e38b9d58`
  - files: `hermes_cli/web_server.py`, `tests/hermes_cli/test_web_server.py`
- **#70210: fix(agent): restore model.context_length pin when /model returns to the configured default**. open
  - maintainer direction: category `partial_fix`; implication `needs_llm`; refs `cb7f6bbb2e5696bae2c595ca8a3a52cefb6a4a7e`, `b6d48ebfde63f325143bc601cbc622d89d428f1a`, `ab0296de5ba0`, `#6844`, `#7187`, `#10366`, `#10157`, `#17245`, `#17246`, `#17269`, `#21509`, `#22387`, `#22282`, `#3988`, `#22387`, `#24724`, `#24079`, `#24724`, `#24724`, `#32413`, `#32452`, `#32423`, `#36199`, `#37712`, `#41010`, `#40979`, `#41270`, `#40979`, `#41322`, `#41296`, `#65433`, `#67970`, `#41965`, `#41944`, `#44947`, `#59125`, `#59050`, `#59191`, `#59050`, `#59125`, `#59125`, `#61552`, `#62552`, `#41965`, `#65433`, `#41296`, `#41322`, `#67970`, `#67948`, `#67970`, `#67970`, `#41296`, `#70210`, `#40979`, `#21509`, `#22387`, `#24724`, `#17245`, `#17269`, `#59191`, `#59125`, `#41322`, `#65433`, `#67948`, `#67970`, `#70210`, `#10366`, `#41270`, `#41965`, `#59125`, `#61552`, `#67970`, `#374151`, `#40979`, `#70210`
  - files: `agent/agent_runtime_helpers.py`, `tests/run_agent/test_switch_model_context_pin_40979.py`

## Fix status

- No merged fix on record.
- Subsystem: `agent`
