Skip to content

fix: add tab handling rules to prevent infinite loops#205

Open
Jah-yee wants to merge 1 commit intoalibaba:mainfrom
Jah-yee:fix/tab-handling-infinite-loop
Open

fix: add tab handling rules to prevent infinite loops#205
Jah-yee wants to merge 1 commit intoalibaba:mainfrom
Jah-yee:fix/tab-handling-infinite-loop

Conversation

@Jah-yee
Copy link

@Jah-yee Jah-yee commented Mar 11, 2026

Fixes issue #201: Agent gets stuck in infinite loop when clicking links that open in new tabs.

Problem

The current system prompt explicitly forbids clicking links that open new tabs but provides no guidance on how to handle them properly.

Solution

Added proper tab handling instructions to both system prompt files:

  1. packages/core/src/prompts/system_prompt.md - Updated capability section
  2. packages/extension/src/agent/system_prompt.md - Added tab_handling_rules section

- Add proper tab handling guidance to system prompts
- Replace 'do not click new tab links' with 'check for new tabs and switch'
- Add tab_handling_rules section with clear instructions
- Addresses issue alibaba#201: agent stuck in infinite loop when clicking links that open new tabs
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


Jah-yee seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

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.

2 participants