diff --git a/README.md b/README.md
index 28ea310526..dd1affc855 100644
--- a/README.md
+++ b/README.md
@@ -264,7 +264,7 @@ Install the [**chrome-use** extension from the Chrome Web Store](https://chromew
```bash
chrome-use extension install # register the native-messaging host (one-time)
chrome-use open https://x.com/home
-chrome-use status # relay, profile, extension, and session health
+chrome-use status # Chrome process, native host, relay, and session health
```
On macOS/Linux, `chrome-use extension install` also registers the native host in existing custom data directories of running Chromium-family browsers started with `--user-data-dir=`. For a browser that is not running or cannot be discovered, use `chrome-use extension install --user-data-dir "/path/Chrome Data"`; `--user-data-dir=` is also accepted and the option may be repeated. Every explicit directory must already exist. The command lists written manifests and reads back their name and launcher path. This confirms registration only: reopen the side panel in that Chrome or wait for automatic reconnection. Windows uses HKCU registration and rejects this option. Discovery scans only the current user’s processes. Failures in discovered directories warn and skip that registration; default and explicit directory failures remain errors (retry with `--user-data-dir`). Successful custom registrations are recorded in `~/.chrome-use/custom-host-dirs.json` for status and uninstall even when the browser is stopped. Recording failures warn that uninstall may leave manifests behind.
@@ -285,6 +285,8 @@ start because it is missing or has an unsupported executable format. Execution
permission denials and errors from an already-started SQLite query remain
explicit errors; locked or corrupt databases are not retried with another tool.
+If the relay is offline, run `chrome-use status` and `chrome-use browsers`. Open the intended profile if Chrome is stopped. If the native host needs repair or the extension popup in that profile says **Not paired**, run `chrome-use extension install --all-profiles`, fully quit Chrome, and reopen it. If the extension is paired and the relay stays offline, reopen the popup or reload the extension at `chrome://extensions`. Retry `chrome-use connect --browser ` to verify the connection.
+
`extension install` is the one-time setup. `chrome-use extension connect` (alias `chrome-use reconnect`) re-attaches to an already-installed extension's relay without reinstalling anything. Chrome still shows its "chrome-use started debugging this browser" bar on attached agent tabs; `chrome-use extension connect --silent` removes it by restarting Chrome once with `--silent-debugger-extension-api` (tabs and logins are restored; it refuses when several Chrome instances are running). `--keep-banner` leaves Chrome alone, and without either flag it asks first in an interactive terminal. `chrome-use reconnect` and `extension connect --browser ` restart Chrome only with `--silent`, and never when the selected profile's relay is refusing connections.
All AI sessions in a Chrome profile share one background agent window, with one tab group per session; your own window stays separate. Existing windows with verified agent ownership are reused, including fullscreen windows. Unknown ownership or failed placeholder cleanup refuses instead of creating more windows. User tabs are never moved or deleted to reclaim a window. If you open or drag your own tabs into the agent window, that window becomes yours: agent tabs already there keep working, and new agent tabs go to one fresh agent window that later sessions share.
@@ -455,7 +457,7 @@ Regular Human pointer clicks now use a seeded 60–200ms settling pause after mo
| `chrome-use auth login --bwu [--item ]` | Fill the current login page from Bitwarden; handles TOTP and supported passkey second factors |
| `chrome-use auth login --bwu --passkey` | Sign in with a vault passkey in `--launch` mode (bwu 0.9.0+) |
| `chrome-use auth login --1password [--item ]` | Fill the current login page from 1Password (username, password and TOTP; no passkeys) |
-| `chrome-use status` | Relay transport, recent debugger timeouts, duplicate installs, extension version skew, and session health. With ab-connect 0.5.50+, host disconnect schedules a first retry after 1s, with repeated failures backing off to 30s. Dead-socket command/event waits fail; old replies are not replayed. Failed sends/lost replies report action_outcome_unknown with retryable: false. Check the page before repeating an interrupted write |
+| `chrome-use status` | Chrome process state, native host registration, relay transport, recent debugger timeouts, duplicate installs, extension version skew, and session health. With ab-connect 0.5.50+, host disconnect schedules a first retry after 1s, with repeated failures backing off to 30s. Dead-socket command/event waits fail; old replies are not replayed. Failed sends/lost replies report action_outcome_unknown with retryable: false. Check the page before repeating an interrupted write |
| `chrome-use close --forget-untracked` | Explicit recovery for stale ownership records with no tab identity. Requires two valid registry absence reads; reports ownershipDropped and does not claim those Chrome tabs were closed. Cannot be combined with a tab or --all |
`set device "iPhone 13"` uses a 390 × 844 CSS viewport at 3× scale and an iOS 15 user agent.
@@ -498,6 +500,12 @@ Chrome keeps the discarded tabs. Older relays without `ABExt.inspectTab` rely on
Tab creation, selection, and adoption stay in the background by default. On macOS,
a page that opens a tab itself can briefly bring Chrome to the front. The click
reports `focusRestored` and, when restoration is unconfirmed, a `focusNote`.
+If Chrome appears before the relay lists the popup, chrome-use checks once more
+after 150 ms. On that check, the popup must name the clicked tab as its opener.
+For a read-only link with an ordinary `href`, `click @ref --new-tab` opens the
+destination in a background tab and skips the page’s click handler. In a
+same-origin loopback test on Chrome 155, the first request carried the
+`SameSite=Strict` session cookie and the source tab stayed selected.
`--activate` (alias `--front`) and `bringToFront` are the explicit exceptions:
they change the visible tab, focus that Chrome window and leave the tab in the
foreground, so agents are told to use them only when you ask. If new-tab initialization
@@ -736,6 +744,8 @@ Use independent detectors to evaluate fingerprints. [Botcheck](https://botcheck.
## Permissions & safety
+The Smart Effort review prompt in Cursor accepts rules about security-related code changes. When a field triggers payment confirmation during a fill, the description can identify the field attribute and the kind of payment cue it matched. Include that reason when reporting a false positive.
+
On your own Chrome, chrome-use checks every agent action against the site it lands on before running it. By default it asks you first on banking, brokerage, crypto exchange and government ID sites (a [maintained list](cli/src/native/sensitive_sites.json)), and before typing into payment card fields and purchases. Asking before password fields and downloads is off by default, since agents sign in and download on their own; turn it on per category. You answer in the side panel, its notification or the options page: **Allow once**, **Always allow on this site**, or **Decline**. The options page keeps the approved and blocked sites and a permission history. The gated command exits with code 3 and the agent runs `chrome-use confirm ` to wait for your choice. Turn the defaults off on the options page, with `CHROME_USE_SENSITIVE_SITES=0`, or in the `sites` block of an `--action-policy` file. Organizations can pin allowed and blocked domains, the action policy and disabled agents through Chrome enterprise policy (`chrome.storage.managed`). The check runs in the CLI, so pages see nothing new. See [Permissions & Safety](https://chrome-use.leeguoo.com/en/permissions.html).
## More in the docs
@@ -825,6 +835,8 @@ Apache-2.0
`debugger_access_denied` lists browser-wide candidate extension names and IDs when available. Verify which extension injects a frame into the blocked tab before disabling it; the list does not prove the cause.
+If a snapshot stays blocked, `data.extensionFrameCleanup` reports this command’s cleanup status and reason. Leave the form open. Ask the user to close the visible extension menu or hide its autofill prompt on this site, then run `snapshot -i` in the same session.
+
A refused dynamic-form ref now reports `code: "stale_ref"` with `retryable: false`. Refresh `snapshot -i`, then use the current dialog's ref or a unique stable CSS/semantic locator; no input is sent by the refusal. Keep verification enabled and do not replace trusted input with a DOM click. For `debugger_access_denied`, close a visible autofill menu or save-login bar first; hiding a tab may not dismiss a save-login bar. Candidate-extension lookup is best effort and never replaces the original access denial.
Video publisher sources and cover review: `wechat-channels/publish` still comes from bundled OpenCLI; it was not removed. OpenCLI 1.8.8 also provides Xiaohongshu image-note publishing, not a video publisher, and its TikTok manifest has no upload/publish command. Use `site info` to check the installed command and source. The bundled WeChat and Douyin video publishers now default to a chrome-use `--cover-mode review` preflight that refuses an implicit platform cover before invoking the adapter (`code: "cover_selection_required"`, `retryable: false`). WeChat `--manual true` or `--draft true` prepares the form without automatic publication; `--cover-mode keep` explicitly accepts the upstream platform-selected cover, without claiming to preserve a cover chosen in a previous form. Douyin's existing `--cover ` remains supported; `--cover-mode upload` requires it. Unsupported cover arguments and AI/frame modes are refused rather than silently ignored. Added OpenCLI sources keep their own schemas. Local frame extraction is available only on opted-in native adapters; existing-work cover updates remain unimplemented.
diff --git a/README.zh.md b/README.zh.md
index 969fda1cae..9a122c1a00 100644
--- a/README.zh.md
+++ b/README.zh.md
@@ -252,7 +252,7 @@ chrome-use teach replay ~/.chrome-use/teach/checkout.json --arg-env password=SHO
```bash
chrome-use extension install # 注册原生消息 host(一次性)
chrome-use open https://x.com/home
-chrome-use status # 中继、profile、扩展与会话健康总览
+chrome-use status # 查看 Chrome 进程、原生宿主、中继和会话状态
```
在 macOS/Linux 上,`chrome-use extension install` 还会为正在运行、以 `--user-data-dir=` 单独启动的 Chromium 系浏览器注册本地 host,扫描到的自定义目录必须已经存在。如果浏览器尚未运行或无法被扫描到,可执行 `chrome-use extension install --user-data-dir "/path/Chrome Data"`;也接受 `--user-data-dir=`,可重复指定多个目录。显式指定的目录不存在时会报错。命令会列出写入的清单,并回读校验 host 名称和启动器路径。这只确认注册完成;之后请在该 Chrome 里重新打开侧栏,或等扩展自动重连。Windows 使用 HKCU 注册表注册,不支持此选项。 自动扫描仅限当前用户的进程;发现目录写入或校验失败时警告并跳过,可用 `--user-data-dir` 重试,默认或显式目录失败仍报错。成功写入的自定义数据目录记录在 `~/.chrome-use/custom-host-dirs.json`,供状态查询和浏览器停止后的卸载清理使用;记录失败会警告卸载可能残留清单。
@@ -269,6 +269,8 @@ macOS 先使用 PATH 中的 `sqlite3`,只有工具缺失或可执行格式不
`/usr/bin/sqlite3`。执行权限拒绝,以及 SQLite 已启动后返回的查询错误,仍会明确报错;
数据库锁定或损坏不会通过换一个工具重试。
+中继离线时,先运行 `chrome-use status` 和 `chrome-use browsers`。如果 Chrome 未运行,打开目标 profile。如果原生宿主注册有误,或该 profile 的扩展弹窗显示 **Not paired**,运行 `chrome-use extension install --all-profiles`,完全退出 Chrome,再重新打开。如果扩展已配对但中继仍离线,重新打开扩展弹窗,或在 `chrome://extensions` 重新加载扩展。用 `chrome-use connect --browser ` 确认连接。
+
`extension install` 是一次性的安装步骤。`chrome-use extension connect`(别名 `chrome-use reconnect`)在扩展已装好的前提下重新连上它的中继,不重装任何东西。被 attach 的 agent 标签页上 Chrome 仍会显示「chrome-use started debugging this browser」提示条;`chrome-use extension connect --silent` 会带 `--silent-debugger-extension-api` 把 Chrome 重启一次来去掉它(标签和登录自动恢复;同时开着多个 Chrome 实例时不会重启)。`--keep-banner` 完全不碰浏览器;两个 flag 都不带时,交互终端里会先问一句。详见[静音提示条](https://chrome-use.leeguoo.com/debugger-banner-silence.html)。
AI 标签默认开在你正在用的窗口里,以后台标签打开、不抢焦点;每个会话有自己的标签组,组名前面带 ✦,一眼能和你自己的标签分开。加 `--window dedicated` 则改为同一 Chrome profile 的所有 AI 会话共用一个后台专用窗口:已有窗口只要标签归属都能确认是 AI,就会复用,全屏也不另开窗口。归属不明或空白占位页清理失败时会报错,避免继续增加窗口。不会为回收窗口而搬走或删除用户页。你在 AI 窗口里开了或拖进了自己的页面,这个窗口就归你:里面已有的 AI 标签照常工作,新的 AI 标签开到一个新的 AI 窗口,之后的会话共用它。
@@ -437,7 +439,7 @@ Agent 在你的 Chrome 里操作:你能实时看到开标签、加载、点击
| `chrome-use auth login --bwu [--item ]` | 从 Bitwarden 填写当前登录页,处理 TOTP 和支持的 passkey 两步验证 |
| `chrome-use auth login --bwu --passkey` | 在 `--launch` 浏览器中用 passkey 登录(bwu 0.9.0+) |
| `chrome-use auth login --1password [--item ]` | 从 1Password 填写当前登录页(用户名、密码和 TOTP;不含 passkey) |
-| `chrome-use status` | 中继传输、近期 debugger 超时、重复扩展、版本偏差与会话健康总览。ab-connect 0.5.50+ 的 host 断线后首次重试定时为 1 秒,连续失败逐步退避到 30 秒。旧 socket 的命令与事件等待会结束,旧回复不重放;发送失败或回复丢失报告 action_outcome_unknown 和 retryable: false;中断的写操作须先检查页面再决定是否重复 |
+| `chrome-use status` | Chrome 进程状态、原生宿主注册、中继传输、近期 debugger 超时、重复扩展、版本偏差与会话健康总览。ab-connect 0.5.50+ 的 host 断线后首次重试定时为 1 秒,连续失败逐步退避到 30 秒。旧 socket 的命令与事件等待会结束,旧回复不重放;发送失败或回复丢失报告 action_outcome_unknown 和 retryable: false;中断的写操作须先检查页面再决定是否重复 |
| `chrome-use close --forget-untracked` | 显式恢复:仅放弃没有标签身份、且两次有效 Chrome registry 查询都未列出的旧归属记录。返回 ownershipDropped,不声称原来的标签已关闭。不能与单个标签或 --all 合用 |
`set device "iPhone 13"` 使用 390 × 844 CSS 视口、3× 缩放和 iOS 15 用户代理。
@@ -469,7 +471,10 @@ JSON 健康摘要只包含 `transportResponsive`、`hostDiagnostic`、`nativeHos
并从新标签读取页面地址确认加载结果。原标签会保留。缺少 `ABExt.inspectTab` 的旧扩展依赖缓存,仍可能复用已回收的标签。
新建、选择与接管标签默认在后台进行。在 macOS 上,网页自行打开标签时,Chrome 可能短暂切到前台。
-点击结果的 `focusRestored` 表示是否已确认恢复焦点;未确认时可查看 `focusNote`。
+点击结果的 `focusRestored` 表示是否已确认恢复焦点,未确认时可查看 `focusNote`。
+如果 Chrome 已到前台、扩展还没列出弹窗,chrome-use 会等 150 毫秒再查一次。新弹窗明确来自刚点击的标签页时,才会切回原应用。
+只想读取普通 `href` 链接时,`click @ref --new-tab` 会在后台打开目标地址,跳过页面的点击处理函数。
+在 Chrome 155 的回环同源测试里,首次请求带上了 `SameSite=Strict` 会话 cookie,原标签页仍被选中。
`--activate`(别名 `--front`)和 `bringToFront` 是显式的例外:它们会切换可见标签、
聚焦那个 Chrome 窗口并让目标保持在前台,所以 agent 只在你要求时才用。新标签初始化失败后,
chrome-use 会保留该标签并报告目标 ID。保持相同 session 和连接端点,执行
@@ -649,6 +654,8 @@ CDP 的 IME 路径会产生 composition 事件,但 Chrome 可能将 `compositi
## 权限与安全
+Cursor 的 Smart Effort 可填写涉及安全代码变更的审查规则。填写普通输入框却收到支付确认时,可以查看确认说明。若能定位触发来源,提示会写明字段属性和匹配到的支付特征,报告误判时可直接引用。
+
驱动你自己的 Chrome 时,chrome-use 在执行每个 agent 操作前会按它落在的站点检查一次。默认情况下,在银行、券商、加密货币交易所和政府证件站点上(见[维护中的列表](cli/src/native/sensitive_sites.json)),以及在支付卡字段里输入、购买之前,会先问你。密码字段和下载默认不问(agent 经常自己登录和下载),可按类别打开。你在侧栏、通知或选项页里选择**仅允许这一次**、**始终允许此站点**或**拒绝**;选项页保存已允许和已屏蔽的站点以及权限记录。被拦下的命令以退出码 3 结束,agent 运行 `chrome-use confirm ` 等你选择。可以在选项页、用 `CHROME_USE_SENSITIVE_SITES=0`,或在 `--action-policy` 文件的 `sites` 段里关闭这些默认规则。组织可以通过 Chrome 企业策略(`chrome.storage.managed`)锁定允许和屏蔽的域名、操作策略和停用的 agent。检查在 CLI 里完成,页面看不到任何新东西。详见[权限与安全](https://chrome-use.leeguoo.com/permissions.html)。
## 文档里还有
@@ -734,6 +741,8 @@ Apache-2.0
`debugger_access_denied` 会尽可能列出浏览器范围内的候选扩展名称和 ID。先确认哪个扩展向被阻挡的标签页注入了框架,再禁用它;候选列表不能证明原因。
+快照仍被阻挡时,`data.extensionFrameCleanup` 会说明本次是否清理、结果如何。保留当前表单,请用户关闭可见的扩展菜单,或只在这个网站隐藏填充提示,再在原会话执行 `snapshot -i`。
+
动态表单的 ref 身份核验被拒绝时,返回 `code: "stale_ref"`、`retryable: false`,不会发送输入。重新执行 `snapshot -i`,使用当前弹窗中的 ref,或唯一且稳定的 CSS/语义定位器。保留身份核验,不要改用 DOM 点击绕过真实输入。遇到 `debugger_access_denied` 时,先关闭可见的自动填充菜单或保存登录信息提示条;隐藏标签页不一定能关闭提示条。候选扩展查询失败时仍保留原始访问拒绝错误。
发布器来源与封面核对:`wechat-channels/publish` 仍由内置 OpenCLI 提供,没有被移除。OpenCLI 1.8.8 还提供小红书图文发布,但不是视频发布;其 TikTok 清单没有上传/发布命令。用 `site info` 查看当前命令及来源。内置视频号、抖音视频发布器现在默认经过 chrome-use 的 `--cover-mode review` 检查,未明确选择封面时不会调用适配器,返回 `code: "cover_selection_required"`、`retryable: false`。视频号可以用 `--manual true` 或 `--draft true` 准备表单而不自动发布;`--cover-mode keep` 明确接受上游平台选出的封面,不承诺保留之前表单里手选的封面。抖音原有的 `--cover ` 继续可用,`--cover-mode upload` 必须同时提供图片。不支持的封面参数、AI/指定帧模式会明确拒绝,不再静默忽略。额外添加的 OpenCLI 来源保留自己的参数定义。已声明接入的原生适配器支持本地截帧;修改已发布作品封面仍未实现。
diff --git a/cli/src/connect.rs b/cli/src/connect.rs
index bf174171c2..b64bcfee92 100644
--- a/cli/src/connect.rs
+++ b/cli/src/connect.rs
@@ -2739,7 +2739,8 @@ fn approved_config_profiles() -> (bool, Vec<&'static str>) {
}
/// What the process list says about Chrome.
-#[derive(Debug, Clone, Copy, PartialEq, Eq)]
+#[derive(Debug, Clone, Copy, PartialEq, Eq, serde::Serialize)]
+#[serde(rename_all = "camelCase")]
pub(crate) enum ChromeProcess {
Running,
NotRunning,
@@ -2749,6 +2750,35 @@ pub(crate) enum ChromeProcess {
Unknown,
}
+impl ChromeProcess {
+ pub(crate) fn label(self) -> &'static str {
+ match self {
+ Self::Running => "running",
+ Self::NotRunning => "not running",
+ Self::Unknown => "unknown",
+ }
+ }
+}
+
+/// A live extension can confirm a running browser even if its process is
+/// hidden. On platforms without the process probe, report that uncertainty.
+pub(crate) fn observed_chrome_process(relay_up: bool) -> ChromeProcess {
+ if relay_up {
+ return ChromeProcess::Running;
+ }
+ #[cfg(unix)]
+ {
+ chrome_process()
+ }
+ #[cfg(not(unix))]
+ {
+ ChromeProcess::Unknown
+ }
+}
+
+/// Only the extension popup can report why it has no native connection.
+pub(crate) const RELAY_PAIRING_HELP: &str = "Open the chrome-use extension popup in the intended profile. If it says Not paired, run `chrome-use extension install --all-profiles`, fully quit Chrome, then relaunch that profile. If the relay stays down, reload the extension at chrome://extensions where available, then retry.";
+
/// Combine what pgrep said about Chrome with whether it can see a process
/// that is always running. `None` is pgrep failing to run or erroring.
pub(crate) fn classify_chrome_process(
@@ -3162,7 +3192,14 @@ pub(crate) fn profile_listed_active(local_state: &serde_json::Value, dir: &str)
/// whether its worker is loaded. Recovery waits before requesting a window.
/// `None` means not running, no extension, active, or unreadable metadata.
pub(crate) fn closed_relay_profile(selector: Option<&str>) -> Option {
- if chrome_process() != ChromeProcess::Running {
+ unlisted_profile_when_running(chrome_process(), selector)
+}
+
+pub(crate) fn unlisted_profile_when_running(
+ process: ChromeProcess,
+ selector: Option<&str>,
+) -> Option {
+ if process != ChromeProcess::Running {
return None;
}
let profiles = chrome_profiles();
@@ -4142,13 +4179,17 @@ pub fn relay_health() -> RelayHealth {
/// The same snapshot for one relay endpoint: a profile picked with
/// `--browser` (#910), not whichever host wrote the generic sidecar last.
pub fn relay_health_at(url: &str) -> RelayHealth {
+ relay_health_within(url, std::time::Duration::from_secs(10))
+}
+
+pub(crate) fn relay_health_within(url: &str, budget: std::time::Duration) -> RelayHealth {
let Ok(runtime) = tokio::runtime::Builder::new_current_thread()
.enable_all()
.build()
else {
return RelayHealth::default();
};
- runtime.block_on(probe_relay_health(url, std::time::Duration::from_secs(10)))
+ runtime.block_on(probe_relay_health(url, budget))
}
/// What to do about a profile relay that refuses connections (#910): its
@@ -4167,11 +4208,23 @@ pub const REFUSED_RELAY_FIX: &str = "Its native host has stopped and ab-connect
/// died, so its existence alone is not "connected" (#910). Blocking and
/// runtime-free, so sync callers inside or outside tokio can use it.
pub fn relay_endpoint_accepts(url: &str) -> bool {
+ relay_endpoint_accepts_within(url, std::time::Duration::from_secs(1)) == Some(true)
+}
+
+/// Some(false) means every resolved address explicitly refused the connection.
+pub(crate) fn relay_endpoint_accepts_within(
+ url: &str,
+ budget: std::time::Duration,
+) -> Option {
use std::net::ToSocketAddrs;
+ if budget.is_zero() {
+ return None;
+ }
+ let start = std::time::Instant::now();
let Ok(uri) = url.parse::() else {
- return false;
+ return None;
};
- let Some(host) = uri.host() else { return false };
+ let host = uri.host()?;
let port = uri
.port_u16()
.unwrap_or(if uri.scheme_str() == Some("wss") {
@@ -4180,11 +4233,22 @@ pub fn relay_endpoint_accepts(url: &str) -> bool {
80
});
let Ok(addrs) = (host.trim_matches(['[', ']']), port).to_socket_addrs() else {
- return false;
+ return None;
};
- addrs.into_iter().any(|addr| {
- std::net::TcpStream::connect_timeout(&addr, std::time::Duration::from_secs(1)).is_ok()
- })
+ let mut refused = false;
+ let mut uncertain = false;
+ for addr in addrs {
+ let left = budget.saturating_sub(start.elapsed());
+ if left.is_zero() {
+ return None;
+ }
+ match std::net::TcpStream::connect_timeout(&addr, left) {
+ Ok(_) => return Some(true),
+ Err(e) if e.kind() == std::io::ErrorKind::ConnectionRefused => refused = true,
+ Err(_) => uncertain = true,
+ }
+ }
+ (refused && !uncertain).then_some(false)
}
/// The extension version one profile's extension reported, from its own
@@ -7628,7 +7692,20 @@ printf '%s\000' "$HOME" "${CHROME_USE_RELAY_DIR-__unset__}" "$@"
assert!(relay_endpoint_accepts(&format!(
"ws://127.0.0.1:{port}/devtools/browser/x"
)));
+ let url = format!("ws://127.0.0.1:{port}/devtools/browser/x");
+ assert_eq!(
+ relay_endpoint_accepts_within(&url, std::time::Duration::ZERO),
+ None
+ );
+ assert_eq!(
+ relay_endpoint_accepts_within("not a url", std::time::Duration::from_secs(1)),
+ None
+ );
drop(listener);
+ assert_eq!(
+ relay_endpoint_accepts_within(&url, std::time::Duration::from_secs(1)),
+ Some(false)
+ );
// Port 1 (outside the ephemeral range, so no self-connect): refused.
assert!(!relay_endpoint_accepts(
"ws://127.0.0.1:1/devtools/browser/x"
diff --git a/cli/src/main.rs b/cli/src/main.rs
index 3eaafc5e97..8042dea15f 100644
--- a/cli/src/main.rs
+++ b/cli/src/main.rs
@@ -1726,7 +1726,7 @@ fn status_selected_profile(
fn run_status(session: &str, json_mode: bool, browser: Option<&str>) {
let selected = match browser.map(str::trim).filter(|s| !s.is_empty()) {
None => None,
- Some(sel) => match status_selected_profile(&profiles::load_rows(), sel) {
+ Some(sel) => match status_selected_profile(&profiles::load_listening_rows(), sel) {
Ok(row) => Some((sel.to_string(), row)),
Err(msg) => {
if json_mode {
@@ -1752,6 +1752,8 @@ fn run_status(session: &str, json_mode: bool, browser: Option<&str>) {
(_, ws) => connect::relay_health_and_profiles_at(ws),
};
let relay_up = health.transport_responsive;
+ let process = connect::observed_chrome_process(relay_up);
+ let pairing = if relay_up { "connected" } else { "unverified" };
// The selected profile's relay, probed (#910): a recorded endpoint is not
// a live one.
let selected_accepts = selected_ws
@@ -1769,7 +1771,7 @@ fn run_status(session: &str, json_mode: bool, browser: Option<&str>) {
let closed_profile = if relay_up || selected.is_some() {
None
} else {
- connect::closed_relay_profile(None)
+ connect::unlisted_profile_when_running(process, None)
};
if let Some(profile) = &closed_profile {
warnings.push(connect::closed_relay_profile_message(profile, false));
@@ -1778,13 +1780,22 @@ fn run_status(session: &str, json_mode: bool, browser: Option<&str>) {
match (selected_ws.as_deref(), selected_accepts) {
(None, _) => warnings.push(profiles::not_connected_message(sel, row)),
(Some(ws), Some(false)) => warnings.push(format!(
- "profile {}'s relay at {ws} is not accepting connections. {}",
- row.label(),
- connect::REFUSED_RELAY_FIX
+ "profile {}'s relay at {ws} is not accepting connections.",
+ row.label()
)),
_ => {}
}
}
+ if !relay_up {
+ let hint = if process == connect::ChromeProcess::NotRunning {
+ "Start Chrome in the intended profile, then check status again."
+ } else if !host_installed || !host_healthy {
+ "Run `chrome-use extension install --all-profiles`, fully quit Chrome, then reopen the intended profile."
+ } else {
+ connect::RELAY_PAIRING_HELP
+ };
+ warnings.push(hint.into());
+ }
// Printed next to the driving profile below, so it must be that profile's
// version, not the last `hello` writer's (#319). With --browser, the
// selected profile's own (#910).
@@ -1792,6 +1803,7 @@ fn run_status(session: &str, json_mode: bool, browser: Option<&str>) {
Some((_, row)) => (
row.relay_id
.as_deref()
+ .filter(|_| relay_up)
.and_then(connect::relay_ext_version_for_profile),
row.relay_id
.clone()
@@ -1879,6 +1891,8 @@ fn run_status(session: &str, json_mode: bool, browser: Option<&str>) {
"hostInstalled": host_installed,
"hostHealthy": host_healthy,
"hostLauncherHealthy": host_healthy,
+ "browserProcess": process,
+ "pairing": pairing,
"relayUp": relay_up,
"profileClosed": closed_profile.as_ref().map(|p| p.dir.clone()),
"health": health,
@@ -1913,8 +1927,16 @@ fn run_status(session: &str, json_mode: bool, browser: Option<&str>) {
}
println!("chrome-use {}", env!("CARGO_PKG_VERSION"));
+ println!("Chrome process: {}", process.label());
+ let host_setup = if !host_installed {
+ "no manifest found"
+ } else if !host_healthy {
+ "launcher unavailable"
+ } else {
+ "launcher configured"
+ };
println!(
- "Native host: live {}, installed {}",
+ "Native host: {host_setup}; live {}, installed {}",
health
.native_host_version
.as_deref()
@@ -1925,15 +1947,8 @@ fn run_status(session: &str, json_mode: bool, browser: Option<&str>) {
println!("Selected profile (--browser {sel}): {}", row.label());
}
println!(
- "Extension relay: {}{}",
- if relay_up { "up" } else { "down" },
- if !host_installed {
- " (native host not installed)"
- } else if !host_healthy {
- " (native host launcher broken)"
- } else {
- ""
- }
+ "Extension relay: {} (pairing: {pairing})",
+ if relay_up { "up" } else { "down" }
);
if !health.debugger_warns() {
println!(" {}", health.debugger);
diff --git a/cli/src/native/actions.rs b/cli/src/native/actions.rs
index f4200f7e2c..2758a4ea2a 100644
--- a/cli/src/native/actions.rs
+++ b/cli/src/native/actions.rs
@@ -10142,7 +10142,7 @@ pub(crate) struct DeferredClickTabCheck {
/// How long after a click a tab it opened is given to register before we
/// look for it.
-const CLICK_NEW_TAB_GRACE_MS: u64 = 150;
+pub(super) const CLICK_NEW_TAB_GRACE_MS: u64 = 150;
/// Where a click's pop-up guard goes (#468): the frame of the `@ref` being
/// clicked (its own session for an out-of-process iframe), else the top frame
@@ -18154,6 +18154,33 @@ pub async fn execute_command_recovering(cmd: &Value, state: &mut DaemonState) ->
out
}
+/// Report only the cleanup this command actually performed. A browser-wide
+/// extension candidate does not prove which frame blocked the current tab.
+fn append_frame_cleanup_status(out: &mut Value, requested: bool, receipt: Option<(&str, String)>) {
+ let (status, detail) = receipt.unwrap_or_else(|| {
+ if requested {
+ (
+ "not_attempted",
+ "frame cleanup was requested but did not run on this command".into(),
+ )
+ } else {
+ ("not_requested", "frame cleanup was not requested".into())
+ }
+ });
+ if out["data"].is_null() {
+ out["data"] = json!({});
+ }
+ if let Some(data) = out["data"].as_object_mut() {
+ data.insert(
+ "extensionFrameCleanup".into(),
+ json!({"status":status,"detail":detail}),
+ );
+ }
+ if let Some(Value::String(error)) = out.get_mut("error") {
+ error.push_str(&format!("\nFrame cleanup [{status}]: {detail}. The command still reports debugger access denied. Keep this tab open. After the user closes the extension menu or hides its prompt for this site, resume with `snapshot -i` in the same session."));
+ }
+}
+
async fn execute_command_recovering_scrubbed(cmd: &Value, state: &mut DaemonState) -> Value {
// `fill --from-env`: the whole command, `--observe` included, runs with
// every field treated as sensitive, and the response is scrubbed of the
@@ -18161,11 +18188,35 @@ async fn execute_command_recovering_scrubbed(cmd: &Value, state: &mut DaemonStat
// `auth login --bwu` carries several (username, password, code, custom
// fields) in `secrets`.
let secrets = command_secrets(cmd);
+ let requested = cmd["_clearExtensionFrames"]
+ .as_bool()
+ .unwrap_or_else(super::browser::clear_extension_frames_enabled);
+ let run = async {
+ let (mut out, receipt) = super::browser::with_frame_cleanup_receipt(
+ requested,
+ Box::pin(execute_command_recovering_inner(cmd, state)),
+ )
+ .await;
+ if is_denied(&out) {
+ let receipt = receipt.or_else(|| {
+ (requested && !state.browser.as_ref().is_some_and(BrowserManager::on_relay)).then(
+ || {
+ (
+ "not_applicable",
+ "frame cleanup requires a tab on the extension relay".to_string(),
+ )
+ },
+ )
+ });
+ append_frame_cleanup_status(&mut out, requested, receipt);
+ }
+ out
+ };
if secrets.is_empty() {
- return Box::pin(execute_command_recovering_inner(cmd, state)).await;
+ return Box::pin(run).await;
}
let mut out = super::sensitive::SECRET_COMMAND
- .scope(true, Box::pin(execute_command_recovering_inner(cmd, state)))
+ .scope(true, Box::pin(run))
.await;
for secret in &secrets {
super::sensitive::scrub_value(&mut out, secret);
@@ -18310,7 +18361,10 @@ async fn execute_command_recovering_inner(cmd: &Value, state: &mut DaemonState)
}
if is_denied(&second) {
if let Some(Value::String(e)) = second.get_mut("error") {
- let note = no_recovery_note("the menu opened again when the command was repeated", e);
+ let note = no_recovery_note(
+ "Chrome denied debugger access again when the command was repeated",
+ e,
+ );
e.push_str(¬e);
}
}
@@ -18349,23 +18403,19 @@ fn no_recovery_note(reason: &str, error: &str) -> String {
fn no_recovery_note_for(reason: &str, manager: Option<&str>) -> String {
let next = match manager {
Some(name) => format!(
- "Next: run the command again; if it is still blocked, ask the user to deal with \
- the frame (most likely {name}'s), then repeat it. {}",
+ "Ask the user to check the extension UI in this tab (possibly {name}'s). {}",
super::browser::inline_menu_fix(name)
),
None => format!(
- "Next: run the command again; if it is still blocked and a password manager's \
- menu or save bar is visible in that tab, ask the user to close it (Escape, or a \
- click on the page outside the field), then repeat it. If nothing is visible, an \
- extension keeps a hidden frame in the page: the user turns that extension off \
- for this site. For 1Password, which does this: {}",
+ "If a menu or save bar is visible in that tab, ask the user to close it (Escape, or a \
+ click on the page outside the field). If nothing is visible, the user can hide the \
+ extension's autofill prompt for this site. For 1Password: {}",
super::browser::ONE_PASSWORD_HIDE
),
};
format!(
- "\n(No automatic recovery: {reason}.) The tab and what was typed into it are intact: \
- do not close tabs, stop the session or relaunch Chrome over this. {next} To ask the \
- user and wait in one step: `chrome-use session handoff --wait --note \"\"` \
+ "\n(No automatic recovery: {reason}.) To preserve the current form, do not close tabs, stop the session or relaunch Chrome over this. {next} To ask the \
+ user and wait in one step: `chrome-use session handoff --wait --note \"Close the extension menu in this tab, then press Done.\"` \
(shown in the side panel; it returns when they press Done)."
)
}
@@ -26865,10 +26915,10 @@ async fn site_gate_kind(
category: &str,
cmd: &Value,
state: &DaemonState,
-) -> Result
A tab a page opens itself (target=_blank, window.open) brings Chrome to the front over
whatever app you are in (#468). By default chrome-use leaves it to Chrome, exactly like a user's click, and in
- your own Chrome the click says so in openedTabWarning. On macOS chrome-use then puts the app that was in front back in front (on by default): only when Chrome comes to the front within 1.5 s of the click with a tab that was not there before, never when Chrome was already in front or you moved to another app (focusRestored / focusNote on the click). The note distinguishes a failed tab query, no attributable new tab, and a watch that was still running when the click returned. Not done on Windows and Linux. AGENT_BROWSER_RESTORE_FOCUS=0 turns it off. Opt-in:
+ your own Chrome the click says so in openedTabWarning. On macOS chrome-use then puts the app that was in front back in front (on by default): only when Chrome comes to the front within 1.5 s of the click with a tab that was not there before, never when Chrome was already in front or you moved to another app (focusRestored / focusNote on the click). The note distinguishes a failed tab query, no attributable new tab, and a watch that was still running when the click returned. The first check accepts a new tab in a session tab group or an ungrouped tab opened by a session tab. If it finds neither when Chrome comes forward, a second check after 150 ms also requires the clicked tab as opener. Leaving Chrome during the wait cancels restoration. For a read-only link with a plain href, click @ref --new-tab opens the URL directly and skips the page’s click handler. In two private headless Chrome 155.0.8059.39 runs (CLI 1.5.297, extension 0.5.109), both the native same-origin link and explicit --new-tab sent the loopback server’s SameSite=Strict session cookie on the first request. In both cases the source tab stayed selected. Only the native click ran the page’s handler. This test measured browser tab selection; desktop foreground focus was outside its scope. Focus restoration is macOS only. AGENT_BROWSER_RESTORE_FOCUS=0 turns it off. Opt-in:
AGENT_BROWSER_BACKGROUND_LINKS=cross-site (also 1/on) makes chrome-use open
cross-sitetarget=_blank links itself, in a tab the session created (left click,
no modifiers, http(s) href to another registrable domain by the Public Suffix List on both ends, no
diff --git a/docs/en/permissions.html b/docs/en/permissions.html
index dc071a5608..ae13889352 100644
--- a/docs/en/permissions.html
+++ b/docs/en/permissions.html
@@ -82,6 +82,7 @@
When chrome-use asks first
The detection is heuristic. Typing without a ref or selector (focus, then keyboard type) or a pay button with an unusual name can slip through. It is a gate for a person to look, not a sandbox.
--launch and --cdp sessions do not get these defaults (usually nobody is watching there). They follow your policy file only.
+
Cursor’s Smart Effort rule editor accepts review instructions about changes to security code. If an ordinary field triggers payment confirmation during a fill, the description can identify the attribute or snapshot label that matched a payment cue. Include the reason in your report. Keep the entered text private.
Approving
A gated command does not run. It exits with code 3 and prints a confirmation id:
Multiple Chrome profiles: see which one, then pick it
bash
-
# List every connected profile (shows email if identity permission is granted, else a stable id, with the default flagged)
+
# List profiles on disk and connected relays; check the connection and default columns$ chrome-use browsers
# Pin "this session" to a specific profile — sticky per session, so different agents don't interfere
@@ -226,7 +226,7 @@
Let your rules pick: ChooseBrowser
Read-only, and invisible if you do not use it: no rules file means no behaviour change and
no message. A rule is binding: chrome-use never opens its site in a different profile.
If the rule's profile is not connected, the command fails and names
- chrome-use connect --browser <profile> (it opens a window in that profile,
+ chrome-use connect --browser <profile> (it can request a window in that profile,
so ask the user first). If the session is already bound to another profile, the command
also fails: use a new --session (it picks the rule's profile), or pass
--no-choosebrowser to open it in the bound profile anyway. An explicit
@@ -338,39 +338,29 @@
If "Allow remote debugging?" really does pop up
- The extension / relay isn't up. Have the user install the store extension (the one-click link
- above); once installed the relay stays online and this prompt never comes back.
+ The extension relay is offline. Check Chrome, the host registration and the target profile as described below.
-
Relay drops: the CLI self-heals
-
- If a command suddenly reports "couldn't reach your Chrome" / "relay … failed"—usually the MV3 service worker got
- suspended, or two agents are sharing one relay—the CLI now self-heals: it waits for the worker's
- keepalive to bring the relay back (about 25 seconds) and retries once, so most drops you never even notice. If a
- command does surface the error:
-
+
When the extension relay is offline
+
Run chrome-use status to check the Chrome process, native host registration and live relay.
+ Use chrome-use browsers to find the target profile. A profile on disk can remain listed after Chrome quits.
-
Just re-run the command—by then the relay has usually reconnected.
-
Still failing: chrome-use status (daemon-free CLI, extension, relay, profile, and session health) → chrome-use extension connect (re-attach) → retry.
- The CLI registers the native host automatically, and opens the store page if the extension was never installed—you
- don't have to run extension install by hand.
-
Never have the user quit/restart Chrome with --remote-debugging-port to recover a
- dropped relay—that loses all their tabs and completely breaks the extension path.
-
chrome-use reconnect is a friendly alias for extension connect—it rebinds the session
- to the running Chrome with no reinstall needed.
-
Browser totally unrecoverable? Don't sit waiting on a screenshot—fall back to
- non-visual verification: get text / eval, or read the deployed page with
- curl/WebFetch. Confirm a change is correct via DOM/HTML or the live URL, not a
- failure. Save screenshots for the visual checks you actually need to report to the user.
+
If Chrome is stopped, open it in the target profile. If the process state is unknown, check whether Chrome is running.
+
If the native host needs repair or the profile’s extension popup says Not paired, run
+ chrome-use extension install --all-profiles, fully quit Chrome, then reopen the profile.
+
If the popup shows the extension is paired but the relay stays offline, open the popup again or reload
+ chrome-use at chrome://extensions. An offline relay alone cannot tell you whether its worker is asleep.
+
The RELAY LISTENER column in browsers reports a TCP check. Use status on the profile to confirm an extension reply. When the port is already listening, connect waits without requesting another window.
+
chrome-use connect --browser <profile> can request a window. It waits up to 120 seconds
+ by default for that profile’s relay. If an earlier write was interrupted, check the page before repeating it.
✅ Don't serialize agents to dodge "fragility"
- A relay drop is transient and self-heals; it is not a signal that a shared browser can't be
- driven concurrently. Concurrent multi-agent is supported—each --session has its own
+ Concurrent multi-agent use is supported—each --session has its own
tab group and drives only its own tabs. Give each agent a distinct --session and run them in parallel
instead of one at a time.
Side panel: Specified native messaging host not found.
The extension popup shows Connected only after a native-host reply. Until then it shows Connecting; failures show their concrete error. An older host can be confirmed by the first real CLI command. A confirmed host link does not prove every page is drivable.
A protected extension iframe can cause debugger_access_denied on an ordinary web tab. Chrome checks the frame tree before dispatching parent-page commands; disabling auto-attach or filtering child events cannot remove this restriction. The error lists the extensions that have frames open in the browser, with a chrome://extensions/?id= link for each; these are browser-wide candidates, not confirmed blockers of this tab. The CLI names candidates from local Chrome profiles in its Possible blocking extensions: line, selecting manifests by numeric version. Save work, disable the conflicting extension on this site and reload, or use a profile without it. Do not turn denied commands into successful empty replies or loop on reattachment. 1Password can keep a frame in a sign-in page with nothing shown, so there is no menu to close: on a tab the session created, --clear-extension-frames (or AGENT_BROWSER_CLEAR_EXTENSION_FRAMES=1; ab-connect 0.5.108+ with site access) has the extension remove other extensions' frames from that page from an isolated world, then repeats the command when that is harmless; that extension's widget returns after a reload or on the next page. Otherwise hand the step to the user in one command: session handoff --wait --note "<what to do>". Use tab inspect <ref> for metadata or a separate test profile. Development checks can set the same absolute CHROME_USE_RELAY_DIR in the native host and CLI, with unique sessions and an explicit --browser, to keep candidate relays out of shared discovery.
+
If the page command still fails, read data.extensionFrameCleanup.status and detail. They describe this invocation. A refused cleanup or an unconfirmed reply does not establish which extension owns the frame. Keep the form open, ask the user to close the extension menu or hide its autofill prompt for this site, then run snapshot -i on the same tab.
Native agent-panel configuration journals are also scoped by this directory; their default is ~/.chrome-use/agent-panel. Agent configuration paths remain separate: use the agent's own config-root variable and synthetic settings for write tests. Saving settings does not switch an existing session's model. Inspect current values after an unconfirmed apply or restore; restore preserves external changes and reports field conflicts.
Relay navigation makes up to three bounded access checks and ends the lifecycle wait early on a confirmed debugger access denial. Successful checks or transient errors are not treated as page readiness.
See Local agent side panel for supported agents, permission controls, the current-page tag and deletion scope. An unconfirmed send can be retried explicitly with its original ID; clearing the warning does not cancel possible delivery. Claude permissions remain pending until the matching tool result arrives. Custom programs require absolute paths.
侧栏支持的 agent、权限开关、当前页面标签和删除范围见 本机 agent 侧栏。发送未获确认时,可明确选择用原消息 ID 重试;清除提示不会取消可能已送达的任务。Claude 授权需收到对应工具结果才算处理完成。自定义程序需填绝对路径。
diff --git a/skill-data/core/SKILL.md b/skill-data/core/SKILL.md
index b34cbe4941..3675c2e937 100644
--- a/skill-data/core/SKILL.md
+++ b/skill-data/core/SKILL.md
@@ -122,7 +122,7 @@ waits for that choice, and your own `confirm` never approves it.
| Reads, frames, shadow roots, screenshot crops | `core/reading` |
| Waiting, scroll animations, observation limits | `core/waiting` |
| Ref identity, snapshot detail | `core/snapshot-refs` |
-| Diagnostics, profiles, launch, stealth | `core/connection` |
+| Diagnose an offline Chrome profile (`status`, `browsers`), launch, stealth | `core/connection` |
| Repeats, output and verification | `core/behaviour` |
| Site adapters | `core/site-adapters` |
| Teach a flow, replay without a model | `core/teach` |
diff --git a/skill-data/core/references/commands.md b/skill-data/core/references/commands.md
index cddba4b40a..4b9dc5a823 100644
--- a/skill-data/core/references/commands.md
+++ b/skill-data/core/references/commands.md
@@ -709,7 +709,15 @@ back in front (measured: Chrome in front for about 45–60 ms). The click report
`focusRestored: true` with `focusRestoredApp` and `focusRestoredAfterMs`, or
`focusRestored: false` with `focusNote` describing what the watch observed.
The note distinguishes a failed tab query, a query that found no attributable
-new tab, and a result collected before the watch finished. It never switches apps
+new tab, and a result collected before the watch finished. If the relay has yet
+to list the popup, a single check after 150 ms requires the clicked tab as opener
+and the same browser process to remain in front, within the original 1.5 s.
+For read-only navigation using a plain `href`, explicit `click @ref --new-tab`
+opens the URL without dispatching the page’s click handler. A private headless
+Chrome 155 test with a loopback origin and a `SameSite=Strict` session cookie
+observed an authenticated first request while the source tab stayed selected.
+Use the native click when the link depends on its handler.
+It never switches apps
when Chrome was already the frontmost app before the click (you are in Chrome;
the agent's window may then become Chrome's focused window), when another app
came to the front (you moved), or when Chrome came to the front without a new
@@ -969,9 +977,13 @@ chrome-use extension status # is the host installed?
chrome-use extension uninstall # remove the host manifest
```
-`chrome-use status --json` reports native-host launcher health as
-`data.extension.hostHealthy`, so a stale launcher is distinguishable from a
-missing manifest or a disconnected relay.
+In `chrome-use status --json`, `data.extension.browserProcess` is
+`running`, `notRunning` or `unknown`. `data.extension.pairing` is
+`connected` after an extension replies to diagnostics and `unverified`
+otherwise. `hostInstalled` and `hostLauncherHealthy` (also exposed as
+`hostHealthy`) describe the host configuration on disk. `chrome-use browsers --json` reports the process state
+as `data.browserProcess`; a profile is connected when its relay endpoint
+accepts a connection.
Security: the extension↔host link is authenticated by Chrome (extension id); the
host↔chrome-use CDP link uses an unguessable URL in a 0600 file. Use this when
diff --git a/skill-data/core/references/connection.md b/skill-data/core/references/connection.md
index d49264cfe3..9a2dd0e3d0 100644
--- a/skill-data/core/references/connection.md
+++ b/skill-data/core/references/connection.md
@@ -81,6 +81,17 @@ and tab cleanup on two local fixtures. Stop the Moli process when finished.
`chrome-use status` reads extension state without a session daemon or debugger command. Stale relay files do not count as online. A healthy relay does not prove
that an individual page renderer responds; verify the intended page separately.
+The `RELAY LISTENER` column in `browsers` reports a TCP check. Use `status --browser ` to confirm an extension reply. When the selected port is already listening, `connect --browser` waits there without requesting another window.
+
+For a disconnected profile, read the Chrome process state, native host
+registration and live relay separately. If the process state is unknown, check
+whether Chrome is open. If Chrome is stopped, open the target profile.
+If the registration needs repair or its extension popup says **Not paired**,
+run `chrome-use extension install --all-profiles`, fully quit Chrome, then
+reopen the profile. A paired extension with no live relay may have an idle
+worker. Open its popup or reload it at `chrome://extensions`, then check
+`chrome-use browsers` again.
+
`status`, `extension status`, and doctor's relay check read `ABExt.state` over one diagnostic connection with a total 10-second budget. An error reply falls back to `ABExt.inspectTab` on that same connection. They send no debugger commands. The debugger summary passively counts answered commands (including non-timeout errors) and timeouts with “in the last 10 min” for a full reporting window, otherwise “since the extension worker started ago” (whole seconds below 120 seconds, such as “45s”; whole minutes otherwise, such as “3 min”). No samples means “not exercised”; an older extension without health data reports that explicitly. Counts use bounded one-second buckets and reset when the service worker restarts. If commands keep failing, reload the chrome-use extension at `chrome://extensions` or restart Chrome.
New native hosts acknowledge diagnostic connections and skip `attachAll`. A still-running older host performs its usual `attachAll` once; the diagnostic notice recommends reloading the extension after upgrading to start the new host. Possible duplicate extensions are identified from sidecar identities and concurrent TCP liveness checks with a one-second limit and no WebSocket handshake. Matching account/browser with distinct extension ids does not prove a shared Chrome profile: disable one only if both are installed in the same profile.
@@ -138,13 +149,12 @@ another the personal one. Pick the profile before the task, not after a login wa
`auth login --bwu`). Do not switch to another profile.
**Connecting another profile.** Only profiles running the extension are
-connected; most people install it in one. `chrome-use connect --browser `
-connects one when it's needed. It opens the extension's Web Store page in that
-profile, and the user clicks "Add to Chrome" once. If the extension is already
-installed, it opens a window in that profile instead (the extension runs only
-while the profile is open). If Chrome has it disabled, it opens its extensions
-page. Then it waits for the relay. **It opens a window in the user's Chrome, so
-ask the user before running it.** `--browser` naming an unconnected profile
+connected. `chrome-use connect --browser ` requests a window in the
+selected profile. If the extension is missing, the request opens its Web Store
+page for the user to click "Add to Chrome". If it is disabled, the request
+opens the extensions page. The CLI waits for that profile's relay before it
+reports success. **This can open a window in the user's Chrome, so ask the
+user before running it.** `--browser` naming an unconnected profile
fails with exactly this command.
**Defaults.** In `~/.chrome-use/config.json`:
@@ -169,7 +179,7 @@ The profile line names the rule that chose.
a different profile:
- If the rule's profile is not connected, the command fails, naming the rule
- and `chrome-use connect --browser ` (opens a window in that
+ and `chrome-use connect --browser ` (can open a window in that
profile, so ask the user first). It does not fall through to `default` or
the focused profile.
- A running session never switches profiles. If it is bound to profile X and
@@ -231,6 +241,15 @@ Reattaching does not help. To avoid it, fill those fields with `fill` rather tha
`type --key-events`, turn the extension's inline menu off for the site, or use a
`--launch` profile.
+If a page command still reports `debugger_access_denied`, read
+`data.extensionFrameCleanup.status` and `detail`. The status distinguishes
+`not_requested`, `not_attempted`, and `not_applicable` from `none_removed`,
+`still_blocked`, and `unconfirmed`. The `removed` status means Chrome accepted
+a frame-tree read after removal; a later snapshot can still be denied.
+Keep the form in its current tab. Ask the user to close the visible menu or
+hide the extension's autofill prompt on that site, then resume with
+`snapshot -i` in the same session.
+
Relay navigation makes up to three bounded access checks while waiting for a
lifecycle event. A confirmed debugger access denial ends the wait early; a
successful check or a transient failure does not substitute for page readiness.
diff --git a/skill-data/core/references/trust-boundaries.md b/skill-data/core/references/trust-boundaries.md
index ff7405f49f..0af93aaaae 100644
--- a/skill-data/core/references/trust-boundaries.md
+++ b/skill-data/core/references/trust-boundaries.md
@@ -126,6 +126,11 @@ default, so `auth login` and `fill --from-env` into a password field run). The c
run; it prints `Confirmation required:` with a `Site:` line and a
confirmation id, and exits with code 3 (`--json`: `confirmation_required`,
`site`, `reason`, `approval`).
+Cursor’s Smart Effort rule editor can describe a PR touching security code in
+its example text. For a payment-field prompt on a resolved field, the description can identify the
+attribute or snapshot label and the kind of payment cue. In JSON this is in
+`description`; the policy `reason` remains `payment_input`. That description
+is sufficient to report a suspected misclassification.
- `approval: user`: only the user can approve, in the chrome-use side panel,
notification or options page (Allow once / Always allow on this site /
diff --git a/skill-data/real-chrome/SKILL.md b/skill-data/real-chrome/SKILL.md
index 078b20d926..acbf6dcc8f 100644
--- a/skill-data/real-chrome/SKILL.md
+++ b/skill-data/real-chrome/SKILL.md
@@ -37,7 +37,7 @@ To write one back, add `--remember` alongside an explicit `--browser`: after the
A matching rule is binding; chrome-use never substitutes another profile for the one it names. `open` / `goto` / `navigate` / `tab new ` fail with the fix when:
-- the rule's profile is not connected — the error names the rule and `chrome-use connect --browser `. That opens a window in the user's Chrome, so **ask the user first**.
+- the rule's profile is not connected — the error names the rule and `chrome-use connect --browser `. That can open a window in the user's Chrome, so **ask the user first**.
- the session is already bound to a different profile — sessions never switch profiles. Use a new `--session ` (it picks the rule's profile), or pass `--no-choosebrowser` if the user wants the site in the bound profile anyway.
An explicit `--browser` or a config route still wins over the rule. A rule whose profile no longer exists on this machine is ignored with a warning (`warning` in `--json`); tell the user the rule is stale rather than assuming the account is right. A rule whose key fits several profiles is refused. The check applies to `batch` steps (a batch needing two profiles is refused before anything runs), MCP tool calls and script steps too. `chrome-use doctor` lists each rule and whether its profile is connected. `click` and `snapshot` do not consult routing rules.
@@ -53,8 +53,8 @@ isolated browser is fine.
> whichever profile's extension worker is talking to the native host. If a site
> comes back logged out, confirm it's the right profile before assuming the login
> is gone:
-> - `chrome-use browsers` — lists every connected profile (email if the ext has
-> the optional `identity` permission, else a stable id; marks the default).
+> - `chrome-use browsers` — lists profiles found on disk and connected relays.
+> Check the connected and default columns for the profile you intend to use.
> - `chrome-use --browser ` — pins THIS session to that profile.
> It's **sticky per session** (the session's daemon binds on first connect), and
> each session can pick a different profile, so concurrent agents don't fight.
@@ -98,23 +98,29 @@ attempt re-pops it). One of two things is true:
may be shadowing the upgraded one; remove the stale copy
(`npm rm -g chrome-use` / `pnpm rm -g chrome-use`) so the `install.sh` build
wins. A tool that bundles its *own* pinned copy needs that copy upgraded too.
-2. **The extension/relay isn't live.** Tell the user to install the Store
- extension (one click, above); after that the relay stays up and the dialog
- never returns.
-
-**If the relay drops mid-session** (a command suddenly errors with "couldn't
-reach your Chrome" / "relay … failed" — usually the MV3 service worker got
-suspended, or two agents are sharing one relay): **the CLI self-heals** — it
-waits for the worker's keepalive to revive the relay (~25s) and retries once, so
-most drops you never even see. If a command *does* surface the error:
-
-1. **Just retry the command** — the relay has usually reconnected by then.
-2. If it persists: `chrome-use status` (check), then `chrome-use extension connect`
- (re-attach), then retry. The CLI auto-registers the native host and opens the
- Web Store page itself if the extension was never set up — you don't run
- `extension install` by hand.
- `status` is daemon-free and reports CLI, live/expected extension, driving
- profile, and current session state even when that session worker is stuck.
+2. **The extension relay is offline.** Check the selected profile as follows.
+
+**Diagnose an offline relay.** Run `chrome-use status` for the Chrome process,
+native host registration and live relay. Run `chrome-use browsers` to find
+the target profile. A listed profile exists on disk or has a connected relay;
+a missing selector is a separate error. A window request from
+`chrome-use connect --browser ` can bring up the user's Chrome.
+The command waits up to 120 seconds by default for the selected relay to answer.
+If its port already accepts connections, it waits without opening another window.
+`browsers` reports the listener; `status` checks for an extension reply.
+
+1. **Chrome stopped.** Open Chrome in the target profile. If the process state
+ is unknown, check whether Chrome is open.
+2. **Host registration or pairing needs repair.** Check the extension popup
+ in that profile. If it says **Not paired**, or the host registration is
+ missing or unhealthy, run `chrome-use extension install --all-profiles`.
+ Fully quit Chrome, reopen that profile, then check `chrome-use browsers`.
+3. **Paired, still offline.** Open the popup to wake the extension, or reload
+ it at `chrome://extensions`. Verify that the profile is connected before
+ resuming the session. An offline relay alone cannot identify a sleeping
+ worker. Check the page before repeating an action whose outcome is unknown.
+
+4. **Automatic recovery.**
Browser commands normally require an open window in the selected Chrome profile. If its
relay is down while Chrome is running and Local State does not list that profile as
active, recovery first waits for the same profile to remain unlisted for 20 seconds.
@@ -131,19 +137,20 @@ most drops you never even see. If a command *does* surface the error:
instance on another data root is excluded. If recovery still cannot connect, follow the
reported profile or relay error; do not restart Chrome merely because its relay is
down.
-3. **Never** tell the user to quit/restart Chrome with `--remote-debugging-port`
- to recover a dropped relay — that throws away their tabs and defeats the
- extension path.
-4. `chrome-use reconnect` is a friendly alias for `extension connect` — re-binds
- the session to the running Chrome without any reinstall.
-
-> **Don't serialize agents to dodge fragility.** Relay drops are transient and
-> self-heal; they are *not* a sign that the shared browser can't be driven
-> concurrently. Concurrent multi-agent **is** supported — each `--session`
+
+**Never** tell the user to quit/restart Chrome with `--remote-debugging-port`
+to recover a dropped relay — that throws away their tabs and defeats the
+extension path.
+
+`chrome-use reconnect` is a friendly alias for `extension connect` — re-binds
+the session to the running Chrome without any reinstall.
+
+> Concurrent multi-agent use is supported — each `--session`
> drives only its own tabs (sessions of one project share its tab group) (see *Strict multi-agent
> isolation* below). Give each agent a distinct `--session` and let them run in
> parallel; you don't need to run them one at a time.
-5. **Can't restore the browser at all?** Don't stall waiting for a screenshot —
+
+**Can't restore the browser at all?** Don't stall waiting for a screenshot —
**fall back to non-visual verification**: `get text` / `eval` / read the
deployed page over `curl`/`WebFetch`. Confirming a change via the DOM/HTML or
the live URL is a *correct* result, not a failure. Reserve screenshots for a