Can AI Coding Agents Understand Large, Existing Codebases? An Excalidraw Case Study

Writing code from scratch is one thing. Adding a feature to an established codebase without breaking existing functionality is an entirely different problem.
Most AI coding demonstrations start with an empty directory. There are no architectural decisions to respect, existing dependencies to consider or conventions to follow.
That's rarely how software engineering works.
Developers spend a considerable amount of their time working on code written by someone else. Before implementing anything, they need to understand how the application works, where their changes belong and what those changes might affect.
We wanted to see how well an AI coding agent could handle that process independently.
So we gave OxCode the Excalidraw codebase, one feature request and no follow-up prompts.
The result was a working feature delivered in 1 hour and 28 minutes. What happened during that time was arguably more interesting than the feature itself.
The experiment: Adding a feature to Excalidraw
Excalidraw is an open-source virtual whiteboard application with an established architecture, its own UI components, contribution guidelines and testing infrastructure.
Rather than asking OxCode to build something from scratch, we wanted it to introduce a feature that felt like a natural extension of the existing application.
The task was to build a Website Mapper.
A user enters a website URL, clicks Generate Map, and Excalidraw creates a visual representation of the homepage and up to five internal pages, connected by arrows.
The generated elements should behave like ordinary Excalidraw shapes, allowing users to move, edit and manipulate them on the canvas.
We also included a few constraints:
- Explore the existing codebase before making changes.
- Reuse existing components and functionality wherever possible.
- Do not use AI APIs or paid external services.
- Preserve existing application functionality.
- Test the implementation.
OxCode was running in Agent mode with full access to the local development environment. We submitted the prompt once and didn't intervene during the task.
Understanding the codebase before writing code
One of the first things worth observing when working with an AI coding agent is what it does immediately after receiving a task.
Does it start creating files, or does it investigate how the application already works?
OxCode began by exploring the repository structure and locating the files relevant to the feature. Within the first few minutes, it had identified components/App.tsx, which contains much of Excalidraw's editor logic, and actions/types.ts, which defines how actions are integrated.
It then investigated how existing dialogs were opened and rendered within the application.
This matters because adding a new dialog isn't simply a question of building a React component. That component needs to fit into the application's existing state management, menu structure, rendering logic and user interaction patterns.
By the end of the task, OxCode had modified 12 files. Two were new:
websiteMapper.ts, containing the website mapping logic.WebsiteMapperDialog.tsx, containing the user interface.
The remaining changes integrated the feature into Excalidraw's existing dialog system, menus, translations and development server configuration.
Rather than creating an independent system for inserting shapes, OxCode reused Excalidraw's existing paste mechanism. As a result, the generated website map behaved like other canvas elements, including support for selection, editing and undo operations.
This is an important distinction between generating code that works in isolation and implementing a feature that belongs in an existing application.
Following engineering constraints
The feature was called AI Website Mapper, but the implementation was explicitly prohibited from using AI APIs or paid services.
Instead of introducing another dependency or relying on a third-party AI provider, OxCode implemented the mapping functionality using HTML parsing.
The implementation fetches the homepage, extracts its title, identifies up to five unique internal links and retrieves the titles of those pages.
It also filters out irrelevant links, including email addresses, external websites and downloadable files.
No AI inference is required to generate the map.
This might seem like a relatively straightforward requirement, but constraints are an important part of real-world software engineering.
A development team might prohibit certain dependencies because of licensing restrictions, infrastructure costs, security requirements or deployment limitations. An AI coding agent needs to treat those requirements as part of the task, rather than something it can quietly work around.
Handling a real implementation problem: CORS
The most interesting technical challenge came when the application needed to retrieve HTML from an external website.
Browser-based applications cannot freely read responses from other origins unless those origins permit cross-origin requests. This restriction is enforced through Cross-Origin Resource Sharing, commonly known as CORS.
For a website mapping feature, that creates an immediate problem.
OxCode addressed it by adding a small proxy endpoint to Excalidraw's existing development server. Instead of having the browser fetch external websites directly, the application could request the page through its own server.
For static environments without that server, the implementation included a direct-fetch fallback followed by a free proxy that did not require an API key.
The development-server solution allowed the feature to work within the local environment without introducing a paid scraping service.
The static deployment fallback does introduce an external proxy dependency, however. A production implementation would need to consider its reliability, privacy implications and security controls before relying on it.
What made this part of the experiment interesting was seeing the agent encounter a genuine architectural constraint and find a workable solution within the project's existing development setup.
Using the project's own testing infrastructure
Generating a plausible implementation is only part of the job. We also wanted to see whether the agent could establish that its implementation worked.
Excalidraw provides contributor documentation, development guides and repository-level instructions. OxCode consulted this material and used the project's existing testing infrastructure.
It added 23 unit tests covering the website mapping logic, including internal link filtering, duplicate removal and page limits.
It also added two UI tests within Excalidraw's existing UI test directory.
The new unit test suite finished with all 23 tests passing.
We then launched the application ourselves to check the complete workflow.
From the main menu, we opened Website Mapper, entered the OxCode website URL and clicked Generate Map.
After a short loading animation, Excalidraw displayed the homepage alongside five connected pages: Docs, Pricing, Benchmarks, Blog and Install.
The homepage was visually distinguished from the other pages, the arrows connected the elements, and each shape could be selected and edited using Excalidraw's existing tools.
The feature worked in our local environment without requiring a second prompt or manual correction during implementation.
What the AI coding agent got right — and what it didn't
There were a few details in OxCode's final response that were particularly useful.
The test runner had automatically modified an unrelated snapshot file. OxCode identified the change, explained why it hadn't reverted it without approval and provided a command to clean it up.
It also disclosed a piece of temporary working state left behind during its checks.
Finally, it explained a limitation of the implementation: websites that render their navigation entirely through JavaScript may not expose internal links in their initial HTML. In those cases, the mapper may only generate the homepage.
These are the kinds of details that matter during a code review. Knowing what remains unresolved is considerably more useful than receiving a generic message saying everything is complete.
The biggest downside of the experiment was execution time.
The entire task took 1 hour and 28 minutes. Part of that time was affected by model service delays, while the remainder involved repository exploration, implementation and verification.
That's not particularly fast, and we wouldn't claim otherwise.
Whether that trade-off is worthwhile depends on the task. For a small, isolated change, waiting that long would be difficult to justify. For a feature that requires understanding an unfamiliar application and integrating with its architecture, the time spent investigating and verifying the implementation can be valuable.
What should developers look for in an AI coding agent for existing codebases?
When evaluating AI coding tools, developers often focus on benchmark scores, context window sizes and the quality of the underlying language model.
Those are useful indicators, but they don't necessarily tell you how an agent will behave inside your application.
Based on this experiment, there are five things we would pay particular attention to.
Repository understanding: Does the agent investigate existing functionality and architectural patterns before introducing new code?
Integration: Does it reuse existing components, utilities and conventions, or create parallel implementations that increase technical debt?
Constraint adherence: Does it respect the project's dependency, security and infrastructure requirements?
Verification: Does it run relevant tests, inspect failures and distinguish between verified behaviour and assumptions?
Execution efficiency: How much time and developer intervention does it require to complete the task?
These qualities become increasingly important when working with larger codebases, particularly those with years of accumulated technical decisions.
Can AI understand an entire legacy codebase?
One successful feature implementation doesn't establish that an AI agent understands every part of a large application.
What this experiment does demonstrate is that an AI coding agent can independently investigate the relevant parts of an unfamiliar codebase, follow existing architectural patterns, solve implementation problems and verify a working feature without continuous developer intervention.
That's a meaningful step beyond generating individual code snippets.
It's also the direction we're pursuing with OxCode, an AI software engineer designed to understand project context, implement changes within existing codebases and validate its own work.
As AI coding agents become more capable, their value will increasingly depend on how well they work with the software that already exists, rather than how quickly they can generate something new.
This case study represents a single run on a local copy of the open-source Excalidraw repository. It is not a comparative benchmark or a claim of production readiness.