The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
docs(gateway): scope comments say what the off-loop reads depend on
kshitijk4poora7c6f729beb1
diff --git a/gateway/session_ancillary.py b/gateway/session_ancillary.pyindex 4a88f90654c..5619d36ddcf 100644--- a/gateway/session_ancillary.py+++ b/gateway/session_ancillary.py@@ -246,9 +246,9 @@ def _read_projection(authority, live, ref, params, kind):try:return _project(authority, ref, params, kind)except KeyError:- # Deleted/pruned while this read waited for a worker or the lock (retire_live_sessions pops- # on the loop): the projection re-indexes authority.sessions, and a gone session is- # not_found, as the loop-side check answers.+ # Popped from authority.sessions before or during the projection (retire_live_sessions runs+ # on the loop without this lock): the projection re-indexes the map, and a popped session is+ # not_found.if authority.sessions.get(ref.session_id) is not live:raise RuntimeStoreError('not_found') from Noneraisediff --git a/tools/terminal_scope.py b/tools/terminal_scope.pyindex 549326285ac..caeac5135e7 100644--- a/tools/terminal_scope.py+++ b/tools/terminal_scope.py@@ -219,8 +219,8 @@ def _resolve_scope_cwd_placeholder(scope: dict[str, str]) -> None:def prepare_profile_terminal_scope(hermes_home: Any, *, env_overlay: Optional[dict[str, str]] = None) -> dict[str, str]:"""The scope ``install_profile_terminal_scope`` installs: the profile's policy, or the refusal scope- when it cannot be resolved. Never raises. Reads the profile files under the current context's home- override and secret scope; the result can be built in a worker and installed on the loop with+ when it cannot be resolved. Never raises. Reads the profile files (the managed-scope overlay under the+ current context's home override); the result can be built in a worker and installed on the loop with``install_and_reset_profile_terminal_scope(prepared=...)``."""try:return build_profile_terminal_scope(hermes_home, env_overlay=env_overlay)