fix(scouts): add web_search/web_fetch fallback when MCPs auth-fail#53
Merged
theagenticguy merged 1 commit intomainfrom Apr 22, 2026
Merged
fix(scouts): add web_search/web_fetch fallback when MCPs auth-fail#53theagenticguy merged 1 commit intomainfrom
theagenticguy merged 1 commit intomainfrom
Conversation
When Brave/Exa/Tavily MCP servers auth-fail (as happened 2026-04-22 when all three API keys were unavailable in the cron env), scout agents had no tool to fall back on and silently degraded — every scout reported status: complete with 0 repos added and error: null. The entire nightly fleet produced zero live-verified discoveries. Kiro ships native web_search and web_fetch built-ins, but the scout agent configs narrowed their tool whitelist to ["read","write", "@brave-search","@Tavily","@exa"] only, so those built-ins were unreachable even when MCP providers broke. Add web_search/web_fetch to the tool whitelist for both project-watcher (scout root) and probe-topic (parallel subagent), and update the steering prompts to instruct the agents to fall back to native web tools when an MCP provider auth-fails rather than abandoning the topic or synthesizing from training knowledge. Prefer MCP providers for structured results and source diversity; native tools are the always-available safety net.
Contributor
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
There was a problem hiding this comment.
Pull request overview
This PR strengthens the scout agents’ ability to complete discovery runs when MCP search providers (Brave/Exa/Tavily) fail authentication or hit rate limits, by whitelisting Kiro’s native web tools and documenting fallback behavior in steering prompts.
Changes:
- Add
web_search/web_fetchto the configured tool lists forproject-watcherandprobe-topic. - Expand
probe-topic’sallowedToolsto permitweb_search/web_fetch. - Update steering docs to instruct scouts to prefer MCP providers but fall back to native web tools on provider failures.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/data/watcher-context.md | Documents a fallback strategy to native web_search/web_fetch when MCP providers auth/rate-limit fail. |
| src/data/project-watcher.json | Adds native web tools to the agent tool list to enable fallback behavior. |
| src/data/probe-topic.md | Updates probe instructions to use native web tools as a fallback on MCP provider failures. |
| src/data/probe-topic.json | Adds native web tools to both tools and allowedTools for the probe subagent. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+21
to
+24
| repositories matching the topic. Deduplicate by `owner/name`. If any of | ||
| those MCP providers returns an auth / rate-limit error, fall back to | ||
| Kiro's built-in `web_search` and `web_fetch` rather than abandoning the | ||
| topic. |
Comment on lines
+14
to
+21
| "allowedTools": [ | ||
| "read", | ||
| "web_search", | ||
| "web_fetch", | ||
| "@brave-search", | ||
| "@tavily", | ||
| "@exa" | ||
| ], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
web_searchandweb_fetchto the tool whitelist for both scout agents (project-watcher,probe-topic), so they have an always-available fallback when Brave/Exa/Tavily MCP providers return auth or rate-limit errors.Motivation
On 2026-04-22 the full six-scout fleet (agent-sdks, ai-eval, ai-security, computer-use, hn-frontpage, inference-infra) completed with
status: complete,error: null, andreposAdded: 0across the board. Root cause was thatBRAVE_API_KEY/EXA_API_KEY/TAVILY_API_KEYwere unavailable in the cron environment, so every MCP search server received an empty${VAR}and returned 401 / 422 / "Invalid API key".Because the scout agents' tool whitelist contained only
["read","write","@brave-search","@tavily","@exa"], they had no fallback tool to reach for. Five scouts silently degraded to prior-run carry-forward or training knowledge; one (inference-infra) returned emptydiscoveries: []. None surfaced the failure — every scout reported completion with zero errors.The env-var problem itself is fixed outside this repo (moved exports to
~/.zshenv+SHELL=/bin/zshin crontab). This PR fixes the fragility that let the failure go silent: giving the scouts access to native web tools means the next time any MCP provider flakes, they can still produce useful output.Changes
src/data/project-watcher.json: addweb_search,web_fetchtotoolssrc/data/probe-topic.json: addweb_search,web_fetchto bothtoolsandallowedToolssrc/data/watcher-context.md: add "Fallback — Kiro nativeweb_search/web_fetch" note in the Research Strategy sectionsrc/data/probe-topic.md: mention native fallback inline in the search stepNewly-initialized scouts will pick these up automatically via
ralph scout init --from-example. Existing scout trees underscouts/<name>/.kiro/agents/*.jsonare user data (gitignored) and can be refreshed by re-runninginitor by patching in place.Test plan
mise exec -- bun run typecheckpassesmise exec -- bun run lintpasses (biome auto-formatted the expanded arrays)mise exec -- bun test— 101 tests pass, 0 failweb_searchand still produces a non-emptydiscovery.json