惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

J
Java Code Geeks
Martin Fowler
Martin Fowler
B
Blog RSS Feed
D
DataBreaches.Net
L
LangChain Blog
月光博客
月光博客
S
SegmentFault 最新的问题
阮一峰的网络日志
阮一峰的网络日志
V
Visual Studio Blog
美团技术团队
Jina AI
Jina AI
博客园 - 司徒正美
雷峰网
雷峰网
Last Week in AI
Last Week in AI
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
IT之家
IT之家
博客园 - 三生石上(FineUI控件)
WordPress大学
WordPress大学
小众软件
小众软件
罗磊的独立博客
博客园_首页
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
A
About on SuperTechFans
Engineering at Meta
Engineering at Meta

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
fix: expand browser executable home paths · openclaw/open...
steipete · 2026-04-25 · via Recent Commits to openclaw:main

File tree

  • docs

    • gateway

    • tools

  • extensions/browser/src/browser

Original file line numberDiff line numberDiff line change

@@ -66,6 +66,7 @@ Docs: https://docs.openclaw.ai

6666

### Fixes

6767
6868

- Providers/OpenAI: separate API-key and Codex sign-in onboarding groups, and avoid replaying stale OpenAI Responses reasoning blocks after a model route switch.

69+

- Browser/config: expand `~` in `browser.executablePath` before Chromium launch, so home-relative custom browser paths no longer fail with `ENOENT`. Fixes #67264. Thanks @Quratulain-bilal.

6970

- Discord/subagents: preserve thread-bound completion delivery by keeping the requester-agent announce path primary and falling back to direct thread sends only when the announce produces no visible output. (#71064) Thanks @DolencLuka.

7071

- Browser/tool: give Chrome MCP existing-session manage calls a longer default timeout, pass explicit tool timeouts through tab management, and recover stale selected-page MCP sessions instead of forcing a manual reset. Thanks @steipete.

7172

- Browser/sandbox: clean up idle tracked tabs opened by primary-agent browser sessions, while preserving active tab reuse and lifecycle cleanup for subagents, cron, and ACP sessions. Fixes #71165. Thanks @dwbutler.

Original file line numberDiff line numberDiff line change

@@ -219,6 +219,7 @@ See [Plugins](/tools/plugin).

219219

- Local managed `openclaw` profiles auto-assign `cdpPort` and `cdpUrl`; only

220220

set `cdpUrl` explicitly for remote CDP.

221221

- Auto-detect order: default browser if Chromium-based → Chrome → Brave → Edge → Chromium → Chrome Canary.

222+

- `browser.executablePath` accepts `~` for your OS home directory.

222223

- Control service: loopback only (port derived from `gateway.port`, default `18791`).

223224

- `extraArgs` appends extra launch flags to local Chromium startup (for example

224225

`--disable-gpu`, window sizing, or debug flags).

Original file line numberDiff line numberDiff line change

@@ -199,7 +199,7 @@ Browser settings live in `~/.openclaw/openclaw.json`.

199199
200200

If your **system default** browser is Chromium-based (Chrome/Brave/Edge/etc),

201201

OpenClaw uses it automatically. Set `browser.executablePath` to override

202-

auto-detection:

202+

auto-detection. `~` expands to your OS home directory:

203203
204204

```bash

205205

openclaw config set browser.executablePath "/usr/bin/google-chrome"

Original file line numberDiff line numberDiff line change

@@ -1,3 +1,5 @@

1+

import os from "node:os";

2+

import path from "node:path";

13

import { describe, expect, it } from "vitest";

24

import type { BrowserConfig } from "../config/config.js";

35

import { resolveUserPath } from "../utils.js";

@@ -139,6 +141,30 @@ describe("browser config", () => {

139141

});

140142

});

141143
144+

it("expands tilde-prefixed executablePath with the OS home directory", () => {

145+

const resolved = resolveBrowserConfig({

146+

executablePath: " ~/.local/bin/chromium ",

147+

});

148+
149+

expect(resolved.executablePath).toBe(path.resolve(os.homedir(), ".local/bin/chromium"));

150+

});

151+
152+

it("keeps non-tilde executablePath values unchanged after trimming", () => {

153+

const resolved = resolveBrowserConfig({

154+

executablePath: " ./local-chromium ",

155+

});

156+
157+

expect(resolved.executablePath).toBe("./local-chromium");

158+

});

159+
160+

it("normalizes blank executablePath to undefined", () => {

161+

const resolved = resolveBrowserConfig({

162+

executablePath: " ",

163+

});

164+
165+

expect(resolved.executablePath).toBeUndefined();

166+

});

167+
142168

it("normalizes invalid browser tab cleanup numbers to defaults", () => {

143169

const resolved = resolveBrowserConfig({

144170

tabCleanup: {

Original file line numberDiff line numberDiff line change

@@ -1,3 +1,5 @@

1+

import os from "node:os";

2+

import path from "node:path";

13

import {

24

normalizeOptionalString,

35

normalizeOptionalTrimmedStringList,

@@ -125,6 +127,17 @@ function normalizePositiveInteger(raw: number | undefined, fallback: number): nu

125127

return value <= 0 ? fallback : value;

126128

}

127129
130+

function normalizeExecutablePath(raw: string | undefined): string | undefined {

131+

const value = normalizeOptionalString(raw);

132+

if (!value) {

133+

return undefined;

134+

}

135+

if (!/^~(?=$|[\\/])/.test(value)) {

136+

return value;

137+

}

138+

return path.resolve(value.replace(/^~(?=$|[\\/])/, os.homedir()));

139+

}

140+
128141

function resolveBrowserTabCleanupConfig(

129142

cfg: BrowserConfig | undefined,

130143

): ResolvedBrowserTabCleanupConfig {

@@ -287,7 +300,7 @@ export function resolveBrowserConfig(

287300

const headless = cfg?.headless === true;

288301

const noSandbox = cfg?.noSandbox === true;

289302

const attachOnly = cfg?.attachOnly === true;

290-

const executablePath = normalizeOptionalString(cfg?.executablePath);

303+

const executablePath = normalizeExecutablePath(cfg?.executablePath);

291304

const defaultProfileFromConfig = normalizeOptionalString(cfg?.defaultProfile);

292305
293306

const legacyCdpPort = rawCdpUrl ? cdpInfo.port : undefined;