Claude Code vs Codex vs OpenCode: How Each Coding Agent Finds and Recommends Developer Tools (2026)

Claude Code, Codex and OpenCode each find docs and pick tools differently: built-in search, MCP, instruction files, training data. Here is how they work, what the evidence says, and what tool vendors can do about it.

Key takeaways

  • Coding agents recommend tools from three sources: what the model learned in training, what the harness lets it search live, and what your instruction files tell it to use.
  • Claude Code has built-in WebSearch and WebFetch. OpenCode gets web search through MCP and has a Scout subagent for external docs. Codex leans on its own search plus AGENTS.md and MCP.
  • No public study measures which developer tools each of these three agents recommends by default. Anyone claiming a ranking is guessing. I flag below where the evidence stops.
  • Crawlable docs, a public GitHub presence and clear install instructions are the safest bets for vendors, and the data from ChatGPT's software citations supports that.
  • Pick the harness first and the model second. The wrapper decides what the model can see, and so what it can recommend.

The question nobody has measured

When you tell a coding agent "add auth to this app" or "set up a queue," it picks a library. Sometimes it picks one you never heard of. That choice matters a lot if you build developer tools, and it matters to you if you'd rather not inherit a dependency by accident.

I went looking for a head-to-head study of which tools Claude Code, Codex and OpenCode recommend by default. I didn't find one. The research behind this guide turned up plenty of comparisons of speed, price and benchmark scores, but nothing on tool selection itself. So this guide does something narrower and more honest: it explains the mechanisms each agent uses to find and choose tools, which is what actually determines the recommendation, and it tells you how to test the outputs yourself.

How a coding agent decides what to recommend

There are four inputs, and the harness controls three of them.

  1. Training data. The model's baked-in sense of what is popular. This is why agents love the same handful of libraries and sometimes suggest APIs that changed two versions ago.
  2. Live search and fetch. Whatever the harness lets the model read from the web during a task.
  3. Project context. CLAUDE.md, AGENTS.md, existing package files, lockfiles and the code already in your repo. This one is underrated. An agent working in a repo that already uses Drizzle will usually keep using Drizzle.
  4. Connected tools. MCP servers, skills and plugins that feed the agent docs or specialized knowledge.

A useful way to think about it, borrowed from the Tensorlake comparison: the harness decides what tools the model gets, how it manages context, and what it can touch. The same model behaves differently inside different harnesses. Databricks ran Opus 4.8 through several harnesses on its internal codebase and measured 742,000 tokens per task through Claude Code against about 237,000 through Pi, with the same success rate. If harnesses change token use that much, they change what the model sees and does too.

Claude Code: built-in search, deep configuration

Favicon of Claude

Claude

Advanced AI assistant for long-form content
View more
Screenshot of Claude website

Claude Code is Anthropic's terminal agent, with versions in VS Code, JetBrains, a desktop app, the web and mobile. For tool discovery, the relevant facts are these:

  • It has a built-in WebSearch tool and uses WebFetch to pull external documentation, according to Morph's October 2026 comparison.
  • It ships with 10+ built-in tools, subagents, Agent Teams, plan mode, MCP, skills, plugins and hooks. One source counts 29 hook events.
  • MCP tools can be lazy-loaded through Tool Search, which keeps schemas out of the context window until needed.
  • Project memory lives in CLAUDE.md. It does not read AGENTS.md natively, per Builder.io, so teams keep a synced CLAUDE.md alongside AGENTS.md.
  • It auto-compacts long sessions and also supports a manual /compact.

What this means for recommendations: Claude Code is the agent most likely to go and look something up when it is unsure, because search and fetch are first-class. It is also the most steerable. A hook can block installing a package that is not on an approved list, and a skill can teach it your preferred stack. If you want governance over what gets recommended and installed, this is the strongest setup of the three.

The model details differ by source. The May 2026 Medium piece says Sonnet 4.6 on Pro and Opus 4.7 on Max, while a July 2026 HackerNoon piece says Opus 4.8. Check Anthropic's pricing page before you rely on either. Claude Code also requires a paid plan or API access.

Codex: AGENTS.md, skills and a sandbox

