Skip to main content

isolated_auth_enabled

Function isolated_auth_enabled 

Source
pub fn isolated_auth_enabled() -> bool
Expand description

Isolated per-channel auth (identity accounts + OAuth credential dirs). Read directly at every call site rather than cached on DataPaths so identities_dir() behaves consistently regardless of whether the caller built its DataPaths via resolve() (launcher) or from_env() (downstream host/srv).

Resolution order:

  1. AGENTMUX_ISOLATED_AUTH=1 — isolate this channel’s auth. Meant for testing the login and relogin paths from an empty store.
  2. Any other value of AGENTMUX_ISOLATED_AUTH — shared (explicit opt-out).
  3. Unset — shared, on every channel. A new build, a rebuilt branch, task dev and a release all read the same accounts, provider login folders, bundles, drones, native memory, Global Memory and MuxBus sign-in, so a new build needs no login (SPEC_SHARED_AUTH_ACROSS_CHANNELS_2026_10_03.md). Until 2026-10-03 every channel except stable defaulted to isolated (SPEC_ISOLATED_AUTH_DEFAULT_BY_CHANNEL_2026_08_06.md).

See docs/specs/SPEC_ISOLATED_AUTH_DEV_TESTING_2026_07_27.md (the underlying mechanism — channel-scoped store + credential dirs — this flag drives, still authoritative).