Skip to content

The fastest browser for AI agents to run browser automation, built for sharing your logged-in browser state with your AI agents, like Codex or Claude Code, without disturbing you. Zero cost, zero config.

Revert "docs(ego-browser): let finish share the last script of a reply"

Zhuowei Wangfad68b972ede
diff --git a/package/ego-browser/skill-body/SKILL.md b/package/ego-browser/skill-body/SKILL.md
index e302137..112d628 100644
--- a/package/ego-browser/skill-body/SKILL.md
+++ b/package/ego-browser/skill-body/SKILL.md
@@ -515,11 +515,13 @@ you finished with kept Pages, neither `taskSpace()` nor `takeOverTaskSpace()`
can resume it. After the claim, adopt each tab you kept and use the label
`adopt()` returns.
-End each reply's browser work with one `finish()`, called after its last
-browser step; it can run in the same script as that step. Wait for it before
-you report:
+End each reply's browser work with one `finish()` in a separate last script,
+run after earlier output has shown that the request is done, and wait for it
+before you report. A space finished too early must not take more work in this
+reply:
```js
+const task = await taskSpace(7); // the taskSpaceId printed earlier in this reply
// Default: close the space, including tabs you kept in an earlier reply.
await task.finish({ keep: [] });
diff --git a/plugins/ego/tests/claude-plugin-mode-isolation.test.mjs b/plugins/ego/tests/claude-plugin-mode-isolation.test.mjs
index 300fd21..bc6dbf0 100644
--- a/plugins/ego/tests/claude-plugin-mode-isolation.test.mjs
+++ b/plugins/ego/tests/claude-plugin-mode-isolation.test.mjs
@@ -67,14 +67,9 @@ function assertTaskSpaceSafety(skill, label) {
);
assert.match(
skill,
- /End each reply's browser work with one `finish\(\)`[\s\S]*?Wait for it before\s+you report/i,
+ /End each reply's browser work with one `finish\(\)` in a separate last script,[\s\S]*?wait for it\s+before you report/i,
`${label} must wait for cleanup before reporting completion`,
);
- assert.doesNotMatch(
- skill,
- /separate last script/i,
- `${label} must not spend an extra script on finish()`,
- );
assert.match(
skill,
/does not verify the resulting application state/i,