Skip to content

fix(core): auto-enable WebFetch and WebSearch tools in Plan mode - #1686

Merged
Mingholy merged 1 commit into
QwenLM:mainfrom
afarber:1394-web-fetch-in-plan-mode
Feb 3, 2026
Merged

fix(core): auto-enable WebFetch and WebSearch tools in Plan mode#1686
Mingholy merged 1 commit into
QwenLM:mainfrom
afarber:1394-web-fetch-in-plan-mode

Conversation

@afarber

@afarber afarber commented Feb 1, 2026

Copy link
Copy Markdown
Contributor

TLDR

Allow web_fetch and web_search tools to auto-execute in Plan mode without requiring confirmation

Dive Deeper

In coreToolScheduler.ts, Plan mode blocks any tool where shouldConfirmExecute() returns confirmation details. Both web-fetch.ts and web-search/index.ts only returned false for AUTO_EDIT mode, causing them to be blocked in Plan mode despite being read-only.

  • Add ApprovalMode.PLAN check to shouldConfirmExecute() in web-fetch.ts
  • Add ApprovalMode.PLAN check to shouldConfirmExecute() in web-search/index.ts

Reviewer Test Plan

  1. Run npm run build && npm start
  2. Type /approval-mode plan to enable Plan mode
  3. Ask the model to fetch a URL or search the web
  4. Verify the tool executes without a confirmation prompt

Testing Matrix

🍏 🪟 🐧
npm run yes
npx
Docker
Podman - -
Seatbelt - -

Linked issues / bugs

Fixes #1394

@afarber

afarber commented Feb 2, 2026

Copy link
Copy Markdown
Contributor Author

Tested on my Macbook M1:

image

@Mingholy Mingholy left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@Mingholy
Mingholy merged commit b0aa05f into QwenLM:main Feb 3, 2026
15 checks passed
@afarber
afarber deleted the 1394-web-fetch-in-plan-mode branch February 3, 2026 12:56
xaelistic pushed a commit to xaelistic/qwen-code that referenced this pull request Jun 7, 2026
fix(core): auto-enable WebFetch and WebSearch tools in Plan mode
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

How to allow web fetch in Plan mode

3 participants