Summary
/new and /reset preserve modelOverride and providerOverride from the previous session entry. This means a /model change made days or weeks ago survives indefinitely through resets, silently overriding channels.modelByChannel and agents.defaults.model.primary.
Expected behavior
/new should clear modelOverride, providerOverride, and authProfileOverride so the session falls back to modelByChannel or the configured default. If the user wants a specific model for the new session, they can use /new <model>.
Current behavior
In initSessionState() (reply module), when resetTriggered && entry:
persistedModelOverride = entry.modelOverride;
persistedProviderOverride = entry.providerOverride;
persistedAuthProfileOverride = entry.authProfileOverride;
These are copied forward into the new session entry, making the override sticky across resets.
Reproduction
- In a Telegram topic with
modelByChannel pointing to opus-bedrock
- Run
/model codex — session override is set
- Run
/new — new session starts
- The session still uses codex instead of falling back to
modelByChannel
Suggested fix
In the resetTriggered && entry block, skip copying model/provider/auth overrides:
if (resetTriggered && entry) {
persistedThinking = entry.thinkingLevel;
persistedVerbose = entry.verboseLevel;
persistedReasoning = entry.reasoningLevel;
persistedTtsAuto = entry.ttsAuto;
// Do NOT persist model overrides through /new
// persistedModelOverride = entry.modelOverride;
// persistedProviderOverride = entry.providerOverride;
// persistedAuthProfileOverride = entry.authProfileOverride;
}
Alternatively, /new could accept a --keep-model flag for users who want the current behavior.
Context
- Version: 2026.4.9
- Relevant code:
initSessionState() in compiled reply-BwK-bN2w.js
- Source:
src/auto-reply/reply/session.ts
- Doc states: "/new starts a new session" but does not clarify override persistence
Workaround
Use session_status(model="default") or /model default to manually clear the override after /new.
Summary
/newand/resetpreservemodelOverrideandproviderOverridefrom the previous session entry. This means a/modelchange made days or weeks ago survives indefinitely through resets, silently overridingchannels.modelByChannelandagents.defaults.model.primary.Expected behavior
/newshould clearmodelOverride,providerOverride, andauthProfileOverrideso the session falls back tomodelByChannelor the configured default. If the user wants a specific model for the new session, they can use/new <model>.Current behavior
In
initSessionState()(reply module), whenresetTriggered && entry:These are copied forward into the new session entry, making the override sticky across resets.
Reproduction
modelByChannelpointing toopus-bedrock/model codex— session override is set/new— new session startsmodelByChannelSuggested fix
In the
resetTriggered && entryblock, skip copying model/provider/auth overrides:Alternatively,
/newcould accept a--keep-modelflag for users who want the current behavior.Context
initSessionState()in compiledreply-BwK-bN2w.jssrc/auto-reply/reply/session.tsWorkaround
Use
session_status(model="default")or/model defaultto manually clear the override after/new.