Back to Research

How Coding Agents Choose Tools

The New Stack’s tool-choice story shows why coding agents reward machine-readable docs over old brand memory.

Editorial illustration for How Coding Agents Choose Tools.
Rogier MullerSeptember 8, 20268 min read

Twenty years of brand building froze in time: How coding agents select tools is a The New Stack article about how AI coding agents choose developer tools when old brand reputation is not directly visible to them. It deals with a small but sharp question: what happens when the buyer is not browsing a website, reading conference talks, or carrying ten years of emotional memory about a vendor? The takeaway is simple: coding agents reward tools that are easy to retrieve, install, call, and verify, not just tools humans remember. Agentic coding is software development where an AI agent plans work, edits files, runs commands, and reports results with partial autonomy.

The story landed because it names something many developers have felt in their repos. A tool can be famous to humans and still be nearly invisible to an agent if its docs are hard to fetch, its install path is ambiguous, or its safe usage pattern is buried in prose. That has direct consequences for Codex, OpenAI’s coding agent, and for code review guardrails around AI-generated changes.

Read the story as a routing problem

The New Stack piece is less about brand being dead and more about brand being frozen at the edge of the agent’s context window. Humans remember logos, conference booths, blog posts, and old production incidents. Agents mostly see what the task, repo, docs, package metadata, search results, and connected tools put in front of them.

That turns tool choice into a routing problem. If an agent needs a database client, formatter, auth helper, test runner, or hosted API, it is likely to prefer the path with the clearest examples and the lowest ambiguity. The old brand may still matter to the human reviewer, but it may not be the first signal the agent uses.

The trap is treating this as a marketing oddity. For developers, it is a workflow issue. If the agent picks a library because the quickstart was easier to parse, you still own the dependency, the security posture, and the review burden.

Watch what the agent can actually see

A coding agent does not choose from the whole market. It chooses from the slice of the world exposed through prompt context, repo files, web access, package indexes, MCP servers, and local commands. MCP is an open protocol for connecting AI applications to external systems such as repositories, databases, issue trackers, and internal knowledge stores.

That matters in real work. In a Codex repo, an agent may see AGENTS.md, package.json, lockfiles, test scripts, and whatever docs you paste or connect. In Codex, Anysphere’s AI code editor, the Agent feature can inspect code, propose edits, and use tools from inside the editor flow. Neither product magically inherits a staff engineer’s full memory of which vendor won hearts in 2014.

The practical consequence is almost boring, which is why it is important. A clean install command beats a vague promise. A short migration guide beats a branding page. A reproducible test beats a confident model explanation.

The trap is assuming more context always helps. If you connect a broad document store or writable MCP server without boundaries, the agent may find stale advice, private data, or an unsafe shortcut. Visibility needs shape, not just volume.

Treat brand as context, not memory

Brand is still useful. It can encode support quality, operational maturity, security history, and community trust. But agents need that value translated into artifacts they can use inside a task.

For example, a platform team might prefer one HTTP client because it has known retry behavior and observability hooks. A human can remember that. A coding agent needs a repo rule such as: use @company/http-client for outbound service calls, run pnpm test:contract after touching integrations, and do not add raw fetch calls in service code.

That is where the related training topic becomes concrete. The useful unit is not a philosophy about AI coding. It is a small rule, a permission boundary, or a verification loop that makes the preferred path obvious.

The limitation is that agents can overfit to visible instructions. A beautifully documented but poor-fit tool can win the first draft. Review still needs a human who asks: does this dependency match our runtime, license, latency needs, data policy, and failure model?

Try one safe tool-choice experiment

Do not start by asking the agent to pick your next platform. Start with one boring decision in a real repo, then make the choice visible and reviewable.

What this is: a small experiment that checks whether Codex follows a documented tool preference when two plausible options exist. Care when agents keep adding off-pattern libraries, skipping house wrappers, or choosing examples from the public web over repo-local conventions.

Copy this into a narrow AGENTS.md near the code you want to protect:

# AGENTS.md

## Dependency choices

Use the existing project wrapper before adding a new third-party package.

For HTTP calls in this directory:
- Prefer `src/lib/httpClient.ts`.
- Do not add direct `fetch`, `axios`, or new request libraries unless the task explicitly asks for it.
- If the wrapper does not support the needed behavior, stop and explain the gap before editing.

## Verification

After changing integration code, run:
- `pnpm test src/lib/httpClient.test.ts`
- `pnpm lint`

Report the commands run and whether they passed.

Then give Codex a small task: add one service call, update one test, and report why it used the wrapper. The point is not to trap the agent. The point is to see whether your preferred tool is represented as executable context instead of tribal memory.

If the task touches credentials, add an MCP boundary note before you connect anything external:

MCP boundary note:
- Read-only repository and issue access is allowed.
- Secret stores, production databases, and customer data are not available for this task.
- If a token or private value is needed, ask for a human handoff instead of guessing.

For a related security pattern, see Keyclasp Keeps Tokens Out of Prompts. Tool choice and secret handling meet in the same place: what the agent can see, what it can call, and what the reviewer can verify.

Common questions

  • Does this mean brand no longer matters to coding agents?

    No. Brand still matters when humans approve tools, set repo rules, and review dependencies. The shift is that brand has to become visible as machine-readable context: docs, examples, package metadata, local conventions, and verification commands. If it is only in a developer’s memory, the agent may not use it.

  • What makes a tool more likely to be chosen by an agent?

    A tool is more likely to be chosen when the agent can find a clear install path, a working example, current docs, and a fast way to verify the result. The citable artifact is usually small: one quickstart, one tested snippet, one repo rule, and one command that proves the integration works.

  • Should I block agents from adding new dependencies?

    Usually not by default. A better first move is to require the agent to justify a new dependency and run the relevant verification command. For example, an AGENTS.md rule can say: use the local wrapper first, explain gaps before adding packages, and include the test output in the handoff.

  • How does MCP change tool selection?

    MCP changes tool selection by making external systems available as agent tools instead of background knowledge. That is powerful and risky. A read-only MCP server for issues or docs can improve context; a broad writable connection can turn a simple coding task into an accidental data or permission problem.

  • Is this only relevant to Codex?

    No. The pattern applies across coding agents, including Codex and Codex Agent. Codex users should care because repo instructions, command workflows, and handoff receipts are often the difference between a plausible patch and a patch that matches local standards.

Best ways to use this research

  • Best for: understanding why agents sometimes choose the most visible tool instead of the tool your senior developers would pick from memory.
  • Best first artifact: write one narrow AGENTS.md rule for a recurring tool choice, then ask Codex to complete a small task and report the commands it ran.
  • Best comparison angle: compare tool docs by what an agent can execute: install command, minimal example, failure mode, and verification step.
  • Best review habit: treat every new dependency as a design decision, even when the patch looks mechanically correct.

Further reading

Next step

Pick one dependency choice your repo keeps getting wrong and make the preferred path visible in AGENTS.md. Then run one Codex task and review whether the agent chose the tool for the reason you intended.

One methodology lens

One useful way to read this through our methodology is the Plan step: delegate first-pass decomposition and dependency mapping, review the sequencing and assumptions, and keep ownership of scope and priorities. If that split is still fuzzy, the workflow usually is too.

Related training topics

Related research

Continue through the research archive

Ready to start?

Transform how your team builds software.

Book a 15-minute sync