Can AI Coding Agents Find Existing Features Before Coding?

Can AI Coding Agents Find Existing Features Before Coding?
We asked four AI coding agents to add link expiry in Papermark. It was already there. Could they find it before writing code?

Most coding-agent demos focus on the edits. We wanted to test the step before them: can an agent read the codebase well enough to notice the requested feature already exists?
We gave four agents the same request in Papermark, an open-source document-sharing app. The feature request sounded new. The codebase already had it.
We used Papermark, an open-source alternative to DocSend, built with Next.js and Prisma. It has document links, datarooms, analytics, and team features.
The agents were OxCode, Claude Code, Codex, and Antigravity. We ran each as a VS Code extension against the same repository clone. Each got the same prompt:
I want to improve document sharing. Add a feature that allows document owners to control how long their shared documents remain accessible. First explore the existing codebase. Do not modify any files yet. Ask me the important questions you need answered before implementing this feature.
The catch: Papermark already supports link expiry. A share link can have an expiresAt date, the settings sheet has a date picker, presets can set a relative duration, and the view routes reject expired links. A quick skim could miss all of that and lead an agent to design a duplicate.
That was the test: would each agent find the existing feature, trace how it worked, and separate real gaps from work that would duplicate what was already there? We told them not to edit files, so this tests their codebase exploration before implementation—not whether they actually created duplicate code.

First test: find the existing feature
All four agents found that link expiry already exists. None proposed building it from scratch. The useful differences came next: how much of the existing implementation did each agent actually trace, and what gaps did it find?
OxCode opened its answer with exactly that: "I explored the codebase without changing anything. Here's what I found, and it changes the shape of the question." It then walked through the schema (Link.expiresAt and the preset fields), the owner UI (the expiration section in the link sheet), the write paths for creating and updating links, and where expiry is enforced.

Codex said the core feature "already exists per share link" and that this would be "an improvement rather than a greenfield addition". Claude Code opened with "Papermark already has link expiry, so this is mostly about closing its gaps." Antigravity laid out "What Currently Exists in the Codebase" before listing limitations.
That’s the basic context-awareness test: can the agent show what already exists and where it lives before it suggests a change? If it can’t, its plan is a guess.
Second test: separate existing behavior from real gaps
Finding the feature was only the first step. The agents differed in what they checked next—and in which gaps they noticed.
OxCode wrote a section called "What is genuinely missing" and listed five gaps:
- No lifecycle action. Nothing runs when a link expires. Expired links just start denying access: nothing is archived, nobody is told, and there's no warning before expiry.
- No way to find them. The links table has no status filter, so the only sign of an expired link is a small icon.
- Relative expiry is preset-only. "Expires N days after creation" exists on presets, but not on an individual link.
- No workspace default and no bulk edit.
- One route it hadn't verified. It said plainly that it had not checked whether the workflow-entry link routes enforce expiry, and that this was a gap it would need to confirm rather than assume.

That uncertainty was useful. An agent that tells you what it hasn’t checked gives you a concrete next step; one that sounds certain can hide a gap.
Claude Code traced the feature into the document-page route and found a 23-hour gap: someone who opened a document before expiry could keep loading pages after the link expired. It also found that bulk import reads a preset field the preset screens never set, so those links never expire. Codex caught the 23-hour issue too, and noticed the create and update APIs accept dates in the past.
OxCode mapped the expiry flow across the access paths it checked, but missed the 23-hour open-session gap. Finding a feature is one thing; tracing every edge case is another.
Antigravity focused on product options: document-level expiry, quick duration buttons, and “expire after first view.” It didn’t trace deeper code paths like the open-session gap.
Third test: ask questions grounded in the code
We also asked each agent to list the questions it needed answered before implementation. The best questions came from what it had found in the code—and would change the solution.

OxCode asked ten. Its first question went straight to scope: "Which gap am I actually closing?" It offered four directions (lifecycle actions like auto-archive and owner notifications, usability like presets and an expiry filter, a new kind of expiry such as "after first view" or "after inactivity", or something else) and said which it would assume by default. The rest covered what "no longer accessible" should mean (a hard denial or a friendly expired page, and whether already-open sessions get cut off), when the clock starts, auto-archive versus deny, notifications, link types, plan gating, the data model (including an audit trail of who changed expiry), reviving expired links, and a workspace-level default. It finished with "Answer what matters and say 'you decide' on the rest. I'll take the conservative option and flag it. I have not modified any files."

The other agents asked in their own styles, and each did something well:
- Codex asked seven numbered questions that, between them, covered every major decision we could think of. It was the only agent to ask who should be allowed to control expiry: the document's owner, the person who created the link, or any team member who can manage the document.
- Claude Code asked four questions, each with options and trade-offs, and marked a recommended answer on some of them. For the 23-hour gap, it asked whether expiry should cut viewers off immediately, block new pages with a notice, or keep the current grace period. Questions shaped like that are quick to answer.
- Antigravity asked about scope, timing, what happens after expiry, and plan gating. Its scope question was the clearest of the four, with A/B/C options for document-level expiry, better link-level controls, or both.

The agents didn’t catch the same things. Use their findings as a starting point, then check the important paths yourself.
Token count didn’t measure codebase understanding
We also counted the AI calls and tokens in each tool’s local logs. Here are the totals for these runs:
| Agent | AI calls | Total tokens |
|---|---|---|
| Claude Code | 6 | 375,926 |
| OxCode | 13 | 380,417 |
| Codex | 12 | 625,420 |
| Antigravity | 71 | 3,495,035 |

Antigravity used about 3.5 million tokens across 71 calls—roughly nine times Claude Code’s total—but still missed the open-session question and who controls expiry. Claude Code and OxCode used similar totals; Codex was in between.
These totals are rough: tools count cached and reasoning tokens differently, and tokens aren’t a cost comparison. They show how much each agent processed in this run—not whether it understood the code.
More tokens and more calls didn’t mean better codebase understanding. The signal we cared about was whether an agent found existing behavior, traced it, and identified the right gaps.
A quick checklist for codebase context
A useful codebase-first response does four things:
- Map what exists. Name the files, models and routes involved, so you can check the agent's understanding.
- Name the gaps. Separate what's missing from what already works, and say what wasn't verified.
- Ask what changes the build. Ask about scope, behaviour at the edges, who's allowed to do what, and what users see. Offer options, and give a default for anything left unanswered.
- Then build. Only once the answers are in.

Ask the agent to explore before it edits. Our prompt said: “First explore the existing codebase. Do not modify any files yet. Ask me the important questions.” That one instruction can stop a duplicate feature before it turns into a pull request.
OxCode’s /plan mode keeps this step read-only while you work through the design. Try it at oxcode.ai.
How we ran this
- Repo: Papermark (github.com/mfts/papermark), one clone shared by all four agents.
- Agents: OxCode, Claude Code, Codex, and Antigravity as VS Code extensions. Same prompt; one run each.
- Tokens: from each tool's own local logs, summed by a script. Tools may count cached and reasoning tokens differently, and tokens aren't cost.
- Evaluation: we read each agent’s response and compared what it found in the codebase. A scorecard written by one agent was only a checklist, not the verdict.
- Footage: shortened; private file paths and model names blurred.
We build OxCode, an AI coding agent designed to understand a codebase before it edits. Try it at oxcode.ai, on GitHub, or follow @OxCode_ai.