fix(gateway): scope reset banners' session info to the serving profile (#59048 salvage) - #59329
Merged
Merged
Conversation
The auto-reset notice and the manual /reset //new banner both appended _format_session_info() outside any profile scope, so a multiplexed gateway advertised the base config's model/provider/context while the session actually ran on the profile's. Route both call sites through a new _reset_notice_session_info(source), which enters _profile_runtime_scope for the source's profile when gateway.multiplex_profiles is on (mirroring _run_agent's gating), so _load_gateway_config()/_resolve_gateway_model() resolve the profile's config.yaml via the existing context-local home override. Single-profile gateways never enter the scope — behavior unchanged. Both call sites invoke the helper via asyncio.to_thread: under the scope, resolution can do blocking work (credential refresh, context-length HTTP probes) that previously failed fast unscoped and must not run on the event loop. Fixes #59003 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
teknium1
force-pushed
the
salvage/59048-reset-banner-scope
branch
from
July 6, 2026 09:23
f19906c to
9c7358c
Compare
santhreal
pushed a commit
to santhreal/hermes-agent
that referenced
this pull request
Jul 13, 2026
NousResearch#59048 salvage) (NousResearch#59329) * fix(gateway): scope reset banners' session info to the serving profile The auto-reset notice and the manual /reset //new banner both appended _format_session_info() outside any profile scope, so a multiplexed gateway advertised the base config's model/provider/context while the session actually ran on the profile's. Route both call sites through a new _reset_notice_session_info(source), which enters _profile_runtime_scope for the source's profile when gateway.multiplex_profiles is on (mirroring _run_agent's gating), so _load_gateway_config()/_resolve_gateway_model() resolve the profile's config.yaml via the existing context-local home override. Single-profile gateways never enter the scope — behavior unchanged. Both call sites invoke the helper via asyncio.to_thread: under the scope, resolution can do blocking work (credential refresh, context-length HTTP probes) that previously failed fast unscoped and must not run on the event loop. Fixes NousResearch#59003 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * chore(release): map irresi author email for PR NousResearch#59048 salvage --------- Co-authored-by: irresi <blueirobin02@gmail.com> Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
justemu
pushed a commit
to justemu/hermes-agent
that referenced
this pull request
Jul 18, 2026
NousResearch#59048 salvage) (NousResearch#59329) * fix(gateway): scope reset banners' session info to the serving profile The auto-reset notice and the manual /reset //new banner both appended _format_session_info() outside any profile scope, so a multiplexed gateway advertised the base config's model/provider/context while the session actually ran on the profile's. Route both call sites through a new _reset_notice_session_info(source), which enters _profile_runtime_scope for the source's profile when gateway.multiplex_profiles is on (mirroring _run_agent's gating), so _load_gateway_config()/_resolve_gateway_model() resolve the profile's config.yaml via the existing context-local home override. Single-profile gateways never enter the scope — behavior unchanged. Both call sites invoke the helper via asyncio.to_thread: under the scope, resolution can do blocking work (credential refresh, context-length HTTP probes) that previously failed fast unscoped and must not run on the event loop. Fixes NousResearch#59003 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * chore(release): map irresi author email for PR NousResearch#59048 salvage --------- Co-authored-by: irresi <blueirobin02@gmail.com> Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Gravezzz
pushed a commit
to Gravezzz/hermes-agent
that referenced
this pull request
Jul 21, 2026
NousResearch#59048 salvage) (NousResearch#59329) * fix(gateway): scope reset banners' session info to the serving profile The auto-reset notice and the manual /reset //new banner both appended _format_session_info() outside any profile scope, so a multiplexed gateway advertised the base config's model/provider/context while the session actually ran on the profile's. Route both call sites through a new _reset_notice_session_info(source), which enters _profile_runtime_scope for the source's profile when gateway.multiplex_profiles is on (mirroring _run_agent's gating), so _load_gateway_config()/_resolve_gateway_model() resolve the profile's config.yaml via the existing context-local home override. Single-profile gateways never enter the scope — behavior unchanged. Both call sites invoke the helper via asyncio.to_thread: under the scope, resolution can do blocking work (credential refresh, context-length HTTP probes) that previously failed fast unscoped and must not run on the event loop. Fixes NousResearch#59003 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * chore(release): map irresi author email for PR NousResearch#59048 salvage --------- Co-authored-by: irresi <blueirobin02@gmail.com> Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
leewenjie
pushed a commit
to leewenjie/hermes-agent
that referenced
this pull request
Aug 7, 2026
NousResearch#59048 salvage) (NousResearch#59329) * fix(gateway): scope reset banners' session info to the serving profile The auto-reset notice and the manual /reset //new banner both appended _format_session_info() outside any profile scope, so a multiplexed gateway advertised the base config's model/provider/context while the session actually ran on the profile's. Route both call sites through a new _reset_notice_session_info(source), which enters _profile_runtime_scope for the source's profile when gateway.multiplex_profiles is on (mirroring _run_agent's gating), so _load_gateway_config()/_resolve_gateway_model() resolve the profile's config.yaml via the existing context-local home override. Single-profile gateways never enter the scope — behavior unchanged. Both call sites invoke the helper via asyncio.to_thread: under the scope, resolution can do blocking work (credential refresh, context-length HTTP probes) that previously failed fast unscoped and must not run on the event loop. Fixes NousResearch#59003 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * chore(release): map irresi author email for PR NousResearch#59048 salvage --------- Co-authored-by: irresi <blueirobin02@gmail.com> Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
randlee
pushed a commit
to randlee/hermes-agent
that referenced
this pull request
Aug 11, 2026
NousResearch#59048 salvage) (NousResearch#59329) * fix(gateway): scope reset banners' session info to the serving profile The auto-reset notice and the manual /reset //new banner both appended _format_session_info() outside any profile scope, so a multiplexed gateway advertised the base config's model/provider/context while the session actually ran on the profile's. Route both call sites through a new _reset_notice_session_info(source), which enters _profile_runtime_scope for the source's profile when gateway.multiplex_profiles is on (mirroring _run_agent's gating), so _load_gateway_config()/_resolve_gateway_model() resolve the profile's config.yaml via the existing context-local home override. Single-profile gateways never enter the scope — behavior unchanged. Both call sites invoke the helper via asyncio.to_thread: under the scope, resolution can do blocking work (credential refresh, context-length HTTP probes) that previously failed fast unscoped and must not run on the event loop. Fixes NousResearch#59003 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * chore(release): map irresi author email for PR NousResearch#59048 salvage --------- Co-authored-by: irresi <blueirobin02@gmail.com> Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Reset banners (
/new,/reset, auto-reset) in multiplex mode now report the serving profile's model/provider/context instead of the base config's: session info is rendered inside_profile_runtime_scopefor the resolved profile home.Salvages #59048 by @irresi (clean cherry-pick, authorship preserved). Fixes #59003.
Root cause:
_format_session_info()was called bare at run.py's auto-reset notice and slash_commands'/reset//newhandler — both outside any profile scope, so every profile's banner showed the default profile's config.Changes
gateway/run.py: new_reset_notice_session_info(source)wraps_format_session_info()in_profile_runtime_scope(self._resolve_profile_home_for_source(source))when multiplexing; called viaasyncio.to_thread(scope entry can do blocking credential work)gateway/slash_commands.py:/reset//newuse the wrappertests/gateway/test_session_info.py: profile-scoped banner testsscripts/release.py: AUTHOR_MAP entryValidation
/newon secondary profileSixth PR in the multiplex isolation cluster (#59310, #59315, #59320, #59321, #59325).
Infographic