Repository navigation
Environment browser view: a page's new tab or pop-up closes when nobody views it (F39 point 9, DEV-6646) - #250
Merged
Conversation
…dy views it (F39 point 9, DEV-6646) The view closed only the tabs it had opened itself (and what those opened). A tab or pop-up that a page in an agent's window opened stayed open forever once nobody looked at it, and with every page's `target=_blank` such windows piled up in the Environment's memory. Root decision 0191 point 11 asks for less: a remote tab closes after a short grace "if no agent uses it". A tab a page opened now counts as the view's to close: - 30 s after its last viewer leaves, or after 10 minutes when nobody ever views it; - never while an agent-browser session is bound to it (an agent that works in the new tab binds to it); - never an agent's own window. A regression test proves an unviewed page tab closes while a bound one and the agent's window stay; it fails without the change. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
agentrozjedemeai
approved these changes
Oct 6, 2026
agentrozjedemeai
left a comment
Collaborator
There was a problem hiding this comment.
@immakermatty Approved on exact head eb6f86a235a76a281fbebecb0baeaf20942f1a05. The page-opened target enters the existing own-tab grace lifecycle regardless of opener provenance; the agent original window is not added, and bound targets are excluded before close. F39 point 9 and the regression reflect that boundary. In an isolated checkout: environment-browser-view tests 26/26 twice, lint and typecheck pass; git diff --check clean. All live CI checks complete successfully or are explicitly skipped; no unresolved threads. This is a focused approval, not a release/merge instruction.
This was referenced Oct 7, 2026
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.
Status: ready for review. Head
eb6f86a235a76a281fbebecb0baeaf20942f1a05, basemain6ab3503b(#242, released as v0.1.8-rc.38).Plan: HumanAndMachine-ai/mission-control-data:v3
data/mission-control/plans/2026/10/DEV-6646-environment-browser-and-desktop.yaml, task-2026-10-06-502. Decision F39 point 9.Why
#242 closes a remote tab after the grace only when the view opened it (or a tab it opened opened it). A tab or pop-up that a page in an agent's window opens (any
target=_blanklink the agent follows, an OAuth pop-up) was never closed once nobody viewed it. On a pilot day such windows pile up in the Environment's memory; each Chrome window costs tens of MB on an 8 GiB Environment. Root decision 0191 point 11 asks for less: a person's closed tab closes the remote one after a short grace "if no agent uses it".What changes
src/browser/people/hub.ts. A tab that a page opens counts as the view's to close:docs/decisions.md: F39 point 9 says so.tests/environment-browser-view.test.ts: a regression where an agent's window opens two tabs and a session is bound to the second. The first closes after the grace; the second and the agent's window stay. Without the change it fails.What does not change
Tabs the view opens, the grace lengths, the binding check, and everything else of F39.
Verification
tests/environment-browser-view.test.ts: 26/26 twice. The new test fails 25/26 without the change.bun run lintandbun run typecheckpass.Rollout
This rides in the next prerelease (
v0.1.8-rc.39), which goes to the pilot Environment alone, together with rc.38's view, once its lane is free tonight.🤖 Generated with Claude Code