Codex is OpenAI's agent, available as an open-source CLI written largely in Rust, a cloud app, IDE extensions and mobile. Per the HackerNoon comparison it runs GPT-5.5 as the recommended model and is included across ChatGPT's Free, Go, Plus, Pro, Business and Enterprise plans, or you can bring an API key. Confirm limits on OpenAI's pricing page.

For tool discovery:

  • OpenAI created the AGENTS.md convention, which Tensorlake says is used by 60,000+ open source projects and was donated to the Linux Foundation. Instructions there are the single biggest lever you have over what Codex picks.
  • It adopted the SKILL.md format in December 2025, the same one Claude Code uses, so skills are portable.
  • MCP works as client and server via config.toml. There is an SDK in TypeScript and Python and codex exec for CI.
  • Compaction happens server side, which is how it sustains long autonomous runs.
  • Cloud tasks run in parallel isolated containers and open pull requests.

Tensorlake calls Codex's OS-level sandbox the strongest of the group. That matters here in an indirect way. A sandbox with restricted network access changes what an agent can look up, so a Codex cloud task may lean harder on training data and repo context than a local Claude Code session with open web access. I couldn't verify how Codex's web access behaves by default in every mode, so test it in your own setup rather than assuming.

Worth noting: Builder.io found Codex's GitHub integration strong, with inline review comments and @Codex mentions on issues and PRs. If your team's decisions about dependencies happen in PR review, that is where Codex's opinions show up.

OpenCode is the open-source, MIT-licensed terminal agent from Anomaly (formerly the SST team). It supports 75+ providers, including local models through Ollama, and Tensorlake cites about 196k GitHub stars.

For tool discovery:

  • Web search comes through MCP rather than a built-in tool, and it has a native Scout subagent for researching external docs (Morph).
  • MCP servers are loaded declaratively per agent in opencode.json.
  • It reads AGENTS.md and, recently, .claude/skills, so a Claude Code setup mostly carries over.
  • LSP integration feeds real compiler diagnostics back to the model, which helps it catch wrong API usage after an edit.
  • The prompt overhead is small: roughly 6,900 tokens before your first message versus about 33,000 for Claude Code, in a community test cited by Tensorlake.

The important point is that OpenCode's recommendations depend more on the model you plug in than the other two. Run it on Claude and you get Claude's tool preferences. Run it on a local open-weight model and you get that model's, with an older and narrower view of the ecosystem. Out of the box, with no search MCP configured, an OpenCode agent is working from training data and your repo.

One caveat: Anthropic cut OpenCode off from Claude subscriptions in January 2026, so Claude in OpenCode now means API billing.

Side by side

Claude CodeCodexOpenCode
Live web lookupBuilt-in WebSearch and WebFetchProvider search, behavior varies by mode (verify)Via MCP, plus Scout subagent for docs
Instruction fileCLAUDE.mdAGENTS.mdAGENTS.md, reads .claude/skills
MCPYes, lazy-loaded with Tool SearchClient and server via config.tomlYes, declarative per agent
Skills (SKILL.md)YesYesYes
Model choiceAnthropic onlyOpenAI models, or API key75+ providers, local models
GuardrailsHooks, deny-first permissionsOS-level sandboxConfig allow/ask/deny, no OS sandbox
Prompt overheadAbout 33,000 tokens (community test)Not reportedAbout 6,900 tokens (community test)
LicenseProprietaryOpen-source CLIMIT

What the benchmarks say, and what they don't

