Skip to content

fix(tui): stop the mid-turn model pick from blipping back at turn end - #74766

Merged
OutThisLife merged 1 commit into
mainfrom
bb/model-switch-blip
Jul 30, 2026
Merged

fix(tui): stop the mid-turn model pick from blipping back at turn end#74766
OutThisLife merged 1 commit into
mainfrom
bb/model-switch-blip

Conversation

@OutThisLife

Copy link
Copy Markdown
Collaborator

Follow-up to #74756. Picking a model mid-turn showed the new model, then snapped back to the old one when the turn ended, then switched for real on the next turn.

Summary

The queued pick applies at the next turn start, but the end-of-turn session.info (_emit_settled_session_info) reads the still-live agent — the old model — and clobbered the optimistic paint. Now _session_info reports the pending pick's model/provider while a switch is queued (it is the model the next turn will run), so the display stays on the user's choice through the settle instead of blipping. The overlay clears the moment _apply_pending_model_switch consumes the pick.

No behavior change to when the switch actually applies — this is display-only reconciliation.

Test plan

  • test_session_info_reports_pending_model_switch — pending pick shown; live model wins once cleared
  • existing config_set_model / apply_pending suites green
  • full test_tui_gateway_server.py green (one unrelated concurrency flake, test_write_json_serializes_concurrent_writes, passes in isolation)

…g back

A model picked mid-turn is applied at the next turn start, but the end-of-turn
session.info (_emit_settled_session_info) reads the still-live agent — the OLD
model — and clobbered the optimistic paint, so the UI showed the new model, then
snapped back to the old one when the turn ended, then switched for real on the
next turn. Report the queued pick's model/provider in _session_info while a
switch is pending (it IS the model the next turn runs), so the display stays on
the user's choice through the settle. Cleared once the switch applies.
@OutThisLife
OutThisLife enabled auto-merge (squash) July 30, 2026 10:26
@OutThisLife
OutThisLife merged commit d8a9c17 into main Jul 30, 2026
35 checks passed
@OutThisLife
OutThisLife deleted the bb/model-switch-blip branch July 30, 2026 10:32
@github-actions

github-actions Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

૮ >ﻌ< ა ci review

ran on e594d48

ℹ️ Info

Desktop E2E visual evidence · View test artifacts · View job

1 visual diff.

inline evidence is publishing...

@alt-glitch alt-glitch added type/bug Something isn't working comp/tui Terminal UI (ui-tui/ + tui_gateway/) P2 Medium — degraded but workaround exists labels Jul 30, 2026
randlee pushed a commit to randlee/hermes-agent that referenced this pull request Aug 11, 2026
…g back (NousResearch#74766)

A model picked mid-turn is applied at the next turn start, but the end-of-turn
session.info (_emit_settled_session_info) reads the still-live agent — the OLD
model — and clobbered the optimistic paint, so the UI showed the new model, then
snapped back to the old one when the turn ended, then switched for real on the
next turn. Report the queued pick's model/provider in _session_info while a
switch is pending (it IS the model the next turn runs), so the display stays on
the user's choice through the settle. Cleared once the switch applies.
33hodl pushed a commit to 33hodl/hermes-agent that referenced this pull request Aug 12, 2026
…g back (NousResearch#74766)

A model picked mid-turn is applied at the next turn start, but the end-of-turn
session.info (_emit_settled_session_info) reads the still-live agent — the OLD
model — and clobbered the optimistic paint, so the UI showed the new model, then
snapped back to the old one when the turn ended, then switched for real on the
next turn. Report the queued pick's model/provider in _session_info while a
switch is pending (it IS the model the next turn runs), so the display stays on
the user's choice through the settle. Cleared once the switch applies.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/tui Terminal UI (ui-tui/ + tui_gateway/) P2 Medium — degraded but workaround exists type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants