pub fn resolve_settings_dir() -> PathBufExpand description
Resolve the directory containing settings.json.
Priority:
AGENTMUX_SETTINGS_DIRenv var (set by the host app to its config dir)- If
agentmux_common::isolated_settings_enabled— the default for every channel exceptstable, seedocs/specs/SPEC_SETTINGS_ISOLATED_BY_CHANNEL_2026_08_19.md—AGENTMUX_CONFIG_HOMEused DIRECTLY, with no parent-walk. That var already carries the correctly channel-scopedchannels/<ch>/config/directory (re-exported fromAGENTMUX_CONFIG_DIR, seedata_paths.rs’s ownchannels/<ch>/config/ ← settings (channel-wide)layout comment) — this is the fix, using that value as-is instead of walking past it. - Otherwise (global —
stablechannel, or an explicitAGENTMUX_ISOLATED_SETTINGS=0opt-out):AGENTMUX_CONFIG_HOME, walking up two parent directories — unchanged legacy behavior. That var’s value is a channel-scoped.../configdirectory; walking up two levels lands one level ABOVE the channel root (on~/.agentmux/channels/itself, not inside any specific channel), which is what makes this the genuinely shared, cross-channel file. ~/.agentmux(legacy fallback —AGENTMUX_CONFIG_HOMEunset)