#14358: fix: preserve session overrides (verbose, model) across /new or /rese…
stale
Cluster:
Session Management Improvements
…t resets
Fixes #10787. Ensures thinkingLevel, verboseLevel, reasoningLevel, ttsAuto, modelOverride, and providerOverride are inherited when a session is explicitly reset via triggers like /new.
<!-- greptile_comment -->
<h2>Greptile Overview</h2>
<h3>Greptile Summary</h3>
This change updates `initSessionState` to preserve per-session override fields (thinking/verbose/reasoning, TTS auto, and model/provider overrides) when a session is explicitly reset via configured triggers like `/new`, and adds a regression test ensuring `verboseLevel` and `modelOverride` carry forward while generating a new `sessionId`.
The logic fits into the session initialization path by capturing override fields from the prior `SessionEntry` during reset-triggered new-session creation, then reapplying them when building the new `sessionEntry` that’s written back to the session store.
<h3>Confidence Score: 3/5</h3>
- This PR is likely safe to merge after addressing the reset/override authorization edge case noted in the review comment.
- The change is small and covered by a targeted test, but the interaction between reset authorization and override persistence needs tightening to avoid preserving overrides across non-command session resets (e.g., staleness-driven new sessions) if that’s not intended.
- src/auto-reply/reply/session.ts
<!-- greptile_other_comments_section -->
<sub>(2/5) Greptile learns from your feedback when you react with thumbs up/down!</sub>
<!-- /greptile_comment -->
Most Similar PRs
#21876: fix(session): clear model override on /new and /reset
by sauerdaniel · 2026-02-20
87.2%
#21847: fix(session): /new and /reset no longer carry over model overrides
by hydro13 · 2026-02-20
87.2%
#21849: fix(session): clear model/provider overrides on /new and /reset
by widingmarcus-cyber · 2026-02-20
85.4%
#11613: fix: clear stale model metadata on /new and /reset
by mcaxtr · 2026-02-08
83.4%
#6653: fix: persist archived session entry on /new or /reset
by leicao-me · 2026-02-01
83.2%
#17011: fix(/new /reset): clear model override for reset turn
by Limitless2023 · 2026-02-15
82.7%
#17109: fix: preserve responseUsage across session resets
by Limitless2023 · 2026-02-15
80.7%
#21731: Fix: clear stale session runtime model on /new, /reset, and session...
by AIflow-Labs · 2026-02-20
79.6%
#20770: fix: prevent stale session-entry overwrite during reset-model persi...
by coygeek · 2026-02-19
79.6%
#14018: fix: auto-remind AI to check workspace context files on session reset
by WalterSumbon · 2026-02-11
79.3%