Skip to content

Skills create separate browser sessions instead of sharing sessions #22

@edenreich

Description

@edenreich

Bug Description

The Playwright skills (navigate_to_url and take_screenshot) each create their own browser sessions instead of sharing a single session. This causes screenshots to be blank because:

  1. navigate_to_url creates session A and navigates to a URL
  2. take_screenshot creates session B (fresh/blank) and takes a screenshot of an empty page

Evidence

From agent logs:

  • Navigation: sessionID: session_1758373522286453631
  • Screenshot: sessionID: session_1758373522844540590

Expected Behavior

Skills should share the same browser session so that:

  • Navigation happens in session A
  • Screenshot captures the content from the same session A

Current Implementation Issue

Both skills have getOrCreateSession() methods that always create new sessions:

take_screenshot.go:238-246:

func (s *TakeScreenshotSkill) getOrCreateSession(ctx context.Context) (*playwright.BrowserSession, error) {
    config := playwright.DefaultBrowserConfig()
    session, err := s.playwright.LaunchBrowser(ctx, config)
    // Always creates new session
}

Solution

Implement session sharing in the Playwright service so skills can reuse existing sessions instead of always creating new ones.

Impact

  • Screenshots are blank/empty
  • No access logs showing agent reaching websites
  • Poor user experience with browser automation workflows

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions