Skip to content

AGENT_BROWSER_CDP env var ignored by Node.js daemon auto-launch #674

@raphaelfp

Description

@raphaelfp

Description

The AGENT_BROWSER_CDP environment variable is supported by the native Rust daemon's auto_launch function (cli/src/native/actions.rs:731), but the Node.js daemon's auto-launch path in daemon.ts ignores it entirely.

Reproduction

  1. Start Chrome with --remote-debugging-port=9222
  2. Run AGENT_BROWSER_CDP=9222 agent-browser snapshot -i
  3. Expected: agent-browser connects to existing Chrome and snapshots the current tab
  4. Actual: agent-browser launches a new Chromium with about:blank

Root Cause

In src/daemon.ts, the auto-launch code path (when no explicit launch command has been sent) doesn't check process.env.AGENT_BROWSER_CDP. The native Rust daemon handles this correctly at cli/src/native/actions.rs:731.

Environment

  • agent-browser v0.16.1
  • Node.js daemon (default)
  • Linux

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions