feat: agent mode toggle and sandbox config isolation for OpenClaw#7612
Open
feat: agent mode toggle and sandbox config isolation for OpenClaw#7612
Conversation
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
~/.openclaw/sandbox/docker/) and direct process (~/.openclaw/) — configs, sessions, agents, and credentials never cross-contaminatelanso channels (Telegram, WhatsApp) work without "Gateway is only bound to loopback" errorsFrontend (web-app)
useAgentModeZustand store (persisted) tracking per-thread agent modeChatInput— only visible when OpenClaw is runningDropdownModelProvidershows "OpenClaw Agent" when agent mode is activeCustomChatTransportroutes to OpenClaw gateway HTTP API with auth token and session key headersModelFactoryregistersopenclawas OpenAI-compatible provideropenclaw_get_auth_token,openclaw_ensure_http_apiBackend (src-tauri)
DOCKER_MODE_ACTIVEatomic flag inmod.rsmakesget_openclaw_config_dir()return the correct path per sandbox mode, called in 5 entry points before any config accesslifecycle.rs: on gateway start, fixes cross-mode agent paths (/home/node/.openclaw/↔ host path), Jan API baseUrl (localhost↔host.docker.internal), and agentmodels.jsonfilescommands.rs: direct process uses stop → install → start cycle instead of plaingateway restartto handle macOS launchd cachingclear_mismatched_session_paths,patch_agent_models_base_url,patch_openclaw_config_base_url— replaced by config directory isolationDOCKER_BIND_MODE/DEFAULT_BIND_MODE→ singleGATEWAY_BIND_MODE = "lan"Test plan