diff --git a/gateway/AGENTS.md b/gateway/AGENTS.md index 52fe85fb5b..3f7fc691c9 100644 --- a/gateway/AGENTS.md +++ b/gateway/AGENTS.md @@ -165,6 +165,14 @@ gateway under the backend, and do NOT "fix" update locks by widening the tree-ki Resolve the owning home from the session record (`profile_home`, `agent::` key), never from `os.environ`, which holds the launch profile. Why: eviction that flushed under the launch scope wrote a secondary profile's memories into the default profile's store, silently. +- **`multiplex_profiles: false` is not "no scope ever".** A native hosted room serving a second + profile flips the process-wide guard (`tui_gateway/launch_profile_policy.py:: + activate_multi_profile_hosting`) inside the gateway process, after the adapters were wired; every + standalone entry point (`run_turn.py::_profile_scope_for_source`, the primary adapter's message / + busy / platform-event handlers via `run_adapters.py::_standalone_scoped`) then binds the launch + profile's OWN scope through `run_turn.py::_standalone_launch_scope` — `.env` over the env frozen at + activation, never a `.env`-only rebuild (systemd / `op run` keys have no file) and never live + `os.environ`. Gate a new standalone path on that helper, not on the config flag (#112878). - **Hooks and observers register per served profile.** `builtin_hooks/`, `agent/shell_hooks.py:: register_from_config` and lifecycle observers are prepared under each profile's scope at startup and on profile add/remove; idempotence keys include the profile, and `hooks/` paths resolve at call