The Medium comparison reports Claude Code (Opus 4.7) at 64.3% on SWE-bench Pro against 58.6% for Codex with GPT-5.5, while Codex leads SWE-bench Verified (88.7% vs 87.6%) and Terminal-Bench 2.0 (82.7% vs 69.4%). Those measure whether code works. None of them measure which library an agent reaches for, so they tell you little about recommendation behavior. Model names also conflict across sources (Opus 4.7 vs 4.8, and one page mentions models I couldn't corroborate), which is a reminder to verify versions on vendor pages.

What vendors and maintainers can do

If you make a developer tool, the practical question is how to end up in these agents' answers. None of what follows is proven specifically for coding agents. It is reasoning from how the mechanisms work, backed by adjacent data on AI search.

Make your docs readable by a fetch

Claude Code fetches pages, OpenCode's Scout reads external docs, and any agent with a search MCP does the same. Server-rendered, fast, well-structured docs with copy-pasteable install commands are easier to use than a JavaScript-heavy docs site. Add an llms.txt if you like, though Promptwatch Data found markdown files are just 0.05% of AI search citations, so markdown serves AI agents, not AI search. Treat it as a nice-to-have.

Expect site: lookups

On August 8, 2026, ChatGPT started using the site: operator at scale: it went from 0.37% to about 16.8% of fanout queries in a day, and average queries per response rose from about 1.08 to 1.83, per Promptwatch Data on ChatGPT's site: operator behavior. That is ChatGPT's web search, not Codex, Claude Code or OpenCode, and I am not claiming the agents behave the same way. But it shows assistants do query specific domains directly when they want an answer about a specific vendor. If your docs are not indexed, that query returns nothing.

Look at what AI search cites for software

For software prompts from Sep 28 to Oct 4, 2026, Promptwatch's ChatGPT software citation data shows GitHub as the most cited domain at 1.2%, followed by learn.microsoft.com at 0.98% and G2 at 0.73%. Docs and help centers lead by source type at 2.64%, vendor sites earn 2.01%, and vendor sites plus docs together earn about three times as much as review sites and analysts. The takeaways: keep docs crawlable, keep a public GitHub presence, and keep G2 and Capterra profiles current. Again, this is ChatGPT, not the coding agents, but the same web is what a search-enabled agent reads.

Ship an MCP server or skill

All three agents support MCP and the SKILL.md format. A small skill that explains how to install and use your SDK correctly is likely the most direct way to influence an agent that has already decided to try you. It also fixes the stale-API problem, where an agent writes against a version from two years ago.

Track what the agents say about you

Because nobody publishes this data, the practical option is to monitor it. Promptwatch tracks how Codex, Claude Code and OpenCode recommend tools, SDKs and docs, alongside ChatGPT, AI Overviews and other models, which is useful if you sell to developers.

Favicon of Promptwatch

Promptwatch

Track and optimize your brand visibility in AI search engines
View more
Screenshot of Promptwatch website

If you want to compare options, the GEO software directory at bestgeosoftware.com lists more tools in this category.

How to test recommendations yourself

Since there is no benchmark, run a small experiment. It takes an afternoon.

  1. Write 10 realistic prompts: "add rate limiting to this Express API," "set up background jobs," "add error monitoring." Keep them in a fresh empty repo so project context does not bias the result.
  2. Run each prompt in all three agents, with the same underlying model where you can (OpenCode lets you do this).
  3. Repeat each prompt three times. Recommendations vary run to run.
  4. Log what each agent chose, whether it searched, and what it fetched.
  5. Repeat once with web search disabled and once with a docs MCP attached. The gap between those runs tells you how much is training data and how much is live lookup.

In my read of the sources, expect Claude Code to search more often, Codex to follow AGENTS.md closely and stay inside its sandbox, and OpenCode to track whichever model you chose. That is a hypothesis to check, not a finding.

Which one to use

  • Choose Claude Code if you want search, hooks and governance over what gets installed. The HackerNoon author describes it as the one that feels most like it is thinking with you in an unfamiliar repo.
  • Choose Codex if you delegate well-specified tasks in parallel, want PR review and care about OS-level sandboxing. Under-specified prompts get built wrong, fast.
  • Choose OpenCode if you want model freedom, local or offline work, or an auditable open-source stack. You will configure more of it yourself, and search is your job to wire up.

Tensorlake's closing advice is the one I'd keep: pick the harness first and the model second. The harness decides what the agent can see, and what it can see decides what it recommends.

What to verify before you rely on this

Model versions, plan limits and default behaviors in these products change monthly. Check Anthropic's and OpenAI's pricing and docs pages, and test any claim about default search behavior in your own setup. The one thing I'd bet on holding: instruction files and crawlable docs influence all three agents, and neither costs much to fix.

Share:

© 2026 Surferstack · Find the best Marketing tools for your GTM motion · RSS

Surferstack is an affiliate review site. When you click links to vendors or buy through links on our site, we may earn an affiliate commission at no extra cost to you.

Surferstack is a review website based on user reviews on Reddit and G2, and on publicly available information. We keep everything as up to date as possible, but pricing and features can change. Always confirm the details with the vendor before purchasing.