Skip to content

fix(ce-web-researcher): use any web tool, not just Claude built-ins#836

Merged
tmchow merged 6 commits into
mainfrom
tmchow/debug-issue-833
May 16, 2026
Merged

fix(ce-web-researcher): use any web tool, not just Claude built-ins#836
tmchow merged 6 commits into
mainfrom
tmchow/debug-issue-833

Conversation

@tmchow
Copy link
Copy Markdown
Collaborator

@tmchow tmchow commented May 16, 2026

The agent's Step 1 precondition required WebSearch and WebFetch by exact name and stopped if either was missing, blocking Codex, Gemini, Droid, and MCP web tools (Firecrawl, Brave, Tavily, Exa, Perplexity) even when the platform had equivalent capability under a different name. Tool mappings in user AGENTS.md files did not help because the agent bailed before consulting them.

Step 1 now accepts any web-search and web-fetch capability (platform-native or MCP-provided) and only stops when no web tooling exists at all. The tools: frontmatter restriction is removed so MCP web tools (Firecrawl, Brave, Tavily, etc.) become reachable on Claude Code too. Steps 2 and 4 and the Tool Guidance section refer to "web searches" and "web fetches" generally; the shell-fallback prohibition (no curl / wget) is preserved.

Fixes #833


Compound Engineering
Claude Code

The agent's Step 1 precondition checked for `WebSearch` and `WebFetch`
by exact name and stopped if either was missing. That blocked Codex,
Gemini, Droid, and MCP web tools (Firecrawl, Brave, Tavily, Exa) even
when the platform had equivalent capability under a different name.
Tool mappings in user `AGENTS.md` files did not help because the agent
bailed before consulting them.

Step 1 now accepts any web-search/web-fetch capability (platform-native
or MCP-provided) and only stops when no web tooling exists at all. The
`tools:` frontmatter restriction is removed so MCP web tools become
reachable on Claude Code too. Steps 2 and 4 and the Tool Guidance
section refer to "web searches" and "web fetches" generally; the
shell-fallback prohibition is preserved.

Fixes #833
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3b8a73075b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread plugins/compound-engineering/agents/ce-web-researcher.agent.md Outdated
tmchow added 5 commits May 16, 2026 00:14
The previous Step 1 phrasing only said to stop "if no web-search or
web-fetch capability is available at all," which read as stopping only
when both were absent. Tighten the wording so the guard stops when
either capability is missing — restoring the original behavior where
the agent refused to enter a workflow it cannot complete.
The bulleted categories (platform-native, MCP, "other") implied those
were the universe and missed dedicated CLI tools like ctx7 or any other
shape the caller may have wired up. Reframe Step 1 and Tool Guidance
around the real distinction — purpose-built web tool (any shape) vs
generic network command (curl, wget) — and drop the category list in
favor of a one-sentence prose statement with a few examples.
Address review feedback by removing prescription the agent does not
need:

- Step 1 no longer dictates an exact error string; the agent reports
  the unavailability in its own words.
- The curl/wget prohibition is dropped from Step 1 and Tool Guidance.
  An agent picked for web research is not about to reach for raw
  network commands; the warning was spending tokens to defend against
  a non-issue.
- Step 2 drops the prescribed "2-4 broad queries" count from both the
  heading and the prose. Step 6's overall stop heuristic still bounds
  total volume.
Per-phase query and fetch counts (3-6 narrowing, 3-5 fetches, 1-3
follow-ups) artificially capped good research. A topic might warrant
one broad search and five fetches, or three searches and one fetch,
or two passes of search-then-fetch-then-search; the right shape
emerges from what each step uncovers. Dictating phase budgets
prevented that adaptive pattern.

Now: phases describe activities (scope, narrow + extract, fill gaps)
not budgets. Steps 3 and 4 are merged because search and fetch
interleave in real research — a fetched source often suggests the
next query. The only quantitative constraint is a single hard cap on
total tool calls in the Stop Heuristic, framed as a safety valve
against runaway research rather than a target.
Tool calls are not comparable units — one MCP call can be worth five
WebSearches, and a paginated CLI fetch is different again. A flat
numeric cap created false precision while penalizing topics that
legitimately needed more work.

The Stop Heuristic is now grounded entirely in progress signals:
sources repeating, synthesis not changing, external signal thin. The
agent decides when enough is enough based on whether it is still
learning, with an explicit "bias toward stopping early" framing so
the absence of a numeric backstop does not become an excuse to keep
going.
@tmchow tmchow merged commit 6fa1277 into main May 16, 2026
2 checks passed
@github-actions github-actions Bot mentioned this pull request May 16, 2026
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d9a9f7464d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines 2 to 5
name: ce-web-researcher
description: "Performs iterative web research and returns structured external grounding. Use when ideating outside the codebase, validating prior art, scanning competitor patterns, finding cross-domain analogies, or fetching market signals. Prefer over manual web searches for structured external context."
model: sonnet
tools: WebSearch, WebFetch
---
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Reinstate web-only tool restrictions for this agent

Removing the tools: WebSearch, WebFetch frontmatter turns this into an all-tools subagent in environments where omitted tool lists inherit the parent toolset. Because this agent explicitly consumes untrusted web content, prompt-injection failures now have access to non-web tools (e.g., shell or file mutation) instead of being sandboxed to search/fetch only, which is a material security regression from the previous configuration.

Useful? React with 👍 / 👎.

LLMpsycho pushed a commit to LLMpsycho/compound-engineering-plugin that referenced this pull request May 21, 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: ce-web-researcher hardcodes to WebFetch and WebSearch

1 participant