Skip to content

fix(dashboard): start new sessions outside dashboard mode - #2523

Open
Amronos wants to merge 1 commit into
vercel-labs:mainfrom
Amronos:fix-dashboard-child-session
Open

Amronos wants to merge 1 commit into
vercel-labs:mainfrom
Amronos:fix-dashboard-child-session

Conversation

@Amronos

@Amronos Amronos commented Nov 10, 2026

Copy link
Copy Markdown

Problem

The dashboard's New Session button (POST /api/sessions) reports success, but no session appears and no browser opens.

agent-browser dashboard start runs the dashboard server with AGENT_BROWSER_DASHBOARD and AGENT_BROWSER_DASHBOARD_PORT set. spawn_session runs agent-browser open about:blank --session <name> with that environment. The child sees AGENT_BROWSER_DASHBOARD at startup and becomes a second dashboard server instead of running open. It cannot bind the dashboard port, which the parent holds, so it prints an error to a discarded stderr and exits 0. The handler then returns {"success":true,"session":"<name>"}.

POST /api/exec and the dashboard chat tool already clear these variables, so running open about:blank --session <name> through /api/exec works.

Changes

  • Add cli_command in stream/dashboard.rs. It builds the child CLI command with AGENT_BROWSER_DASHBOARD, AGENT_BROWSER_DASHBOARD_PORT and AGENT_BROWSER_STREAM_PORT removed.
  • spawn_session, exec_cli and the chat tool in stream/chat.rs use it, so the three places that run the CLI from the dashboard keep the same environment.
  • Unit test: the command from cli_command clears the dashboard variables.

Written by Opus 5.5 (opus-5.5) through Sprocket.

The New Session request ran `agent-browser open about:blank --session <name>`
with the dashboard server's environment, including AGENT_BROWSER_DASHBOARD.
The child started a second dashboard server instead of opening the session,
failed to bind the dashboard port, and exited 0, so the dashboard reported
success for a session that never started.

All three places where the dashboard runs the CLI now build the command with
one helper that clears the dashboard variables.

Co-authored-by: usesprocket[bot] <306702232+usesprocket[bot]@users.noreply.github.com>
@vercel

vercel Bot commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

@Amronos 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.

1 participant