Skip to content

fix(harness): deny WebSearch/WebFetch on read-only claude workers - #461

Merged
solomonneas merged 1 commit into
mainfrom
fix/issue-456-claude-readonly-web-tools
Jul 23, 2026
Merged

fix(harness): deny WebSearch/WebFetch on read-only claude workers#461
solomonneas merged 1 commit into
mainfrom
fix/issue-456-claude-readonly-web-tools

Conversation

@solomonneas

Copy link
Copy Markdown
Collaborator

Summary

Fixes #456. A read-only Claude worker could stall with ok=false, exit_code=5, "Claude is waiting for a permission prompt" when Claude Code requested approval for a Web Search tool call. --permission-mode plan fails closed on writes, but the built-in web tools (WebSearch, WebFetch) still route to an interactive approval prompt that a non-interactive Brigade worker cannot answer.

Root-cause fix at the adapter boundary (sibling of #446): add WebSearch,WebFetch to _CLAUDE_DISALLOWED_READ_ONLY in src/brigade/agents.py, hiding the web tools from the read-only tool surface exactly like Bash/Edit/Write. A read-only REVIEW worker has no need for web tools.

Tests

  • New test_claude_read_only_denies_web_tools_that_prompt_for_approval: asserts on the built argv that WebSearch/WebFetch are in the read-only deny list, the prompt is still separated by -- and intact as the final positional, and the danger-full-access branch is unchanged.
  • Updated the three existing tests that pinned the old deny-list literal.

Verification

  • brigade work verify run --target . --command "pytest -q tests/test_agents.py" --capture brigade-work → exit=0
  • brigade work verify run --target . --command "./scripts/verify" --capture brigade-work → exit=0 (ruff, format, version-sync, mypy, full pytest + coverage floor)

Under --permission-mode plan, Claude Code's built-in web tools route to an
interactive approval prompt that a non-interactive Brigade worker cannot
answer, so read-only claude workers blocked with no final output. Add
WebSearch and WebFetch to _CLAUDE_DISALLOWED_READ_ONLY so they are hidden
from the read-only tool surface, exactly like Bash/Edit/Write. The
danger-full-access branch skips permissions entirely, so no prompt can
block there and its deny list is unchanged.

Fixes #456

Co-authored-by: Claude <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 23, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are limited based on label configuration.

🏷️ Required labels (at least one) (1)
  • coderabbit-review

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository: escoffier-labs/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 1bbf9734-d27b-4eea-9c21-23efef8193a0

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/issue-456-claude-readonly-web-tools

Comment @coderabbitai help to get the list of available commands.

@solomonneas
solomonneas merged commit 22a8e01 into main Jul 23, 2026
28 checks passed
@solomonneas
solomonneas deleted the fix/issue-456-claude-readonly-web-tools branch July 23, 2026 18:27
@solomonneas solomonneas self-assigned this Jul 23, 2026
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(harness): Claude read-only workers can stop on Web Search permission prompts

1 participant