Windsurf: Devin Introduces Code Scans for Codebase-Wide Audits

WindsurfView original changelog

Windsurf's Devin can now run Code Scans, a goal-driven audit mode that investigates an entire codebase against a stated objective, such as speeding up compilation or fixing SEO issues, and turns the findings into pull requests. It is powered by Agentic MapReduce, the same parallel-agent architecture built for Devin Security Swarm, which plans, shards, maps and reduces a repository-wide investigation into one prioritized report. In an internal demo on the open-source Dioxus project, Devin cut debug build time by 64% (from 58.6s to 21.0s) across 22 workspace crates, and Philips' Digital Computational Pathology team reported a 96% PR merge rate and over 700 engineering hours saved while testing the feature ahead of launch. Developers can start a scan by typing /scan in the Devin webapp.

Key Takeaways

  • Code Scans turns a stated goal into pull requests, letting developers describe an objective like faster builds instead of manually pointing Devin at specific files.
  • Agentic MapReduce powers the feature, reusing the Plan, Shard, Map, and Reduce architecture Cognition originally built for Devin Security Swarm.
  • A Dioxus demo cut debug build time by 64% (58.6s to 21.0s) across 22 workspace crates by identifying issues like unnecessary web dependencies and oversized crates.
  • Philips' Digital Computational Pathology team reported a 96% PR merge rate and saved more than 700 engineering hours testing Code Scans ahead of launch.
  • A self-run SEO scan on devin.ai and cognition.com surfaced 44 findings, raising devin.ai's Ahrefs health score from 87 to 92 and cutting slow pages by 73%.
  • The feature launches via a simple /scan command in the Devin webapp, aimed at repository-wide tasks like migrations, dead-code cleanup, and compliance audits.

Devin Gets a Goal-Driven, Codebase-Wide Audit Mode

Windsurf's Devin introduced Code Scans on September 16, 2026, a new way to turn a broad engineering goal, rather than a specific file or bug, into concrete pull requests. Instead of pointing Devin at a location in the codebase, developers now describe what they want to achieve, such as improving SEO, reducing maintenance overhead, or speeding up compilation, and Devin investigates the whole repository to find what needs to change, evaluates the findings, and proposes the fixes as PRs. Cognition frames this as addressing objectives that are easy to state but expensive to investigate manually, since the investigative phase across an entire codebase is normally the bulk of the work.

How Code Scans Work: Agentic MapReduce

Code Scans is built on Agentic MapReduce, the same architecture Cognition previously built for Devin Security Swarm, adapted here for general-purpose codebase audits. It runs in four phases:

  • Plan: Devin studies the repository and defines rules for identifying code relevant to the stated goal.
  • Shard: Those rules run across the codebase, and matching code is divided into focused batches.
  • Map: Parallel Devin agents investigate each batch independently.
  • Reduce: A final agent consolidates the batch results, removes duplicates, and prioritizes findings into a single report.

This lets Devin work through investigations that would otherwise exceed what a single agent could hold in context, by distributing the work and then synthesizing it back into one coherent set of findings.

Results From Early Testing

Cognition published two concrete demonstrations alongside the launch. Running a compilation-focused scan against the open-source Dioxus project, Devin analyzed thousands of files across 22 workspace crates and cut the clean debug build time from 58.6 seconds to 21.0 seconds, a 64% reduction. The findings behind that improvement included a default feature that was forcing in unnecessary web dependencies, an oversized foundational crate carrying volatile logic, proc-macro invocations tied to a 112-element table, unconditional cargo-generate compilation, and unnecessary inclusion of Tokio's "full" feature set.

Devin also ran an SEO-focused scan against Cognition's own sites, devin.ai and cognition.com, surfacing 44 findings that were fixed over the following days. That work raised devin.ai's Ahrefs health score from 87 to 92, cut the number of slow pages by 73%, and eliminated missing image alt text on cognition.com.

Beyond Cognition's own examples, Philips' Digital Computational Pathology team, part of Philips Enterprise Informatics, tested Code Scans ahead of general availability and reported a significant impact on "software quality, bug fixes, stability, performance, and compliance," with an estimated 96% pull request merge rate across several repositories and more than 700 engineering hours saved during the testing window.

Getting Started

Code Scans is available now by typing /scan in the Devin webapp, with full documentation published at docs.devin.ai/work-with-devin/code-scans. Cognition suggests the feature is best suited to goals with measurable, repository-wide requirements, such as migrations that need to touch every call site, enforcing a policy across many services, cleaning up dead code, closing test coverage gaps, checking accessibility or regulatory compliance, or hunting down performance and database-query problems that are scattered across a codebase.

Windsurf: Devin Introduces Code Scans | Yet Another Changelog