Cloud V3 task stop + MCP follow-up cannot see the original page despite keep_alive

Đang mở
#375 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
42/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
python
Lĩnh vực
backend-api-design

Hướng nghiên cứu

Start with the Cloud V3 session stop endpoint and the hosted MCP send_task session reuse path; the report does not name SDK files or tests. Reproduce the sequence with the supplied https://example.com/ recipe, then inspect existing tab targets before and after task cancellation. Done when the page’s URL, title, and marker behavior is explained and the supported page-preservation boundary is documented or fixed.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Cloud V3 task stop followed by hosted MCP send_task loses access to the original page

This concerns the hosted Cloud V3 browser lifecycle / MCP interoperability, not a demonstrated TypeScript SDK serialization defect. Please redirect if another tracker is preferred.

Observed sequence

On 2026-10-25, using the hosted https://api.browser-use.com/v3/mcp endpoint and the documented V3 REST stop endpoint with the same project's key:

  1. run_session({keep_alive: true, model: "claude-sonnet-5", task: ...}) navigated to the public https://example.com/ fixture. A separate real browser_evaluate tool result, obtained through native session messages, returned the correct location.href, document.title, and an unpredictable crypto.randomUUID() stored in a page-local window property (named window.__reuseProbe in the minimal recipe below). The task then entered an explicit browser wait. Readiness was based on the successful DOM result, not just a navigation/waiting summary.
  2. POST /api/v3/sessions/SESSION_ID/stop with exactly {"strategy":"task"} returned HTTP 200, the matching session ID, and status:"idle". A separate native GET and MCP get_session confirmed idle. There was no full-session stop, browser deletion, reload, or navigation between these steps.
  3. send_task({session_id: SESSION_ID, keep_alive: true, task: ...}) was accepted. Its instructions explicitly discarded the old wait and asked to read the existing page's URL/title/marker, without assigning the marker or creating/navigating/reloading/reconnecting a browser. The exact new instruction appears in native messages.
  4. The follow-up's real browser evaluations instead returned about:blank, a Starting-agent title, and no marker. In a second instrumented case, the follow-up was explicitly asked to enumerate existing tabs first and select the original page. Its BrowserSession get_page_targets() result contained only one page, about:blank; there was no existing example.com target visible to that follow-up. It reported the failure rather than reconstructing the page or guessing its title.

Both creation and follow-up explicitly requested keep_alive. The session ID stayed the same. The second, tab-enumerating case ran 19:42:13–19:43:35 UTC; task stop was acknowledged at 19:42:33 UTC and follow-up was accepted at 19:42:35 UTC. It was not an idle-expiration wait. All disposable sessions were subsequently stopped and soft-deleted through the official API.

Minimal task recipe

Initial task:

Navigate to https://example.com/. In a separate browser_evaluate, return
JSON.stringify({url:location.href,title:document.title,
marker:(window.__reuseProbe=crypto.randomUUID())}).
Then wait 90 seconds so the caller can cancel the running task.

After correlating the actual initial evaluation result and observing the running wait, issue the native task-only stop above. Then send a new task on that same session:

This NEW task replaces the old wait. Enumerate existing tabs and select the
existing https://example.com/ tab if present. Do not create a tab, navigate,
reload, reconnect/recreate a browser, or assign window.__reuseProbe.
Use a real browser_evaluate to return JSON.stringify({url:location.href,
title:document.title,marker:window.__reuseProbe}). If the original tab is
absent, report that failure, not a guessed title.
Expected behavior / question

The MCP guide documents send_task on an idle keep-alive session. The V3 stop reference says task strategy keeps the session alive, unlike session strategy which destroys the sandbox. The exposed send_task tool description also describes reuse of the browser context.

Should the existing page/tab remain available across native V3 task cancellation followed by hosted MCP send_task? If so, could cancellation or MCP follow-up be resetting/losing the browser binding? If only conversation/sandbox state is preserved and not the open page, please clarify that boundary and the supported way to preserve the page across cancellation.

Limits of this report
  • The native response and raw browser-action messages establish session identity, idle state, actual pre-stop DOM, and post-stop page/marker unavailability. They do not prove whether a physical Chrome target was destroyed versus no longer exposed to the follow-up's browser context.
  • The mixed REST-stop / MCP-follow-up boundary is deliberate and disclosed. A separate native follow-up was previously accepted/running, but was stopped before completed DOM output; that is not evidence that an all-native completed-DOM path works. The failing boundary is not yet isolated to MCP versus the underlying cancellation lifecycle.
  • These two instrumented observations used claude-sonnet-5. No claim is made about every model. No private pages, credentials, account IDs, raw session IDs, or customer content are included here.
Ngôn ngữ chính
Python
Star
31
Fork
21
Merge trung bình
1 ngày 19 giờ
Pull request đã merge (30 ngày)
66

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của browser-use/sdk

Tất cả issue của browser-use/sdk

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.