Skip to content

feat(session): add local shared-window sessions - #306

Open
lymerin wants to merge 1 commit into
Tencent:mainfrom
lymerin:main
Open

lymerin wants to merge 1 commit into
Tencent:mainfrom
lymerin:main

Conversation

@lymerin

@lymerin lymerin commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #243.

Problem

bsk session start always opens a dedicated Agent Window. In single-window and Arc workflows, this creates an extra window when the user wants the session's tabs in their current window.

Changes

  • Add opt-in bsk session start --in-window. It creates a session tab in the last-focused normal, non-incognito user window without creating another window.
  • Treat the window as a container and enforce control by tab ID. Other user tabs in that window do not become session-owned.
  • Keep same-window borrowed tabs in place; returning them releases control without moving them. Stopping a shared session closes its created tabs, not the host window.
  • End a shared session when its last controlled tab is closed or moved away, and notify the daemon to remove its session record.
  • Keep tab creation protected through CDP setup and recheck ownership and window location before failure cleanup.
  • Add protocol 1.4 compatibility checks and regression tests for shared-window ownership and cleanup.

Scope and safety

This is an opt-in local-session mode. Ordinary sessions and record start retain their dedicated-window behavior. Remote sessions and window dimensions are unsupported with --in-window. Tab grouping is not included.

Validation

The final commit was locally tested before the force-push. Regression tests cover shared-window startup, tab ownership, same-window borrow and return, tab closure, and a tab moved during CDP setup.

Arc and macOS live-browser testing was not performed.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant