Skip to content

fix(cdp): reject commands for detached sessions - #1992

Open
zyz619963502zyz wants to merge 1 commit into
vercel-labs:mainfrom
zyz619963502zyz:fix/1991-detached-session-pending
Open

zyz619963502zyz wants to merge 1 commit into
vercel-labs:mainfrom
zyz619963502zyz:fix/1991-detached-session-pending

Conversation

@zyz619963502zyz

Copy link
Copy Markdown

Summary

  • track the CDP session associated with each pending command
  • reject only that session's pending commands when Target.detachedFromTarget arrives
  • keep commands for other live sessions active

Closes #1991

Validation

  • regression test fails on the previous implementation because the detached-session command remains pending beyond 1 second
  • cargo test detached_session_releases_its_pending_commands -- --nocapture
  • cargo test native::cdp::client::tests (12 passed)
  • cargo test --bin agent-browser (1394 passed, 142 ignored)
  • git diff --check

cargo fmt -- --check could not run because the available pinned Rust toolchain does not include the rustfmt component; no component was installed solely for this change.

AI assistance

AI assistance was used. I reviewed the implementation and verified the behavior and tests above.

@vercel

vercel Bot commented Sep 24, 2026

Copy link
Copy Markdown
Contributor

@zyz619963502zyz is attempting to deploy a commit to the Vercel Labs Team on Vercel.

A member of the Team first needs to authorize it.

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

Development

Successfully merging this pull request may close these issues.

A command to a session that detaches waits out the 30 s timeout and holds up every other call

1 participant