From 00eefc7f2bdd1a022e32a12460f6fe273f9c31c6 Mon Sep 17 00:00:00 2001 From: Erosika Date: Tue, 30 Jun 2026 20:34:02 +0000 Subject: [PATCH] style(profile): frame comments around what the code does --- gateway/rich_sent_store.py | 4 +--- model_tools.py | 5 ++--- run_agent.py | 4 ++-- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/gateway/rich_sent_store.py b/gateway/rich_sent_store.py index 090019212b2..264d030941d 100644 --- a/gateway/rich_sent_store.py +++ b/gateway/rich_sent_store.py @@ -25,9 +25,7 @@ _MAX_TEXT_CHARS = 2000 def _store_path() -> str: - # Resolve via get_hermes_home() so the profile override is honored; reading - # os.environ["HERMES_HOME"] directly bypassed it and leaked the index into - # the launch profile (multi-profile tui_gateway / gateway). + # Resolve via get_hermes_home() so the active profile override is honored. from hermes_constants import get_hermes_home home = get_hermes_home() diff --git a/model_tools.py b/model_tools.py index 9e00286f98d..e07f6da68fe 100644 --- a/model_tools.py +++ b/model_tools.py @@ -144,9 +144,8 @@ def _run_async(coro): worker_loop.close() pool = concurrent.futures.ThreadPoolExecutor(max_workers=1) - # Propagate the profile override + approval/sudo callbacks into the - # worker so async tools resolving get_hermes_home() see the active - # profile, not the launch one (multi-profile tui_gateway / gateway). + # Carry the active profile + approval/sudo callbacks into the worker so + # async tools resolve get_hermes_home() under the active profile. from tools.thread_context import propagate_context_to_thread future = pool.submit(propagate_context_to_thread(_run_in_worker)) diff --git a/run_agent.py b/run_agent.py index f511f14f794..ef8a0b69c9f 100644 --- a/run_agent.py +++ b/run_agent.py @@ -1532,8 +1532,8 @@ class AIAgent: review_memory=review_memory, review_skills=review_skills, ) - # Propagate the profile override into the review thread, else it writes - # MEMORY.md / skill review into the launch profile (#54937). + # Carry the active profile into the review thread so MEMORY.md / skill + # review writes land in the right profile (#54937). t = threading.Thread( target=propagate_context_to_thread(target), daemon=True, name="bg-review" )