Skip to content

fix(agent-tars): skip browser_vision_control screenshot on empty pages#1835

Open
Br1an67 wants to merge 1 commit intobytedance:mainfrom
Br1an67:fix/issue-902-empty-page-screenshot
Open

fix(agent-tars): skip browser_vision_control screenshot on empty pages#1835
Br1an67 wants to merge 1 commit intobytedance:mainfrom
Br1an67:fix/issue-902-empty-page-screenshot

Conversation

@Br1an67
Copy link

@Br1an67 Br1an67 commented Mar 1, 2026

Summary

Fixes #902

When the browser page is about:blank (no URL loaded), the agent would take a screenshot and send it to the LLM, which then uselessly invoked browser_vision_control on the empty page. This wasted resources and confused users.

Changes:

  • In onEachAgentLoopStart(), detect when the current URL is about:blank or empty
  • Instead of sending a screenshot, send a text-only environment_input event instructing the agent to navigate to a URL first before attempting visual browser control

Checklist

  • Added or updated necessary tests (Optional).
  • Updated documentation to align with changes (Optional).
  • Verified no breaking changes, or prepared solutions for any occurring breaking changes (Optional).
  • My change does not involve the above items.

When the browser page is about:blank (no URL loaded), the agent would
take a screenshot and send it to the LLM, which then uselessly invoked
browser_vision_control on the empty page.

Now detects about:blank and sends a text-only environment input instead,
instructing the agent to navigate to a URL first before attempting
visual browser control.

Fixes bytedance#902
@netlify
Copy link

netlify bot commented Mar 1, 2026

Deploy Preview for agent-tars-docs ready!

Name Link
🔨 Latest commit fba1dc2
🔍 Latest deploy log https://app.netlify.com/projects/agent-tars-docs/deploys/69a46f24acbe3d00085fdf38
😎 Deploy Preview https://deploy-preview-1835--agent-tars-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link

netlify bot commented Mar 1, 2026

Deploy Preview for tarko ready!

Name Link
🔨 Latest commit fba1dc2
🔍 Latest deploy log https://app.netlify.com/projects/tarko/deploys/69a46f244b9ff40008b2530d
😎 Deploy Preview https://deploy-preview-1835--tarko.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

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.

[Bug Report]: Agent TARS would use browser_vision_control even if there is empty page.

1 participant