<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: ail akram</title>
    <description>The latest articles on DEV Community by ail akram (@ail_akram_dcc5063c428734b).</description>
    <link>https://dev.to/ail_akram_dcc5063c428734b</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3993672%2F8fe1cc41-9900-4eb9-a9ae-9350e429b7bd.png</url>
      <title>DEV Community: ail akram</title>
      <link>https://dev.to/ail_akram_dcc5063c428734b</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ail_akram_dcc5063c428734b"/>
    <language>en</language>
    <item>
      <title>leanrea: An 8 KB Skill That Replaces the REA MCP Server, Claimed vs Verified</title>
      <dc:creator>ail akram</dc:creator>
      <pubDate>Fri, 23 Oct 2026 07:15:27 +0000</pubDate>
      <link>https://dev.to/ail_akram_dcc5063c428734b/leanrea-an-8-kb-skill-that-replaces-the-rea-mcp-server-claimed-vs-verified-4125</link>
      <guid>https://dev.to/ail_akram_dcc5063c428734b/leanrea-an-8-kb-skill-that-replaces-the-rea-mcp-server-claimed-vs-verified-4125</guid>
      <description>&lt;p&gt;Introduction: Why leanrea Is Getting Attention&lt;/p&gt;

&lt;p&gt;leanrea is a compact coding-agent skill designed to guide reverse-engineering work through ordinary command-line utilities instead of requiring the agent to interact with REA’s full Model Context Protocol (MCP) tool layer. Its central idea is simple: when a coding agent already has shell access and the right utilities are installed, a short set of well-organized instructions may be enough to route common investigations efficiently.&lt;/p&gt;

&lt;p&gt;The project has attracted attention because its author reports that an approximately 8 KB skill completed a small benchmark faster and at lower cost than REA, while scoring almost as highly. That is an interesting result, but it needs context. A benchmark across a limited set of tasks is evidence about those tasks and that environment—not proof that leanrea is universally better or that REA is unnecessary.&lt;/p&gt;

&lt;p&gt;This review separates the repository’s claims from what the published benchmark can reasonably establish. It also examines a practical distinction that is easy to miss: leanrea is primarily an instruction layer, while REA is a larger MCP server and CLI system. They overlap in some workflows, but they are not identical products.&lt;/p&gt;

&lt;p&gt;What Is leanrea?&lt;/p&gt;

&lt;p&gt;leanrea is an open-source skill file that tells an AI coding agent how to approach common reverse-engineering tasks. Rather than exposing a large collection of specialized MCP tools, it maps target types to direct shell commands, suggests efficient first-pass checks, and documents pitfalls that can lead to incomplete or misleading results.&lt;/p&gt;

&lt;p&gt;The repository describes the skill as roughly 8 KB. It includes routing guidance for targets such as Electron applications, minified web bundles, Mach-O binaries, Go and Rust executables, .NET assemblies, Android packages, Flutter artifacts, WebAssembly, SQLite files, packet captures, firmware, and websites. The exact result still depends on what the target contains and which tools are available on the machine.&lt;/p&gt;

&lt;p&gt;A skill is not the same thing as an analysis engine. leanrea does not, by itself, install tools such as Ghidra, JADX, Hopper, apktool, binwalk, or platform-specific utilities. It guides the agent toward tools it can already run. If a required utility is missing, the agent may need setup help or a different analysis path.&lt;/p&gt;

&lt;p&gt;How leanrea Works Under the Hood&lt;/p&gt;

&lt;p&gt;Choose an authorized target. Work only with software, binaries, captures, or systems that you own or are permitted to inspect. Make a copy when appropriate and preserve the original artifact.&lt;/p&gt;

&lt;p&gt;Identify the target type. Determine the file format using metadata and magic bytes rather than relying only on the filename. This helps avoid applying an unsuitable toolchain.&lt;/p&gt;

&lt;p&gt;Route to relevant utilities. The skill recommends direct commands for the target—for example, ASAR extraction and ripgrep for Electron bundles, macOS inspection tools for Mach-O files, or Go’s own build-information command for Go binaries.&lt;/p&gt;

&lt;p&gt;Batch initial reconnaissance. Instead of asking the agent to call many separate wrappers, leanrea encourages combining related checks into a focused shell call where practical. This can reduce tool round trips and avoid flooding the context with irrelevant output.&lt;/p&gt;

&lt;p&gt;Inspect targeted evidence. Search for relevant strings, imports, symbols, call sequences, metadata, or code paths. Avoid dumping entire minified files or huge JSON outputs into the conversation.&lt;/p&gt;

&lt;p&gt;Report evidence carefully. The skill encourages labeling claims as seen, inferred, or unknown. This helps distinguish direct observations from interpretations and from information that has not been established.&lt;/p&gt;

&lt;p&gt;For example, a developer investigating an Electron application might extract its ASAR archive and search bundled code for an IPC channel or feature handler. A Go executable may expose compiler and dependency metadata through &lt;code&gt;go version -m&lt;/code&gt;. A macOS binary may be inspected with tools such as &lt;code&gt;otool&lt;/code&gt;, &lt;code&gt;nm&lt;/code&gt;, or other available platform utilities. These are examples of the workflow described by the project, not a guarantee that every target can be fully understood with one command.&lt;/p&gt;

&lt;p&gt;leanrea vs REA MCP Server: Key Differences&lt;/p&gt;

&lt;p&gt;Area&lt;/p&gt;

&lt;p&gt;leanrea&lt;/p&gt;

&lt;p&gt;REA&lt;/p&gt;

&lt;p&gt;Architecture&lt;/p&gt;

&lt;p&gt;A compact skill/instruction file; agent uses its shell.&lt;/p&gt;

&lt;p&gt;A broader MCP server and CLI that exposes specialized operations.&lt;/p&gt;

&lt;p&gt;Installation footprint&lt;/p&gt;

&lt;p&gt;Repository describes one SKILL.md of about 8 KB.&lt;/p&gt;

&lt;p&gt;Repository benchmark compares against an npm package and MCP setup; reported package footprint is larger.&lt;/p&gt;

&lt;p&gt;MCP server&lt;/p&gt;

&lt;p&gt;Not required for the skill’s intended workflow.&lt;/p&gt;

&lt;p&gt;MCP is a core way REA exposes tools to compatible agents.&lt;/p&gt;

&lt;p&gt;Tool exposure&lt;/p&gt;

&lt;p&gt;Adds no new MCP tools; relies on normal shell access.&lt;/p&gt;

&lt;p&gt;Exposes a large tool catalogue; repository reports 207 tools for the tested version.&lt;/p&gt;

&lt;p&gt;Command-line dependencies&lt;/p&gt;

&lt;p&gt;Relevant utilities must be available locally.&lt;/p&gt;

&lt;p&gt;REA routes through its infrastructure and may still rely on external analysis engines for deeper tasks.&lt;/p&gt;

&lt;p&gt;Analysis workflow&lt;/p&gt;

&lt;p&gt;Instructions select direct commands and focused follow-up checks.&lt;/p&gt;

&lt;p&gt;Provides structured operations through its MCP/CLI interface.&lt;/p&gt;

&lt;p&gt;Evidence and output&lt;/p&gt;

&lt;p&gt;Agent interprets command output; skill asks for seen/inferred/unknown distinctions.&lt;/p&gt;

&lt;p&gt;Provides a more integrated tool interface; exact output depends on the operation and version.&lt;/p&gt;

&lt;p&gt;Context overhead&lt;/p&gt;

&lt;p&gt;Small instruction file; no large MCP catalogue added by the skill.&lt;/p&gt;

&lt;p&gt;Can add tool-definition overhead, though selective/deferred tool loading can reduce this.&lt;/p&gt;

&lt;p&gt;Portability&lt;/p&gt;

&lt;p&gt;Potentially portable across agents that support skills and shell access.&lt;/p&gt;

&lt;p&gt;Requires a compatible MCP/CLI setup and its supported runtime environment.&lt;/p&gt;

&lt;p&gt;Best fit&lt;/p&gt;

&lt;p&gt;Common investigations where direct tools already exist and the agent can use them.&lt;/p&gt;

&lt;p&gt;Workflows that benefit from REA’s integrated tool layer, supported operations, or repeatable interfaces.&lt;/p&gt;

&lt;p&gt;Main limitation&lt;/p&gt;

&lt;p&gt;Does not independently install tools or provide a full analysis engine.&lt;/p&gt;

&lt;p&gt;More setup and interface overhead; results still depend on installed engines and target characteristics.&lt;/p&gt;

&lt;p&gt;The important distinction is not “skill good, MCP bad.” MCP can be useful when an agent needs a stable interface, structured operations, or tools that are not naturally available in a shell. leanrea’s argument is narrower: where the agent already has shell access and the right utilities, an extra wrapper may not always improve the outcome.&lt;/p&gt;

&lt;p&gt;leanrea Benchmark Results: Claimed vs Verified&lt;/p&gt;

&lt;p&gt;The official leanrea repository reports a benchmark using Claude Code in headless mode, with four reverse-engineering tasks, three repetitions per task for each of three setups, and 36 runs in total. The setups were leanrea, REA with its MCP server and skill documentation, and a no-skill baseline. Answers were graded against manually prepared answer keys.&lt;/p&gt;

&lt;p&gt;Metric&lt;/p&gt;

&lt;p&gt;leanrea&lt;/p&gt;

&lt;p&gt;REA&lt;/p&gt;

&lt;p&gt;No skill&lt;/p&gt;

&lt;p&gt;Wall-clock time&lt;/p&gt;

&lt;p&gt;388 seconds&lt;/p&gt;

&lt;p&gt;627 seconds&lt;/p&gt;

&lt;p&gt;479 seconds&lt;/p&gt;

&lt;p&gt;Reported cost&lt;/p&gt;

&lt;p&gt;$2.17&lt;/p&gt;

&lt;p&gt;$3.36&lt;/p&gt;

&lt;p&gt;$2.21&lt;/p&gt;

&lt;p&gt;Agent turns&lt;/p&gt;

&lt;p&gt;55&lt;/p&gt;

&lt;p&gt;124&lt;/p&gt;

&lt;p&gt;81&lt;/p&gt;

&lt;p&gt;Score&lt;/p&gt;

&lt;p&gt;74/75&lt;/p&gt;

&lt;p&gt;75/75&lt;/p&gt;

&lt;p&gt;67/75&lt;/p&gt;

&lt;p&gt;What the numbers suggest&lt;/p&gt;

&lt;p&gt;Compared with REA in this test, leanrea was reported to use about 38% less wall-clock time, 35% lower cost, 56% fewer agent turns, and 60% fewer tokens. It scored 74 out of 75, compared with REA’s 75 out of 75. The no-skill baseline scored 67 out of 75, cost $2.21, and finished in 479 seconds.&lt;/p&gt;

&lt;p&gt;The baseline matters. It suggests that a capable model with ordinary shell access can already complete much of the tested work without either setup. leanrea’s reported gain over the baseline was more modest than its gain over REA on time and turns, and the baseline’s cost was close to leanrea’s. So the benchmark supports a specific claim about efficiency in the tested environment—not the broader claim that every agent needs leanrea.&lt;/p&gt;

&lt;p&gt;What is verified, and what remains unproven?&lt;/p&gt;

&lt;p&gt;Repository-reported: The table above, the task descriptions, the benchmark scripts and the author’s interpretation are published by the leanrea project. They can be inspected and the project provides instructions intended to reproduce the test.&lt;/p&gt;

&lt;p&gt;Not an independent replication: The headline figures should be described as author-reported unless an independent party reproduces the same tasks, versions, environment, model settings, and scoring procedure. Other articles that repeat the same table are not independent validation by themselves.&lt;/p&gt;

&lt;p&gt;Small sample size: Three repetitions per task and setup are useful for an initial comparison, but too few to establish broad performance guarantees across diverse targets and agent configurations.&lt;/p&gt;

&lt;p&gt;Environment-specific: The results depend on the chosen model, machine, operating system, tools installed, target artifacts, and agent configuration. The repository notes that some specialist tools were not installed for the test.&lt;/p&gt;

&lt;p&gt;One score difference: The project says leanrea’s single partial miss involved naming an older version of an IPC channel where two versions existed. This is the author’s explanation of the result, not evidence that all future tasks will have the same accuracy gap.&lt;/p&gt;

&lt;p&gt;The Context-Overhead Claim Needs Qualification&lt;/p&gt;

&lt;p&gt;The repository also describes a separate “reply OK” context-overhead probe. When all REA tool definitions were loaded at once, the project reports a much larger token footprint than the leanrea skill or the no-skill baseline. This illustrates a real architectural risk: large tool catalogues can consume context before useful analysis begins if an agent eagerly loads every definition.&lt;/p&gt;

&lt;p&gt;However, the same project notes that Claude Code’s deferred tool search can load MCP tools on demand. Under that configuration, the overhead is substantially lower. The correct conclusion is therefore conditional: tool-catalogue overhead can be severe in eager-loading setups, but it is not necessarily severe in agents that support selective tool discovery. Avoid repeating the largest context and cost figures without clearly stating the loading configuration and test conditions.&lt;/p&gt;

&lt;p&gt;Installation Guide: How to Try leanrea&lt;/p&gt;

&lt;p&gt;The official repository currently documents installation through the skills CLI. Check the repository before running commands because installation conventions and supported agent targets can change.&lt;/p&gt;

&lt;p&gt;Standard install&lt;/p&gt;

&lt;p&gt;npx skills add aicodeking/leanrea&lt;/p&gt;

&lt;p&gt;Install for Claude Code only, without interactive prompts&lt;/p&gt;

&lt;p&gt;npx skills add aicodeking/leanrea -a claude-code -y&lt;/p&gt;

&lt;p&gt;Install at user level&lt;/p&gt;

&lt;p&gt;npx skills add aicodeking/leanrea -g&lt;/p&gt;

&lt;p&gt;Update later&lt;/p&gt;

&lt;p&gt;npx skills update leanrea&lt;/p&gt;

&lt;p&gt;The installer may ask which agent environments should receive the skill. Review the destination and any proposed changes rather than assuming the installer configured every tool. After installation, open a fresh agent session if the skill does not appear, and verify that the agent recognizes the skill command.&lt;/p&gt;

&lt;p&gt;A manual option documented by the repository is to clone the project and copy its skill directory into the relevant Claude Code skills location. If using a different agent, follow that agent’s current skill-installation documentation.&lt;/p&gt;

&lt;p&gt;Dependencies and Compatibility: What to Check First&lt;/p&gt;

&lt;p&gt;Confirm that your agent supports skills or a comparable project-instructions mechanism, and that it has shell access.&lt;/p&gt;

&lt;p&gt;Check which target-specific utilities are already installed. Examples can include Node.js/ASAR tooling, ripgrep, Apple command-line inspection tools, JADX, apktool, Ghidra, binwalk, tshark, or sqlite3 depending on the artifact.&lt;/p&gt;

&lt;p&gt;Do not assume every listed target type is fully analyzable on every operating system. Some commands are platform-specific, and deeper analysis may require separately installed applications.&lt;/p&gt;

&lt;p&gt;Use a test artifact you are authorized to inspect. Keep the original unchanged and be cautious when running unfamiliar binaries or scripts.&lt;/p&gt;

&lt;p&gt;Inspect the current README and LICENSE in the repository before distributing, modifying, or incorporating the skill into a product.&lt;/p&gt;

&lt;p&gt;Where leanrea May Be a Good Fit&lt;/p&gt;

&lt;p&gt;Quick reconnaissance: You want to identify file formats, dependencies, imports, strings, metadata, or likely entry points without setting up a larger tool integration.&lt;/p&gt;

&lt;p&gt;Electron and bundled JavaScript: You need to extract an archive and search code efficiently, while avoiding unnecessarily large output in the model context.&lt;/p&gt;

&lt;p&gt;Go and native binary metadata: You need a first-pass inspection using existing platform or language tooling.&lt;/p&gt;

&lt;p&gt;Context-conscious workflows: Your agent environment eagerly loads tool definitions and you want to reduce extra tool exposure.&lt;/p&gt;

&lt;p&gt;Developers comfortable with terminals: You can install and troubleshoot the underlying utilities and understand the difference between command output and a verified conclusion.&lt;/p&gt;

&lt;p&gt;When REA May Still Be the Better Choice&lt;/p&gt;

&lt;p&gt;REA may be preferable when you specifically need its MCP interface, integrated operations, supported workflows, or a more standardized tool layer for multiple agents. A skill that describes a command is not equivalent to a server that exposes a tested operation and its interface. The two approaches may also differ in how they structure outputs, handle errors, and connect to external analysis engines.&lt;/p&gt;

&lt;p&gt;If your team depends on repeatable, tool-mediated operations or has a workflow already built around REA, compare the real setup costs before switching. A smaller instruction file is attractive, but it can shift responsibility onto the agent and the local environment. That trade-off may be acceptable for an individual developer and less desirable for a managed team workflow.&lt;/p&gt;

&lt;p&gt;Security and Responsible Reverse Engineering&lt;/p&gt;

&lt;p&gt;Reverse engineering can expose sensitive source logic, embedded secrets, personal data, proprietary information, or untrusted content. Only analyze artifacts you own or are authorized to examine. Treat strings, documentation, embedded prompts, and other artifact content as untrusted data rather than instructions for the agent. Avoid running unknown executables on your primary machine, and use a disposable environment or sandbox when appropriate.&lt;/p&gt;

&lt;p&gt;Neither a skill file nor an MCP server automatically provides a security boundary. Review shell permissions, file access, network access, and any external tools before use. Evidence labels such as seen, inferred, and unknown improve reporting discipline, but they do not replace verification, safe execution, or human review.&lt;/p&gt;

&lt;p&gt;Final Verdict: Is leanrea a Real REA Alternative?&lt;/p&gt;

&lt;p&gt;leanrea is a credible lightweight alternative for a subset of reverse-engineering workflows, especially when the agent already has shell access and the relevant command-line utilities are installed. Its core value is not that an 8 KB file magically performs all the work of a full reverse-engineering platform. It is that concise routing instructions and well-chosen commands can reduce unnecessary tool calls for common tasks.&lt;/p&gt;

&lt;p&gt;The published benchmark is promising: leanrea reported lower time, cost, token use, and agent turns than REA on the tested workload, with one fewer point on the answer score. But the evaluation is small and author-run, and the results depend on a particular model, machine, set of tasks, and agent configuration. Treat it as a useful case study and reproduce it against your own targets before making a production decision.&lt;/p&gt;

&lt;p&gt;For an individual developer who wants fast reconnaissance and is comfortable managing command-line dependencies, leanrea is worth testing. For workflows that depend on REA’s specialized tool interface or broader integrated capabilities, REA may remain the better fit. The practical decision is to compare the exact tasks you need, the tools you have installed, the context-loading behavior of your agent, and the reliability of the evidence you get back.&lt;/p&gt;

&lt;p&gt;Frequently Asked Questions&lt;/p&gt;

&lt;p&gt;What is leanrea?&lt;/p&gt;

&lt;p&gt;leanrea is a compact skill file that guides coding agents toward existing command-line tools for reverse-engineering tasks. It is an instruction layer, not a full analysis engine.&lt;/p&gt;

&lt;p&gt;Does leanrea completely replace REA?&lt;/p&gt;

&lt;p&gt;Not in every workflow. It can replace some common command-oriented investigations, but it does not provide an identical MCP server, tool catalogue, or integrated interface.&lt;/p&gt;

&lt;p&gt;Is leanrea compatible with Claude Code?&lt;/p&gt;

&lt;p&gt;The repository documents installation through the skills CLI, including a Claude Code-specific option. Check the current README for up-to-date agent support.&lt;/p&gt;

&lt;p&gt;Does leanrea install Ghidra or JADX?&lt;/p&gt;

&lt;p&gt;No. The skill does not automatically install every external utility. Target-specific tools must be available separately when needed.&lt;/p&gt;

&lt;p&gt;Are the benchmark results independently verified?&lt;/p&gt;

&lt;p&gt;The published figures are author-reported. The repository provides reproduction material, but the numbers should not be called independently verified unless a separate reproduction is documented.&lt;/p&gt;

&lt;p&gt;Why might leanrea be faster?&lt;/p&gt;

&lt;p&gt;Its approach can reduce wrapper calls and large intermediate outputs by using direct commands and batching related checks. The advantage depends on the target and agent configuration.&lt;/p&gt;

&lt;p&gt;Is REA still useful if an agent supports tool search?&lt;/p&gt;

&lt;p&gt;Yes, potentially. Selective tool loading can reduce the context cost of a large MCP catalogue, so the trade-off should be evaluated in the actual agent environment.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>webdev</category>
      <category>programming</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Earshot: An Open-Source Toolkit That Lets Coding Agents Hear Audio</title>
      <dc:creator>ail akram</dc:creator>
      <pubDate>Tue, 20 Oct 2026 14:46:28 +0000</pubDate>
      <link>https://dev.to/ail_akram_dcc5063c428734b/earshot-an-open-source-toolkit-that-lets-coding-agents-hear-audio-dlk</link>
      <guid>https://dev.to/ail_akram_dcc5063c428734b/earshot-an-open-source-toolkit-that-lets-coding-agents-hear-audio-dlk</guid>
      <description>&lt;p&gt;What Is the Earshot Open-Source Toolkit?&lt;br&gt;
Earshot is a Python toolkit described as "ears for coding agents: let AI hear, review and make sound." It is MIT-licensed, CPU-only, and available as a CLI, a Python API, and an MCP server. It was released publicly in mid-October 2026 by developer Leon Lin (@LexnLin), who introduced it in a thread on X on October 15. The official source is the Earshot GitHub repository.&lt;br&gt;
In practice, Earshot can:&lt;br&gt;
Describe and classify audio with sound labels and measurements.&lt;br&gt;
Match a file against a text description.&lt;br&gt;
Find specific sound events inside longer recordings.&lt;br&gt;
Analyze audio alongside video, including sync to picture cuts.&lt;br&gt;
Evaluate sound design against a profile of professional launch films.&lt;br&gt;
Generate sounds in code (forge) and convert recordings into editable code (fit).&lt;br&gt;
Plug into coding agents such as Claude Code via MCP.&lt;br&gt;
Why Do AI Coding Agents Need Audio Analysis?&lt;br&gt;
Writing audio code is not the same as knowing how it sounds. Without listening, an agent has no feedback loop. Earshot also gives agents something richer than transcripts or file metadata to reason about. Practical cases:&lt;br&gt;
Checking whether a generated keyboard sound feels realistic.&lt;br&gt;
Finding sound effects that match a scene.&lt;br&gt;
Catching timing problems between sound and picture.&lt;br&gt;
Comparing generated sounds with reference recordings.&lt;br&gt;
Improving sound effects through iterative testing.&lt;br&gt;
Key Features of Earshot&lt;br&gt;
Feature&lt;br&gt;
What It Does&lt;br&gt;
Practical Use Case&lt;br&gt;
earshot describe&lt;br&gt;
Describes a file with calibrated tags, AudioSet labels, and measurements&lt;br&gt;
Confirm a generated sound is what you intended&lt;br&gt;
earshot match&lt;br&gt;
Scores how well a text description fits the audio (strong, plausible, weak, no match)&lt;br&gt;
Check that a sound fits "a deep thocky keyboard press"&lt;br&gt;
earshot rank&lt;br&gt;
Sorts many candidate files by a description&lt;br&gt;
Pick the best of several downloaded effects&lt;br&gt;
earshot find&lt;br&gt;
Finds the best matching moments as start and end trims&lt;br&gt;
Extract one clean key press from a long recording&lt;br&gt;
earshot compare / ab&lt;br&gt;
Finds nearest references; compares two sounds in words&lt;br&gt;
See how a generated sound differs from a reference&lt;br&gt;
earshot realness&lt;br&gt;
Estimates real or pro-produced versus code-synthesized&lt;br&gt;
Check whether a sound reads as synthetic&lt;br&gt;
earshot timeline&lt;br&gt;
Listening transcript with events, loudness, beat grid, and sync to cuts&lt;br&gt;
Review a film's audio second by second&lt;br&gt;
earshot sheet&lt;br&gt;
Annotated PNG of events, spectrogram, waveform, and loudness&lt;br&gt;
Give image-reading agents a visual of the audio&lt;br&gt;
earshot critique&lt;br&gt;
Scores a video against a profile of seven professional launch films&lt;br&gt;
Review a product demo's sound design&lt;br&gt;
earshot measure&lt;br&gt;
Model-free measurements: LUFS, true peak, LRA, spectrum, tempo and key&lt;br&gt;
Check loudness before export&lt;br&gt;
earshot forge&lt;br&gt;
Generates sounds from synthesis recipes and improves them through a scoring loop&lt;br&gt;
Build a keypress, whoosh, or UI click in code&lt;br&gt;
earshot fit&lt;br&gt;
Listens to a recording and writes an editable Python recipe that recreates it&lt;br&gt;
Turn a reference sound into tweakable code&lt;br&gt;
earshot gallery&lt;br&gt;
Builds a static HTML gallery of generated sound variations&lt;br&gt;
Audition many forge outputs in a browser&lt;br&gt;
earshot mcp&lt;br&gt;
Exposes the tools as an MCP server&lt;br&gt;
Connect Earshot to Claude Code&lt;br&gt;
earshot doctor&lt;br&gt;
Checks the install, models, and CPU settings&lt;br&gt;
Troubleshoot setup&lt;/p&gt;

&lt;p&gt;Every command prints a plain-language summary first. The --json flag returns the full result and --out f.json saves it.&lt;br&gt;
What's New in Version 0.2.0&lt;br&gt;
The 0.2.0 release (October 16) added earshot fit and Forge v2. According to the release notes, the library of generated effects grew from 5 types (15 sounds) to 34 types (183 sounds) covering motion-design staples: whooshes, risers, impacts, sub drops, logo stings, UI clicks, toggles, pops, dings, shimmers, typing, and glitches. It also added a held-out benchmark, a sharper critic, a faster search, and earshot gallery. The release notes report that on 12 real recordings, fit renders reached a median CLAP similarity of 0.945. That is the developer's own measurement, so treat it as indicative, not as independent proof.&lt;br&gt;
How Earshot Works&lt;br&gt;
You supply an audio file or video.&lt;br&gt;
Earshot analyzes it with machine-learning models plus signal measurements.&lt;br&gt;
It returns evidence: descriptions, scores, timestamps, or a scorecard.&lt;br&gt;
The coding agent acts on that evidence, for example by adjusting a recipe or moving an effect.&lt;br&gt;
The loop repeats until the result improves.&lt;br&gt;
Three components do the analysis:&lt;br&gt;
CLAP audio-text embeddings (laion/larger_clap_general) place audio and text in a shared space, which makes "does this sound match this sentence?" answerable.&lt;br&gt;
The AudioSet classifier (MIT/ast-finetuned-audioset-10-10-0.4593) assigns labels from the AudioSet ontology.&lt;br&gt;
Model-free measurements such as loudness, true peak, envelope, and spectrum do not depend on any model and act as a cross-check.&lt;br&gt;
That cross-check matters because forge optimizes against Earshot's own models. The README warns that a sound can please the models without truly improving (a Goodhart effect), and recommends judging results with model-free measurements, spectrograms next to references, and human listening.&lt;br&gt;
How to Install Earshot&lt;br&gt;
Prerequisites: Python 3.10 or newer, Git, FFmpeg and FFprobe on PATH, and about 1.4 GB of disk space for model downloads.&lt;br&gt;
Step 1: Clone the repository and create a virtual environment.&lt;br&gt;
git clone &lt;a href="https://github.com/Leonxlnx/earshot" rel="noopener noreferrer"&gt;https://github.com/Leonxlnx/earshot&lt;/a&gt; &amp;amp;&amp;amp; cd earshot&lt;br&gt;
python -m venv .venv&lt;br&gt;
Step 2: Install CPU-only PyTorch, then Earshot. README calls the virtual environment's Python directly. On macOS and Linux that is .venv/bin/python; on Windows use .venv/Scripts/python.&lt;br&gt;
.venv/bin/python -m pip install torch --index-url &lt;a href="https://download.pytorch.org/whl/cpu" rel="noopener noreferrer"&gt;https://download.pytorch.org/whl/cpu&lt;/a&gt;&lt;br&gt;
.venv/bin/python -m pip install -e ".[mcp,llm,dev]"&lt;br&gt;
If you prefer to activate the environment, use source .venv/bin/activate on macOS and Linux, or .venv\Scripts\activate on Windows, then run python -m pip. Check the README if a command differs on your system.&lt;br&gt;
Step 3: Run the diagnostic.&lt;br&gt;
.venv/bin/python -m earshot doctor --load&lt;br&gt;
The doctor command checks the install, models, data files, and CPU settings. The first model downloads two open models (about 1.4 GB) into .cache/hf inside the repo, or into EARSHOT_HOME. After that, Earshot works offline. Optional environment variables: EARSHOT_THREADS, EARSHOT_HOME, EARSHOT_PRECISION, and EARSHOT_OFFLINE=1.&lt;br&gt;
Speed note: each CLI call is a new process and loads the models first (the README says roughly 20 to 40 seconds). For more than a few calls, use the MCP server or a single Python script.&lt;br&gt;
How to Use Earshot: Practical Examples&lt;br&gt;
These examples assume the earshot command is available in your environment. Otherwise use python -m earshot with your virtual environment's Python.&lt;br&gt;
Example A: Describe a file&lt;br&gt;
earshot describe sound.wav&lt;br&gt;
Returns what the file sounds like: envelope shape, closest tags, and measurements. Use case: checking that a generated "keyboard click" reads as one.&lt;br&gt;
Example B: Match a description&lt;br&gt;
earshot match sound.wav "a deep mechanical keyboard press"&lt;br&gt;
Returns a verdict from strong to no match, with evidence. Add --alts to compare against competing descriptions. Use case: validating a sound before it goes into a mix.&lt;br&gt;
Example C: Find a sound in a recording&lt;br&gt;
earshot find recording.wav "a single keyboard key press" --top 4&lt;br&gt;
Returns time ranges you can use as trims. Use case: pulling one clean key press from a minute of typing.&lt;br&gt;
Example D: Critique a video&lt;br&gt;
earshot critique film.mp4&lt;br&gt;
Returns a verdict and timestamped fixes ordered by severity. Use case: reviewing a product demo. The scorecard reflects the style of its seven reference films, not every good film.&lt;br&gt;
Example E: Turn a recording into editable code&lt;br&gt;
earshot fit sound.wav -o recipe.py&lt;br&gt;
Writes a readable Python recipe with knobs for new variations. Use case: making ten variants of a click from one reference. Licensing note: a recipe fitted to a recording stays tied to that recording's licence, so do not assume fitted code is free to use commercially.&lt;br&gt;
Example F: Browse generated sounds&lt;br&gt;
earshot gallery output_directory -o gallery.html&lt;br&gt;
Builds a static HTML gallery of sound variations. Use case: auditioning forge outputs side by side. Confirm the exact flags with the earshot gallery --help.&lt;br&gt;
Bonus: generate a sound with forge&lt;br&gt;
earshot forge&lt;br&gt;
earshot forge whoosh --target "a fast crisp air whoosh" --refs path/to/real/whooshes/ --dir made/whoosh&lt;br&gt;
The forge command synthesizes candidates from physical-modeling recipes, scores them with a criterion built from Earshot's own analysis, and keeps the best through an evolutionary search. Output is a set of WAV files plus a report.json with every candidate's parameters and scores.&lt;br&gt;
How to Connect Earshot to Claude Code Using MCP&lt;br&gt;
The Model Context Protocol (MCP) is an open standard that lets AI clients call external tools. Running earshot mcp exposes Earshot's functions to a compatible client such as Claude Code.&lt;br&gt;
claude mcp add earshot --scope user -e EARSHOT_THREADS=3 -- /absolute/path/to/earshot/.venv/bin/python -m earshot mcp&lt;br&gt;
On Windows, point to the virtual environment's Windows interpreter, for example ...\earshot.venv\Scripts\python.exe, rather than copying the Unix path. You can also configure it in a .mcp.json file:&lt;br&gt;
{"mcpServers": {"earshot": {"command": "/path/to/earshot/.venv/bin/python",&lt;br&gt;
  "args": ["-m", "earshot", "mcp"], "env": {"EARSHOT_THREADS": "3"}}}}&lt;br&gt;
Why the absolute path matters: the client launches the server itself, without your virtual environment activated, so the full path guarantees the right interpreter and dependencies.&lt;br&gt;
Verifying the setup: run Claude mcp list, or check /mcp inside Claude Code. Models load on the first call and then stay in memory, which avoids the CLI's per-call startup cost. On slow machines, start Claude Code with MCP_TIMEOUT=60000.&lt;br&gt;
What the agent can do: describe a generated sound, match it to a target, rank candidates, find trims, and re-run after each change. The repository also ships two agent skills (skills/earshot and skills/real-sound) that you can copy into ~/.claude/skills/. The optional llm_critique tool reads GEMINI_API_KEY from the environment; never write a literal key into a file.&lt;br&gt;
Limitations and Alternatives&lt;br&gt;
Limitations:&lt;br&gt;
Brand-new project. Released October 15, 2026, with version 0.2.0 a day later. Expect fast change and rough edges.&lt;br&gt;
Small evidence base. The author's blind test (8 of 15 correct, essentially chance) is one listener and 15 trials, and the README says so. Independent coverage has also noted that the evidence is small.&lt;br&gt;
Models are imperfect. Loudness, timing, sync, and "is this the kind of sound I asked for" on exposed sounds are reliable. Tags inside busy mixes, music genre, and mood are hints only.&lt;br&gt;
Self-scoring bias. Generated sounds are judged by Earshot's own critic, so human review is still needed.&lt;br&gt;
No judgment of taste, emotion, speech content, or licences.&lt;br&gt;
Startup and memory cost. Local models use RAM, and CLI calls have cold starts.&lt;br&gt;
Licensing of fitted code (see Example E).&lt;br&gt;
See the repository's LIMITS.md and VALIDATION.md for details.&lt;br&gt;
Alternatives: FFmpeg covers loudness and format work, librosa covers spectral analysis, and CLAP or AudioSet models can be called directly. Earshot's value is packaging these into an agent-friendly workflow with plain-language output.&lt;br&gt;
Conclusion&lt;br&gt;
The Earshot open-source toolkit gives coding agents a way to hear what they build. Through its CLI, Python API, and Claude Code MCP integration, it can describe sounds, match them to text, locate events, critique video sound design, generate synthetic audio, and convert recordings into editable code, all on a local CPU. It is young, fast-moving, and open about its limits, but for developers building games, films, or demos with AI agents it is a practical place to start. Install it from the Earshot GitHub repository, run doctor --load, and try an earshot described on a file you care about.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>webdev</category>
      <category>programming</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Claude Code allow_large: Read Large Files (2026 Guide)</title>
      <dc:creator>ail akram</dc:creator>
      <pubDate>Sun, 18 Oct 2026 07:01:41 +0000</pubDate>
      <link>https://dev.to/ail_akram_dcc5063c428734b/claude-code-allowlarge-read-large-files-2026-guide-553i</link>
      <guid>https://dev.to/ail_akram_dcc5063c428734b/claude-code-allowlarge-read-large-files-2026-guide-553i</guid>
      <description>&lt;p&gt;Claude Code allow_large: How to Read Large Files&lt;br&gt;
You ask Claude Code to review a big generated file or a long log, and it returns only the top part. Or it tells you to read the file in portions. That is the Read tool's size limits at work. Since Claude Code v2.1.296 (released October 9, 2026), the Read tool has an option built for this case: allow_large.&lt;br&gt;
This guide explains what Claude Code allow_large does, how default file reading works, how to get Claude to use it, and when offset, limit, a search, or a subagent is the better choice. Everything marked as documented comes from Anthropic's official Claude Code documentation and changelog. Third-party reports are labeled as such.&lt;br&gt;
Prefer video? The Hustle to AI channel covers the same topic here: &lt;a href="https://www.youtube.com/watch?v=KrxZ7cRqWNU" rel="noopener noreferrer"&gt;https://www.youtube.com/watch?v=KrxZ7cRqWNU&lt;/a&gt;&lt;br&gt;
What Is allow_large in Claude Code?&lt;br&gt;
allow_large is an optional input on Claude Code's Read tool. The changelog describes it as letting Claude read a text file past the usual size limits in one call when it needs the whole file and the context has room. The official tools reference adds that Claude can read the whole file, or a long line range, in one call by setting allow_large to true. That read is sized against the room left in the session's context window instead of the default limits.&lt;br&gt;
In plain terms: normally one Read call returns a limited amount of a file. With allow_large, Claude can ask for far more in one go, as long as your context window can hold it.&lt;br&gt;
What to know before you rely on it:&lt;br&gt;
Claude sets it, not you. The docs describe Claude setting allow_large: true when it needs to, for example because you asked for the entire file. I found no documented command-line flag or settings key that turns it on.&lt;br&gt;
It needs v2.1.296 or later. Older versions do not have the option.&lt;br&gt;
It applies to text files. Images, PDFs, and notebooks keep their own limits.&lt;br&gt;
The context window is the real ceiling. The documentation does not state a fixed maximum file size for an allow_large read, so a file larger than your remaining context still cannot fit.&lt;br&gt;
How Claude Code Handles Large Files&lt;br&gt;
A file existing on disk does not mean Claude can see all of it in one response. Whatever Read returns goes into the model's context window, which is shared with your conversation, instructions, and earlier tool results. Default limits stop one careless read from filling it.&lt;br&gt;
The documented defaults are:&lt;br&gt;
One Read call returns at most 25,000 tokens by default. The CLAUDE_CODE_FILE_READ_MAX_OUTPUT_TOKENS environment variable can change this value.&lt;br&gt;
A whole-file read of a file over 256 KB is refused.&lt;br&gt;
What Claude receives when a read goes over those defaults depends on how it asked:&lt;br&gt;
Situation&lt;br&gt;
What Claude gets&lt;br&gt;
Whole file over the token limit&lt;br&gt;
The first page of the file, with a PARTIAL view notice saying how much arrived and how to read more with offset and limit&lt;br&gt;
Whole file over 256 KB&lt;br&gt;
An error telling it to read a portion with offset and limit, or search with Grep&lt;br&gt;
An offset or limit read over the token limit&lt;br&gt;
The same kind of error, asking for a smaller range or a search&lt;/p&gt;

&lt;p&gt;The PARTIAL view behavior is why a read can look successful while covering only the start of a file. According to a Claude Code docs issue, that change arrived around v2.1.145. Before it, an oversized whole-file read failed outright with a "file content exceeds maximum allowed tokens" error, which you will still see quoted in older tutorials and issue threads.&lt;br&gt;
Surface differences (third-party report, check before relying on it). A March 2026 GitHub issue reported that the Claude Desktop app capped Read at 10,000 tokens while the command-line version allowed 25,000. The official tools reference does not mention a per-surface difference, so treat this as a user report that may have changed.&lt;br&gt;
A common mix-up. The MAX_MCP_OUTPUT_TOKENS variable controls output from MCP servers only. The same GitHub issue reports that setting it does nothing for the built-in Read tool. For Read, the variable to look at is CLAUDE_CODE_FILE_READ_MAX_OUTPUT_TOKENS.&lt;br&gt;
How to Use Claude Code allow_large&lt;br&gt;
Because Claude decides when to set the parameter, using it means making your intent clear.&lt;br&gt;
Check your version. Run claude --version. You need v2.1.296 or later. Run claude update if you are behind.&lt;br&gt;
Say you need the whole file. A request like this tells Claude that partial reads will not do:&lt;br&gt;
I need the entire file read in one call, nothing omitted:&lt;br&gt;
/path/to/schema.generated.sql&lt;br&gt;
Summarize every table and flag missing foreign keys.&lt;br&gt;
Check what came back. Look for a PARTIAL view notice or a truncation message. If you see one, Claude did not get the whole file.&lt;br&gt;
Mind the context cost. A whole-file read stays in the session. If you only need one function or one error, do not ask for the whole file.&lt;br&gt;
The Read tool's inputs include an absolute file path, the optional offset and limit, and allow_large. A whole-file read looks roughly like this (an illustration of the documented field names, not something you type):&lt;br&gt;
{&lt;br&gt;
  "file_path": "/home/dev/project/schema.generated.sql",&lt;br&gt;
  "allow_large": true&lt;br&gt;
}&lt;br&gt;
Explicit wording matters in practice. A long GitHub issue titled "Need a way to enforce entire file reading" shows users getting partial reads on files as small as a few hundred lines, with a plain "read the entire file" instruction often fixing it and CLAUDE.md instructions described as unreliable. Some commenters suggested patching the minified CLI. That is unsupported and can break on every update, so do not do it. Ask in the prompt, and on v2.1.296 or later let Claude use allow_large.&lt;br&gt;
Evidence From an Independent Test&lt;br&gt;
Classmethod's developer blog published a hands-on test on Claude Code v2.1.296 using a 3,000-line text file of about 204 KB. Without allow_large, Read returned 732 of 3,001 lines and flagged truncation by the token cap. When the prompt said the entire file was needed, Claude set allow_large to true on its own and received all 3,001 lines in one call. The author reported the same behavior on Opus 5.5 and Haiku 5.5. The extra line is the empty line after the final newline.&lt;br&gt;
Two cautions. This is one author's test, not a guarantee. And the file was under the 256 KB limit, so the token cap was what truncated it. The author also saw the full read cost less than the truncated one in that single-turn test, but that comparison should not be generalized to real sessions where the file then sits in context for every later turn.&lt;br&gt;
Practical Examples for Reading Large Files&lt;br&gt;
A large source file you need to review end to end&lt;br&gt;
Read all of src/generated/api_client.py in one call and list every&lt;br&gt;
public class and its methods.&lt;br&gt;
If you only need one class, ask for that section instead.&lt;br&gt;
A specific section of a long file&lt;br&gt;
Read lines 1200-1400 of src/orders/processor.ts and explain the retry logic.&lt;br&gt;
Here offset is the starting line and limit is how many lines to read. This works even when the whole file would exceed the defaults.&lt;br&gt;
A 400 KB log file&lt;br&gt;
A 400 KB log is over the 256 KB whole-file limit and, by the rough four-characters-per-token estimate, around 100,000 tokens. Even with allow_large you rarely want all of that in context. Search first:&lt;br&gt;
Search app.log for "ERROR" and "timeout" and show the 20 lines around&lt;br&gt;
the first three matches.&lt;br&gt;
On macOS, Linux, and WSL the Grep tool is absent by default and Claude searches with grep and finds through Bash instead. Reading through Bash is not a way around limits: Bash returns about 30,000 characters inline by default, then saves longer output to a file and returns a path plus a short preview.&lt;br&gt;
A large configuration file where every key matters&lt;br&gt;
I need the complete config/production.yaml read in full. Compare it with&lt;br&gt;
config/staging.yaml and list every differing key.&lt;br&gt;
This is a reasonable allow_large case if both files fit comfortably in your remaining context.&lt;br&gt;
A long PDF or a big notebook&lt;br&gt;
allow_large does not change PDF or notebook limits. For PDFs longer than 10 pages, Claude reads in ranges using a pages parameter such as "1-5", up to 20 pages at a time. Page-range reads need pdftoppm from poppler-utils installed. A notebook whose cells exceed 256 KB or the token limit returns an error, and the error explains how to read a slice of cells with a shell command.&lt;br&gt;
allow_large vs. offset and limit vs. Search vs. Subagents&lt;br&gt;
Approach&lt;br&gt;
Best for&lt;br&gt;
Trade-off&lt;br&gt;
allow_large&lt;br&gt;
Tasks that truly need the whole file at once&lt;br&gt;
Uses a lot of context; bounded by the context window&lt;br&gt;
offset and limit&lt;br&gt;
A known region, or paging through a big file&lt;br&gt;
More calls; you need to know where to look&lt;br&gt;
Grep or grep via Bash&lt;br&gt;
Finding errors, symbols, or strings&lt;br&gt;
You see matches, not the surrounding structure&lt;br&gt;
Subagent&lt;br&gt;
Heavy reading you do not want in the main conversation&lt;br&gt;
You get a summary, not the raw content&lt;/p&gt;

&lt;p&gt;A simple rule: if you can name what you are looking for, search. If you know where it is, use offset and limit. If the task needs everything and it fits, use allow_large. If the reading is heavy and you only need conclusions, hand it to a subagent, which has its own context window and returns only its final report.&lt;br&gt;
Keep Your Context Healthy After a Big Read&lt;br&gt;
A whole-file read can use a large share of the window. These built-in controls help:&lt;br&gt;
/context shows how much of the context window is in use, so you can check before and after a big read.&lt;br&gt;
/compact summarizes the conversation, optionally with instructions on what to keep. /clear starts fresh when you switch to unrelated work.&lt;br&gt;
autoCompactWindow sets how full the context gets before automatic compaction. It accepts a number of tokens from 100,000 to 1,000,000, or "auto". Since v2.1.288 the /autocompact command saves this per model. v2.1.296 also lets a subagent set its own autoCompactWindow so it compacts earlier than the main conversation.&lt;br&gt;
Read deny rules in settings.json keep Claude out of paths it should never open. A deny rule such as Read(./secrets/**) blocks reads entirely, and per the permissions docs it also blocks Edit and Write on that path, so use it only for files Claude should not touch.&lt;br&gt;
One third-party guide suggests running /compact when usage reaches about 70 percent. Treat that as a rule of thumb, not an official threshold.&lt;br&gt;
Community Tools for Very Large Files&lt;br&gt;
allow_large helps when the file fits in context. For multi-gigabyte logs or datasets it will not, and some developers use MCP servers that read in chunks and search without loading everything. Examples include Large File MCP, whose author describes tools for chunked reading, regex search, and streaming, and pdf-mcp, which reads large PDFs incrementally by searching first and reading only the relevant pages. These are third-party projects, and their performance claims come from their authors. Review any MCP server before installing it, since it runs with access to your files.&lt;br&gt;
Claude Code Limits vs. Claude Chat Limits&lt;br&gt;
People often mix these up. The Read tool limits above apply inside Claude Code. The claude.ai chat has separate upload limits. A third-party summary of Anthropic's help center, dated October 2026, lists up to 20 files per chat, 500 MB per file, and PDFs up to 1,000 pages. Those figures change, so check Anthropic's help center. If you see a "message exceeds the length limit for this chat" error, that is the chat, not the Read tool, and allow_large will not fix it.&lt;br&gt;
Troubleshooting&lt;br&gt;
Claude only seems to have seen the top of the file. Look for a PARTIAL view notice. Ask Claude to continue with offset and limit, or say plainly that you need the whole file.&lt;br&gt;
"Read a portion" or "search instead" errors. Your read exceeded a default limit. Use offset and limit with a smaller range, or on v2.1.296 or later ask for the whole file.&lt;br&gt;
allow_large does not seem to exist. Run claude --version and update if it is below v2.1.296.&lt;br&gt;
Claude will not use allow_large. It is Claude's decision. State that you need the entire file and accept the context cost. If the file is larger than your remaining context, ranges or search are the right call anyway.&lt;br&gt;
Edits fail after a partial read. A read cut short by a PARTIAL view notice does not count for the read-before-edit rule on older models. Have Claude read the relevant part fully, then edit.&lt;br&gt;
Garbled characters or refused edits. Edit and NotebookEdit refuse files that are not valid UTF-8, such as Shift-JIS or Windows-1252 text. This is separate from file size. The docs recommend a shell command that preserves the encoding, or converting the file to UTF-8 first.&lt;br&gt;
Raising the limit did not help. MAX_MCP_OUTPUT_TOKENS affects MCP output only. Use CLAUDE_CODE_FILE_READ_MAX_OUTPUT_TOKENS for the Read tool.&lt;br&gt;
Frequently Asked Questions&lt;br&gt;
What does allow_large do in Claude Code? &lt;br&gt;
It lets the Read tool return a whole text file, or a long line range, in one call beyond the default limits, sized against your remaining context window.&lt;br&gt;
Which version added it? &lt;br&gt;
Claude Code v2.1.296 or later.&lt;br&gt;
Can I turn it on with a flag or setting?&lt;br&gt;
 I found no documented flag or setting. The docs describe Claude setting it when needed, for example when you ask for the entire file.&lt;br&gt;
What are the default Read limits? &lt;br&gt;
25,000 tokens per call by default, adjustable with CLAUDE_CODE_FILE_READ_MAX_OUTPUT_TOKENS, and whole-file reads over 256 KB are refused.&lt;br&gt;
Does it work on PDFs, images, or notebooks?&lt;br&gt;
 No. Those keep their own limits.&lt;br&gt;
Is there a maximum file size with allow_large? &lt;br&gt;
The official docs I reviewed do not give one. The practical limit is your context window.&lt;br&gt;
Is it better than offset and limit? &lt;br&gt;
Only when the task needs the whole file at once. For a known region or a specific error, offset, limit, or search costs less context.&lt;br&gt;
Conclusion&lt;br&gt;
allow_large solves a specific problem: Claude needs an entire text file and the default limits get in the way. It is useful, but it is not magic. It needs Claude Code v2.1.296 or later, applies only to text files, and is bound by your context window. For most debugging, offset, limit, and targeted search still cost less. Match the method to the task and you will spend less context and get better answers.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fepif3b9tyeojkfcs6o32.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fepif3b9tyeojkfcs6o32.jpg" alt=" " width="800" height="420"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>webdev</category>
      <category>programming</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Claude Code Plugin Marketplace: How to Install Plugins</title>
      <dc:creator>ail akram</dc:creator>
      <pubDate>Thu, 15 Oct 2026 06:22:16 +0000</pubDate>
      <link>https://dev.to/ail_akram_dcc5063c428734b/claude-code-plugin-marketplace-how-to-install-plugins-272d</link>
      <guid>https://dev.to/ail_akram_dcc5063c428734b/claude-code-plugin-marketplace-how-to-install-plugins-272d</guid>
      <description>&lt;p&gt;Plugins add skills, agents, hooks, and MCP servers to Claude Code without you building any of them. The Claude Code plugin marketplace is where you find them. The confusing part is that "marketplace" and "plugin" are two different things: a marketplace is a catalog, and each plugin in it is a separate item. Install commands also behave differently inside a session than in your terminal, and they change depending on where the plugin comes from.&lt;br&gt;
This guide shows how to find plugins, install them with the right scope, add a custom marketplace, use the --marketplace option, verify the result, manage plugins afterwards, and fix the errors people hit most.&lt;br&gt;
What Is the Claude Code Plugin Marketplace?&lt;br&gt;
A plugin is a package that extends Claude Code. It can contain skills, agents, hooks, and MCP servers. A marketplace is a catalog that lists plugins and tells Claude Code where to fetch them. Claude Code has to know about a marketplace before you can install anything from it.&lt;br&gt;
You will meet three kinds of marketplace:&lt;br&gt;
The official marketplace, named claude-plugins-official. Anthropic maintains it, and Claude Code registers it automatically the first time you start an interactive terminal session.&lt;br&gt;
Anthropic's community marketplace, which you add yourself. Its registered name is claude-community, even though its repository is called claude-plugins-community.&lt;br&gt;
Custom marketplaces, which anyone can publish in a Git repository, at a URL, or in a local folder.&lt;br&gt;
A marketplace name only tells you who publishes the catalog. It does not tell you what each plugin does, so review plugins from every marketplace before installing.&lt;br&gt;
Before You Install a Claude Code Plugin&lt;br&gt;
Claude Code installed and launched. Follow Anthropic's official setup instructions for your platform, then run claude in your project folder.&lt;br&gt;
Your version number. Some flags depend on the version. Check yours from your terminal:&lt;br&gt;
claude --version&lt;br&gt;
Terminal commands versus session commands. This is the most common source of confusion.&lt;br&gt;
/plugin ... is a slash command you type inside a running Claude Code session. Typed at a normal shell prompt, it fails with an error such as zsh: no such file or directory: /plugin.&lt;br&gt;
claude plugin ... is a shell command you run in your terminal, with no session needed. claude plugins works as an alias.&lt;br&gt;
In non-interactive runs such as claude -p, /plugin is not available, so use the claude plugin shell commands there.&lt;br&gt;
A trust check. A plugin you install can execute code on your machine with your user privileges. Read its details before you confirm (more in the security section).&lt;br&gt;
How to Find Plugins in the Official Marketplace&lt;br&gt;
Start Claude Code with Claude.&lt;br&gt;
Type /plugin. The panel opens on the Discover tab, which lists plugins from all your marketplaces.&lt;br&gt;
Type to search, then press Enter on a plugin to open its details.&lt;br&gt;
The details pane is where you decide whether a plugin fits your workflow. It shows the description and can also show:&lt;br&gt;
Will install: the commands, agents, skills, hooks, and MCP and LSP servers the plugin adds.&lt;br&gt;
Last updated: shown for plugins in the official marketplace.&lt;br&gt;
Context cost: for official-marketplace plugins, estimates of the tokens the plugin adds to every turn and when its skills or agents are invoked. This appears when you open the plugin by naming its marketplace or from the Marketplaces tab, but not from the Discover list.&lt;br&gt;
Plugins from custom marketplaces may show "Components will be discovered at installation" instead, so you cannot always preview their contents.&lt;br&gt;
If Discover is empty, or you see "No marketplaces configured," the official marketplace is not registered yet. Add it with:&lt;br&gt;
/plugin marketplace add anthropics/claude-plugins-official&lt;br&gt;
Other places to look: plugins you turn on in your claude.ai account can sync into Claude Code and appear with the @synced suffix.&lt;br&gt;
How to Install a Claude Code Plugin&lt;br&gt;
The command follows one pattern:&lt;br&gt;
/plugin install @&lt;br&gt;
/plugin install is the session command.&lt;br&gt;
 is the plugin's name in the catalog.&lt;br&gt;
@ says which catalog it comes from. This is the marketplace's registered name, not its repository or URL.&lt;br&gt;
Here is an example from the official marketplace. It installs commit-commands, which adds commands for committing, pushing, and opening pull requests. Run it inside a Claude Code session:&lt;br&gt;
/plugin install commit-commands@claude-plugins-official&lt;br&gt;
In a session this does not install immediately. It opens the plugin's details so you can review it and choose a scope. After you pick one, Claude Code installs the plugin and any dependencies it declares, then prints a summary.&lt;br&gt;
Choosing an Installation Scope&lt;br&gt;
Scope&lt;br&gt;
Menu option&lt;br&gt;
Who gets it&lt;br&gt;
Recorded in&lt;br&gt;
User&lt;br&gt;
Install for you&lt;br&gt;
You, in every project on this machine&lt;br&gt;
~/.claude/settings.json&lt;br&gt;
Project&lt;br&gt;
Install for all collaborators on this repository&lt;br&gt;
Everyone who works in this repository&lt;br&gt;
.claude/settings.json (you commit it)&lt;br&gt;
Local&lt;br&gt;
Install for you, in this repo only&lt;br&gt;
You, in this repository only&lt;br&gt;
.claude/settings.local.json&lt;/p&gt;

&lt;p&gt;If the same plugin is set at several scopes, local overrides project, and project overrides user.&lt;br&gt;
Project scope has a catch. Committing the settings entry enables the plugin for collaborators but does not download it to their machines. Each collaborator runs this once:&lt;br&gt;
claude plugin install @ --scope project&lt;br&gt;
Installing from Your Terminal Instead&lt;br&gt;
claude plugin install commit-commands@claude-plugins-official --scope project&lt;br&gt;
Without --scope, the shell command installs at user scope. Valid values are user, project, and local. On success it prints Successfully installed plugin: commit-commands@claude-plugins-official (scope: project).&lt;br&gt;
One caveat: on a machine where nobody has opened an interactive session yet, the official marketplace is not registered, because shell commands never register it. Run claude plugin marketplace add anthropics/claude-plugins-official first.&lt;br&gt;
How to Install a Plugin from a Custom Marketplace&lt;br&gt;
Many plugins are not in the official marketplace. A coworker's plugin or an open-source project's plugin lives in its own catalog. Claude Code has no global index to look marketplace names up in, so an install line like name@some-marketplace will not work until you have added that marketplace.&lt;br&gt;
The values below are placeholders (your-org/plugins, deploy-helper). They do not refer to a real marketplace or plugin, so replace them with your own.&lt;br&gt;
Add the marketplace (in a session):&lt;br&gt;
/plugin marketplace add your-org/pluginsThe source can be a GitHub owner/repo (add #ref to pin a branch or tag), a full git URL, a local path starting with ./ or ../, or an https:// link to a hosted marketplace.json. Include the https:// prefix on URLs: a bare gitlab.example.com/group/repo is read as GitHub shorthand and fails.&lt;br&gt;
Identify the marketplace name. The success message reads Successfully added marketplace: . That name comes from the marketplace's own manifest and may differ from the repository name. You can also list names:&lt;br&gt;
/plugin marketplace list&lt;br&gt;
Install the plugin using that registered name:&lt;br&gt;
/plugin install deploy-helper@&lt;br&gt;
Confirm the scope in the details pane.&lt;br&gt;
Verify that the plugin is available (see the verification section).&lt;br&gt;
The new marketplace appears on the Discover tab the next time you open /plugin, with no reload needed. Auto-update is off by default for community and third-party marketplaces, so refresh them yourself with /plugin marketplace update .&lt;br&gt;
How to Use the Claude Code --marketplace Option&lt;br&gt;
The --marketplace option combines two steps: it registers a marketplace you have not added yet and starts the plugin install. You pass the marketplace source, and you give the plugin name by itself, with no &lt;a class="mentioned-user" href="https://dev.to/marketplace"&gt;@marketplace&lt;/a&gt; suffix.&lt;br&gt;
In a session (requires Claude Code v2.1.275 or later):&lt;br&gt;
/plugin install deploy-helper --marketplace your-org/plugins&lt;br&gt;
Claude Code shows the source it resolved and asks you to confirm before adding the marketplace. Then the plugin's details open and you choose a scope. If the source matches a marketplace you have already added, it skips the confirmation. In a session, the source cannot contain spaces.&lt;br&gt;
From your shell (requires Claude Code v2.1.292 or later):&lt;br&gt;
claude plugin install deploy-helper --marketplace your-org/plugins&lt;br&gt;
The shell version adds the marketplace without a confirmation step, so be sure of the source before you run it. A new marketplace added this way is declared in your user settings even if you pass --scope project. A marketplace you already added from the same source is reused.&lt;br&gt;
The two forms have different minimum versions, so do not assume one number covers both. Run claude plugin install --help to confirm your build supports the flag.&lt;br&gt;
Source versus name. In --marketplace your-org/plugins, the value is a source: where to fetch the catalog. In deploy-helper@marketplace-name, the part after the @ is the registered name: what the catalog calls itself. They often differ.&lt;br&gt;
Two limitations to know about:&lt;br&gt;
/plugin install your-org/plugins (a source with no plugin name and no --marketplace) installs nothing and reports a "marketplace not found" error.&lt;br&gt;
If the catalog at your source has the same name as a marketplace you already added from a different source, Claude Code keeps the existing one and installs nothing. Remove the old marketplace first if you want the new source.&lt;br&gt;
Claude Code Plugin Installation Examples&lt;br&gt;
Replace the placeholders in angle brackets with your own values.&lt;br&gt;
Goal&lt;br&gt;
Command&lt;br&gt;
Where to run it&lt;br&gt;
Browse plugins&lt;br&gt;
/plugin&lt;br&gt;
Claude Code session&lt;br&gt;
Install from a registered marketplace&lt;br&gt;
/plugin install @&lt;br&gt;
Claude Code session&lt;br&gt;
Install at project scope from the terminal&lt;br&gt;
claude plugin install @ --scope project&lt;br&gt;
System shell&lt;br&gt;
Add a marketplace&lt;br&gt;
/plugin marketplace add &lt;br&gt;
Claude Code session&lt;br&gt;
Add a marketplace from the terminal&lt;br&gt;
claude plugin marketplace add &lt;br&gt;
System shell&lt;br&gt;
Add a marketplace and install in one step&lt;br&gt;
/plugin install  --marketplace  (v2.1.275+)&lt;br&gt;
Claude Code session&lt;br&gt;
Same, from the terminal&lt;br&gt;
claude plugin install  --marketplace  (v2.1.292+)&lt;br&gt;
System shell&lt;br&gt;
List registered marketplaces&lt;br&gt;
/plugin marketplace list&lt;br&gt;
Claude Code session&lt;br&gt;
Refresh a marketplace listing&lt;br&gt;
/plugin marketplace update &lt;br&gt;
Claude Code session&lt;br&gt;
List installed plugins&lt;br&gt;
/plugin list (v2.1.163+)&lt;br&gt;
Claude Code session&lt;br&gt;
List installed plugins with status&lt;br&gt;
claude plugin list&lt;br&gt;
System shell&lt;br&gt;
Apply pending plugin changes&lt;br&gt;
/reload-plugins&lt;br&gt;
Claude Code session&lt;/p&gt;

&lt;p&gt;How to Verify That a Plugin Is Installed&lt;br&gt;
Start with the install summary. Its last sentence tells you the plugin's state:&lt;br&gt;
"Plugin is now active." No reload is needed.&lt;br&gt;
"Run /reload-plugins to apply." Claude Code runs the reload for you when the panel closes. If the reload would invalidate the prompt cache, it warns and leaves the plugin pending. Run /reload-plugins --force to activate it anyway, which costs one uncached request.&lt;br&gt;
"The plugin couldn't be loaded." Open the Errors tab in /plugin for the reason.&lt;br&gt;
Active, but a bundled MCP server needs configuration. Open the plugin on the Installed tab and choose Configure.&lt;br&gt;
So not every plugin needs a reload. The summary tells you. Plugins installed from your shell load the next time you start Claude Code, or when you run /reload-plugins in an open session.&lt;br&gt;
Then confirm the plugin in any of these ways:&lt;br&gt;
Type / and look for the plugin's skills in the form /:. For commit-commands, that is /commit-commands:commit. The namespace prevents two plugins from colliding on similar command names.&lt;br&gt;
Open the Installed tab in /plugin, which lists each plugin with its scope.&lt;br&gt;
Run claude plugin list in your shell. It prints Version, Scope, and Status for each plugin.&lt;br&gt;
How to Manage Plugins After Installing&lt;br&gt;
Disable or enable: On the Installed tab, press Space on a plugin. From your shell, use claude plugin disable @ or claude plugin enable @.&lt;br&gt;
Uninstall: Use /plugin uninstall  in a session, or claude plugin uninstall @ --scope project in your shell. If the project's shared settings enable the plugin, Claude Code asks whether to disable it only for you or uninstall it for everyone.&lt;br&gt;
Update: Run claude plugin update @. No single command updates every plugin. To update everything from one marketplace, open the Marketplaces tab in /plugin, select it, and choose Update marketplace. A running session keeps the versions it already loaded, so run /reload-plugins or start a new session.&lt;br&gt;
Remove a marketplace: This also uninstalls every plugin you installed from it. To refresh a marketplace without losing its plugins, use update instead of remove.&lt;br&gt;
Check the cost: Run claude plugin details  in your shell. The Always-on line shows how many tokens the plugin adds to every session.&lt;br&gt;
Common Claude Code Plugin Marketplace Errors and Fixes&lt;br&gt;
These come from Anthropic's troubleshooting guidance. Exact messages vary by version, so treat the fixes as starting points rather than guarantees.&lt;br&gt;
Problem: Marketplace "claude-plugins-official" not found, or the same message for another marketplace name.&lt;br&gt;
Likely cause: The marketplace is not registered on this machine. For the official one, that happens if you have only used the VS Code extension, or if a policy or environment setting blocks auto-registration. For other names, the install line you received does not say where the marketplace is hosted.&lt;br&gt;
Fix: Run /plugin marketplace add anthropics/claude-plugins-official for the official marketplace. For any other, ask whoever sent the line for the marketplace's source, add it with /plugin marketplace add , and rerun the install. If you already added it, compare the spelling against /plugin marketplace list.&lt;br&gt;
Problem: Plugin "" not found in marketplace "".&lt;br&gt;
Likely cause: A misspelled plugin name, or a local copy of the catalog that is out of date.&lt;br&gt;
Fix: Copy the name from the Discover tab. If the message includes a refresh hint, run /plugin marketplace update  and install again.&lt;br&gt;
Problem: Invalid marketplace source format.&lt;br&gt;
Likely cause: The source is not in an accepted form. A bare name such as claude-plugins-official or a bare hostname does not qualify.&lt;br&gt;
Fix: Use owner/repo, a full https:// URL, user@host:path, or a path beginning with ./, ../, /, or ~.&lt;br&gt;
Problem: SSH authentication failed or HTTPS authentication failed when adding or updating a marketplace.&lt;br&gt;
Likely cause: Claude Code runs git with interactive prompts disabled, so only credentials that already work non-interactively succeed. A misspelled repository or one you cannot see can produce the same message.&lt;br&gt;
Fix: Run git ls-remote  in your terminal to confirm the repository exists and you have access. For SSH, ssh -T git@ must succeed without a passphrase prompt. For GitHub over HTTPS, run gh auth login and gh auth setup-git. Retry once git ls-remote works without prompting.&lt;br&gt;
Problem: The plugin appears installed but does not work.&lt;br&gt;
Likely cause: It may need a reload, may have load errors, may be disabled, or may not contain what you expected.&lt;br&gt;
Fix: Open /plugin, check Installed for enabled status, and read the Errors tab. Run /reload-plugins if you installed during this session. Check the plugin's details pane to see what it actually adds.&lt;br&gt;
Problem: A code intelligence (language server) plugin is installed, but the Errors tab shows Executable not found in $PATH.&lt;br&gt;
Likely cause: These plugins connect to a language server binary that you install separately. The plugin alone is not enough.&lt;br&gt;
Fix: Install the language server binary, confirm it is on the PATH of the terminal you start claude from (for example with which typescript-language-server), then start a new session.&lt;br&gt;
Problem: error: unknown command 'add', unknown option '--project', or Unknown command: /install.&lt;br&gt;
Likely cause: Those spellings do not exist. Some older tutorials still use them.&lt;br&gt;
Fix: Use claude plugin marketplace add  to add a marketplace, claude plugin install @ to install, --scope project instead of --project, and /plugin install ... instead of /install. A rejected --marketplace flag usually means your Claude Code version is older than the minimum above, so update Claude Code.&lt;br&gt;
Problem: A plugin is "enabled in project settings but isn't installed here," or you are unsure which scope applies.&lt;br&gt;
Likely cause: A repository's settings can enable a plugin for everyone, but they do not download it. Separately, when a plugin is set at several scopes, the most specific one wins.&lt;br&gt;
Fix: Run claude plugin install @ --scope project, then /reload-plugins. Run claude plugin list to see each plugin's scope.&lt;br&gt;
Plugin Security and Best Practices&lt;br&gt;
Anthropic's documentation states that an installed plugin can execute arbitrary code on your machine with your user privileges. That is a reason for a quick review habit, not for alarm.&lt;br&gt;
Check source and maintainer. A marketplace name tells you who publishes the catalog, not what every plugin in it does. Prefer plugins from maintainers you recognize.&lt;br&gt;
Read "Will install" before you confirm. Hooks and MCP servers deserve the closest look. Hooks run commands in response to events, and MCP servers give Claude access to external tools and data. Their processes are separate from Claude's own tool calls, so a plugin's description is not a substitute for reading its hook and MCP configuration.&lt;br&gt;
Be careful with unfamiliar repositories. This applies to --marketplace especially, because the shell form adds the marketplace without asking.&lt;br&gt;
Remember that updates can change what you reviewed. When auto-update is on for a marketplace, Claude Code updates its plugins in the background. It is on by default for the official marketplace and off by default for third-party ones. For a third-party plugin you audited carefully, leave auto-update off and update by hand.&lt;br&gt;
Agree on project-level plugins as a team. Project scope puts the plugin in a committed settings file, so everyone gets the same setup. Decide together what goes there, and keep personal experiments at user or local scope.&lt;br&gt;
To remove a plugin you no longer trust, uninstall it. If you do not trust the marketplace either, remove the marketplace too.&lt;br&gt;
Frequently Asked Questions&lt;br&gt;
What is the Claude Code plugin marketplace?&lt;br&gt;
A catalog of plugins that Claude Code can install from. The official one is claude-plugins-official, and you can add others from Git repositories, URLs, or local paths.&lt;br&gt;
How do I install a Claude Code plugin?&lt;br&gt;
Run /plugin install @ in a session, choose a scope, and read the install summary. From your shell, use claude plugin install @.&lt;br&gt;
How do I install a plugin from a custom marketplace?&lt;br&gt;
Add the marketplace with /plugin marketplace add , then install with the registered marketplace name. Or use --marketplace to do both at once.&lt;br&gt;
What does the Claude Code --marketplace option do?&lt;br&gt;
It registers a marketplace you have not added and starts the plugin install in one command. It requires v2.1.275 or later in a session and v2.1.292 or later from the shell.&lt;br&gt;
Do I need to add the official marketplace manually?&lt;br&gt;
Usually not. Claude Code registers it on your first interactive terminal session. You may need to add it yourself if you have only used the VS Code extension, if a policy blocks auto-registration, or on a fresh machine where you install from the shell.&lt;br&gt;
How do I list installed Claude Code plugins?&lt;br&gt;
Use /plugin list in a session (v2.1.163 or later), open the Installed tab in /plugin, or run claude plugin list in your shell.&lt;br&gt;
Why is my plugin not appearing after installation?&lt;br&gt;
Check the Installed and Errors tabs in /plugin, and run /reload-plugins if you installed during this session. Open the plugin's details to confirm what it provides.&lt;br&gt;
Can I share a plugin installation with my team?&lt;br&gt;
Yes, with project scope. It records the plugin in .claude/settings.json, which you commit. Collaborators still run claude plugin install @ --scope project once to download it.&lt;br&gt;
How do I update Claude Code plugins?&lt;br&gt;
Run claude plugin update @, or use Update marketplace on the Marketplaces tab. No single command updates every plugin.&lt;br&gt;
How do I uninstall a plugin?&lt;br&gt;
Use /plugin uninstall  in a session, or claude plugin uninstall @ in your shell. Add --scope to target one scope.&lt;br&gt;
Conclusion&lt;br&gt;
The simplest workflow is short. Open Claude Code, run /plugin to browse the Claude Code plugin marketplace, review the plugin's details, and install it with /plugin install @. If the plugin lives in another marketplace, add that marketplace first, or use --marketplace to combine both steps. Before you confirm any install, check who published the plugin and choose the scope that matches who should have it.&lt;br&gt;
Want more practical Claude Code walkthroughs? Keep exploring the guides on HustleToAI.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>cloudskills</category>
      <category>devchallenge</category>
    </item>
    <item>
      <title>Claude Code Read Large Files: Limits &amp; allow_large</title>
      <dc:creator>ail akram</dc:creator>
      <pubDate>Wed, 14 Oct 2026 09:40:03 +0000</pubDate>
      <link>https://dev.to/ail_akram_dcc5063c428734b/claude-code-read-large-files-limits-allowlarge-14l8</link>
      <guid>https://dev.to/ail_akram_dcc5063c428734b/claude-code-read-large-files-limits-allowlarge-14l8</guid>
      <description>&lt;p&gt;Claude Code Dynamic Workflows: Practical Guide&lt;/p&gt;

&lt;p&gt;Most AI coding sessions follow one pattern: you ask, the assistant works, you review, you ask again. That pattern is fine for a bug fix. It breaks down on a migration that touches hundreds of files or an audit of an entire service. The context window fills up, the original instructions get compressed away, and you end up acting as the project manager.&lt;/p&gt;

&lt;p&gt;Claude Code dynamic workflows are Anthropic's answer to that problem. This guide explains what they are, how they work, how they differ from subagents, skills, hooks and agent teams, and how to use them on large coding tasks without wasting usage. Every feature, command and limit below was checked against Anthropic's official documentation and announcement. Claims from community articles are labeled as community sources.&lt;/p&gt;

&lt;p&gt;Dune: Part Three: Full HD&lt;br&gt;
We have 117 new singles for you&lt;br&gt;
Hey Honey! Wanna Date?&lt;br&gt;
Find a girl! 100% Free website!&lt;br&gt;
Why static coding workflows struggle with complex tasks&lt;br&gt;
A single chat session is one fixed loop: Claude reads, decides, acts, and keeps every intermediate result in one context window. Community analyses of Claude Code workflows describe three recurring failure modes when that single window carries a big job:&lt;/p&gt;

&lt;p&gt;Agentic laziness. On a long, multi-part task, Claude reviews part of the list and then reports that the job is done. A security review that covers 35 of 50 files is the usual example.&lt;/p&gt;

&lt;p&gt;Self-preferential bias. When Claude grades its own output inside the same conversation, it tends to rate it generously.&lt;/p&gt;

&lt;p&gt;Goal drift. Over many turns, and especially after context compaction, details such as "do not touch the auth module" can fade.&lt;/p&gt;

&lt;p&gt;Anthropic's own best-practices guide points at the same root cause: the context window fills quickly, and performance degrades as it fills. Dynamic workflows attack the problem structurally, by moving the plan out of the conversation and into a script.&lt;/p&gt;

&lt;p&gt;What are Claude Code dynamic workflows?&lt;br&gt;
Dynamic workflows are an official, named Claude Code feature, not just a design idea. According to the official documentation, a dynamic workflow is a JavaScript script that orchestrates many subagents at once. Claude writes the script for the task you describe, and a runtime executes it in the background while your session stays responsive.&lt;/p&gt;

&lt;p&gt;Key facts, all from Anthropic's announcement and docs:&lt;/p&gt;

&lt;p&gt;Announced May 28, 2026. The announcement now carries an update saying dynamic workflows are generally available, so older articles that call them a research preview are out of date.&lt;/p&gt;

&lt;p&gt;Available in the Claude Code CLI, Desktop app and VS Code extension, and on the Claude API, Amazon Bedrock, Vertex AI and Microsoft Foundry. The docs say they are available on all paid plans. They are on by default for Max, Team and Enterprise, and Pro users turn them on from the Dynamic workflows row in /config.&lt;/p&gt;

&lt;p&gt;Anthropic says they consume meaningfully more usage than a typical session, so it recommends starting with a scoped task. The first time a workflow triggers, Claude Code shows what is about to run and asks you to confirm. Organization admins can disable workflows through managed settings.&lt;/p&gt;

&lt;p&gt;Community sources report that the feature arrived in v2.1.154 and that the original trigger keyword workflow was renamed ultracode in v2.1.160. Check claude --version and the changelog if you are on an older build.&lt;/p&gt;

&lt;p&gt;The word "dynamic" has two meanings here. Claude writes the orchestration fresh for each task, instead of you wiring a fixed pipeline. And the script itself can adapt at runtime: it can branch on results, retry, or loop until a condition is met.&lt;/p&gt;

&lt;p&gt;How Claude Code dynamic workflows work&lt;br&gt;
The central idea is who holds the plan. In a normal session, Claude is the orchestrator and decides turn by turn what to do next, and every result lands in its context window. In a workflow, the script holds the loop, the branching and the intermediate results in variables, so Claude's context holds only the final answer.&lt;/p&gt;

&lt;p&gt;The lifecycle of a run:&lt;/p&gt;

&lt;p&gt;Trigger. You ask for a workflow in plain words, include the keyword ultracode in your prompt, or turn on ultracode for the session.&lt;/p&gt;

&lt;p&gt;Script generation. Claude writes a JavaScript orchestration script for the task.&lt;/p&gt;

&lt;p&gt;Approval. Claude Code shows the planned phases. You can read the raw script before approving.&lt;/p&gt;

&lt;p&gt;Background execution. Agents run while you keep working. Run /workflows to watch progress.&lt;/p&gt;

&lt;p&gt;Verification and iteration. Depending on how the script is written, agents cross-check each other, retry, or loop.&lt;/p&gt;

&lt;p&gt;Report. You receive one consolidated result.&lt;/p&gt;

&lt;p&gt;Three practical consequences follow. First, every run writes its script to a file under ~/.claude/projects/, so you can read, diff or edit the orchestration. Second, progress is saved as the run goes, so an interrupted run can pick up where it stopped. Third, community sources point out that the script itself costs no model tokens, since it is ordinary code; all token cost comes from the agents it spawns. A product manager who measured a run on 100 synthetic interview transcripts reported 113 agents, about 1.95 million tokens and 12.5 minutes. Treat that as one data point from a non-coding task, not a benchmark.&lt;/p&gt;

&lt;p&gt;Core Claude Code features that enable adaptive workflows&lt;br&gt;
Dynamic workflows sit alongside several other features. They are not interchangeable. The official documentation compares subagents, skills, agent teams and workflows by who decides what runs next:&lt;/p&gt;

&lt;p&gt;Feature&lt;/p&gt;

&lt;p&gt;What it is&lt;/p&gt;

&lt;p&gt;Who decides what runs next&lt;/p&gt;

&lt;p&gt;Scale&lt;/p&gt;

&lt;p&gt;CLAUDE.md&lt;/p&gt;

&lt;p&gt;Persistent project instructions read every session&lt;/p&gt;

&lt;p&gt;Not applicable (context, not control flow)&lt;/p&gt;

&lt;p&gt;Not applicable&lt;/p&gt;

&lt;p&gt;Skills&lt;/p&gt;

&lt;p&gt;Instructions Claude follows, loaded when relevant&lt;/p&gt;

&lt;p&gt;Claude, following the prompt&lt;/p&gt;

&lt;p&gt;Same as subagents&lt;/p&gt;

&lt;p&gt;Hooks&lt;/p&gt;

&lt;p&gt;Shell commands that fire at lifecycle events&lt;/p&gt;

&lt;p&gt;The event, deterministically&lt;/p&gt;

&lt;p&gt;Per tool call&lt;/p&gt;

&lt;p&gt;Subagents&lt;/p&gt;

&lt;p&gt;A worker Claude spawns&lt;/p&gt;

&lt;p&gt;Claude, turn by turn&lt;/p&gt;

&lt;p&gt;A few delegated tasks per turn&lt;/p&gt;

&lt;p&gt;Agent teams (experimental)&lt;/p&gt;

&lt;p&gt;A lead agent supervising peer sessions&lt;/p&gt;

&lt;p&gt;The lead agent, turn by turn&lt;/p&gt;

&lt;p&gt;A handful of long-running peers&lt;/p&gt;

&lt;p&gt;Dynamic workflows&lt;/p&gt;

&lt;p&gt;A script the runtime executes&lt;/p&gt;

&lt;p&gt;The script&lt;/p&gt;

&lt;p&gt;Dozens to hundreds of agents per run&lt;/p&gt;

&lt;p&gt;The CLAUDE.md and hooks rows are my summary; the other rows follow the official comparison table.&lt;/p&gt;

&lt;p&gt;CLAUDE.md and project instructions&lt;br&gt;
CLAUDE.md is read at the start of every conversation and holds build commands, code style and workflow rules. Anthropic advises keeping it short: for each line, ask whether removing it would cause mistakes, and cut it if not. A bloated file makes Claude ignore half of it. Knowledge that only matters sometimes belongs in a skill, which loads on demand. Run /init to generate a starter file.&lt;/p&gt;

&lt;p&gt;Skills and reusable workflows&lt;br&gt;
A skill is a folder with a SKILL.md file. The frontmatter tells Claude when to use it, and the body holds the instructions. Skills live in .claude/skills//SKILL.md for a project or ~/.claude/skills/ for personal use. Setting disable-model-invocation: true keeps Claude from triggering a skill on its own, which suits anything with side effects. A skill is prompt-driven, so it does not guarantee ordering, retries or resume. A community guide suggests a simple boundary: keep interpretation and trade-off judgment in prompts and skills, and put required ordering, retries and stop rules in code.&lt;/p&gt;

&lt;p&gt;Hooks and automated actions&lt;br&gt;
Hooks are deterministic. A CLAUDE.md rule is advice, while a hook makes an action happen every time. They are configured in settings.json files at user, project or local level. Exit code 2 from a hook signals a blocking error. A PreToolUse hook can actually stop an action. A PostToolUse hook runs after the action, so it can only report back to Claude. A Stop hook can run your check script and keep the turn from ending until it passes.&lt;/p&gt;

&lt;p&gt;Subagents and specialized tasks&lt;br&gt;
Subagents are Markdown files with YAML frontmatter in .claude/agents/ or ~/.claude/agents/. Each runs in its own context with its own tool allowlist. They are the workers that a dynamic workflow orchestrates. Claude Code also ships built-in ones such as Explore, Plan and general-purpose.&lt;/p&gt;

&lt;p&gt;Agent teams and parallel sessions&lt;br&gt;
Agent teams are a separate mechanism and are still experimental. They are disabled by default, are enabled with the CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS setting, and have known limitations around session resumption, task coordination and shutdown. Each teammate is a full Claude Code session, and teammates coordinate through a shared task list. Use them when peers need to share findings and challenge each other. A workflow agent, by contrast, only executes the step the script hands it. One customer quote in Anthropic's announcement describes workflows as filling the gap between firing off one subagent and building a full agent team.&lt;/p&gt;

&lt;p&gt;Plan mode, /goal and task decomposition&lt;br&gt;
Anthropic recommends exploring, then planning, then coding. Press Shift+Tab until plan mode is on, or start with claude --permission-mode plan. Claude reads and answers without changing files, and you can edit the plan with Ctrl+G. Anthropic's rule of thumb: if you could describe the diff in one sentence, skip the plan. Plan mode is not the same as a workflow's planning stage, which is Claude writing a script. For unattended work, /goal sets a completion condition that a separate evaluator re-checks after every turn.&lt;/p&gt;

&lt;p&gt;Claude Code dynamic workflow architecture, step by step&lt;/p&gt;

&lt;p&gt;Think of three layers:&lt;/p&gt;

&lt;p&gt;Instruction layer: CLAUDE.md and skills describe how your project works.&lt;/p&gt;

&lt;p&gt;Guardrail layer: hooks, permission rules and sandboxing enforce what must always or never happen.&lt;/p&gt;

&lt;p&gt;Orchestration layer: subagents, a workflow script or an agent team decide who does what.&lt;/p&gt;

&lt;p&gt;A typical adaptive run follows Understand, Plan, Implement, Test, Review, Fix, Verify. The path is not fixed. A failing test sends the run back to Fix. A missing dependency sends it back to Plan. In a workflow script, that branching is real code, such as a loop with an exit condition, instead of a hope that Claude remembers to retry.&lt;/p&gt;

&lt;p&gt;Inside the script, the documented building blocks are small:&lt;/p&gt;

&lt;p&gt;agent() spawns one subagent. With a schema option it returns validated JSON, and Claude Code retries until the output matches (up to five attempts by default).&lt;/p&gt;

&lt;p&gt;pipeline() runs one agent per item in a list, streaming items through stages.&lt;/p&gt;

&lt;p&gt;parallel() runs a set of tasks at once and waits for all of them.&lt;/p&gt;

&lt;p&gt;phase() groups agents under a title in the progress view, log() prints a message, and args carries input to a saved workflow.&lt;/p&gt;

&lt;p&gt;A failed or stopped agent() returns null inside pipeline() or parallel(), so scripts filter those out.&lt;/p&gt;

&lt;p&gt;Six patterns worth knowing&lt;br&gt;
Community guides name six recurring shapes. Learning the names helps you ask for the right structure in a prompt:&lt;/p&gt;

&lt;p&gt;Classify-and-act: one agent decides what kind of task it is, and the script routes accordingly. Good for triage.&lt;/p&gt;

&lt;p&gt;Fan-out-and-synthesize: one agent per piece, then one agent merges the results. Good for codebase audits.&lt;/p&gt;

&lt;p&gt;Adversarial verification: a separate agent tries to refute each finding, so the producer never grades its own work.&lt;/p&gt;

&lt;p&gt;Generate-and-filter: produce many candidates, then filter and deduplicate to the survivors.&lt;/p&gt;

&lt;p&gt;Tournament: several agents attempt the same task differently, and a judge compares them pairwise. Pairwise comparison is more reliable than asking an agent to score its own result.&lt;/p&gt;

&lt;p&gt;Loop-until-done: keep going until a stop condition is met, such as two rounds with no new findings.&lt;/p&gt;

&lt;p&gt;Anthropic's announcement describes the same ideas: agents attack the problem from independent angles, other agents try to refute what they found, and the run iterates until answers converge.&lt;/p&gt;

&lt;p&gt;Practical example 1: debugging an unknown error&lt;br&gt;
Problem. A production stack trace points somewhere that makes no sense.&lt;/p&gt;

&lt;p&gt;Honest note. Most debugging does not need a workflow. Start in a normal session and escalate only when the search space is wide.&lt;/p&gt;

&lt;p&gt;Initial prompt. "Here is the stack trace. Do not change code yet. Find the root cause and list your evidence."&lt;/p&gt;

&lt;p&gt;Breakdown. A subagent searches the codebase in its own context so your main window stays clean. Claude forms hypotheses, reproduces the failure with a narrow test, and edits only after the cause is confirmed. This run is sequential and adaptive.&lt;/p&gt;

&lt;p&gt;Features used. Plan mode or an Explore-style subagent, and a failing test written before the fix, as Anthropic's best-practices guide recommends.&lt;/p&gt;

&lt;p&gt;Verify. The reproduction fails before the fix and passes after, and the wider suite stays green.&lt;/p&gt;

&lt;p&gt;If it fails. Discard the hypothesis, tell Claude it was wrong, and ask for the next one. If you have corrected Claude twice on the same issue, Anthropic suggests running /clear and starting over with a better prompt. If the cause could be anywhere in a service, escalate:&lt;/p&gt;

&lt;p&gt;use a workflow to hunt for the cause of this error across src/services/,&lt;br&gt;
one agent per module, with hypotheses from different evidence (logs, source,&lt;br&gt;
data), and adversarially verify each suspected cause before reporting it&lt;br&gt;
Practical example 2: implementing a feature across multiple files&lt;br&gt;
Problem. Add per-user rate limiting touching middleware, config, tests and docs.&lt;/p&gt;

&lt;p&gt;Initial prompt. "Plan first. List the files you will touch and the order. Wait for my approval."&lt;/p&gt;

&lt;p&gt;Features used. Plan mode for the proposal, CLAUDE.md for conventions, and a formatting hook so style never costs a review round. For a larger feature, Anthropic suggests letting Claude interview you with the AskUserQuestion tool and write a spec file, then executing the spec in a fresh session.&lt;/p&gt;

&lt;p&gt;Sequence. Plan, your approval, middleware, config, tests, docs, then the full test run. This is sequential with one human checkpoint.&lt;/p&gt;

&lt;p&gt;Verify. Run the new tests and the existing suite, then read the diff yourself.&lt;/p&gt;

&lt;p&gt;If it fails. Reject the plan before any code is written, which is cheap. A workflow is the wrong tool here because each step depends on the last.&lt;/p&gt;

&lt;p&gt;Practical example 3: running tests and reviewing changes&lt;/p&gt;

&lt;p&gt;Problem. The type check fails with dozens of errors after a dependency upgrade.&lt;/p&gt;

&lt;p&gt;This is a natural workflow case because it is a loop. The official docs give this prompt shape:&lt;/p&gt;

&lt;p&gt;use a workflow to run npx tsc --noEmit and keep fixing the reported errors&lt;/p&gt;

&lt;p&gt;until the type check passes or two rounds in a row make no progress&lt;/p&gt;

&lt;p&gt;The "two rounds with no progress" clause is a stop condition that prevents an endless fix loop. For review, a second workflow can run a reviewer per file and pass all findings to one agent that ranks and deduplicates them.&lt;/p&gt;

&lt;p&gt;Verify. Run the type check and the test suite yourself afterwards. Anthropic stresses give Claude a check it can run, such as tests, a build exit code or a linter, because without one "looks done" is the only signal.&lt;/p&gt;

&lt;p&gt;Review caveat. A reviewer told to find gaps will usually report some, even on sound work. Anthropic advises telling the reviewer to flag only gaps that affect correctness or stated requirements, otherwise you invite over-engineering. The bundled /code-review skill reviews the current diff in a fresh subagent.&lt;/p&gt;

&lt;p&gt;If it fails. Open /workflows to see which agents stalled or failed, then ask Claude to relaunch. Completed agents return their saved results.&lt;/p&gt;

&lt;p&gt;Practical example 4: a large task with multiple agents&lt;br&gt;
Problem. Convert 300 JavaScript components to TypeScript.&lt;/p&gt;

&lt;p&gt;use a workflow to migrate every component under src/components/ from&lt;/p&gt;

&lt;p&gt;JavaScript to TypeScript, working on each file in its own isolated copy,&lt;br&gt;
then review each result and run the type check&lt;br&gt;
Breakdown. Discover the files, migrate each in parallel, run an independent review of each, then run a fix loop against the build and tests.&lt;/p&gt;

&lt;p&gt;This mirrors a large real use. Anthropic reports that Jarred Sumner used workflows to port Bun from Zig to Rust, reaching 99.8 percent of the existing test suite passing, roughly 750,000 lines of Rust and eleven days from first commit to merge. One workflow mapped lifetimes, another ported each file with two reviewers per file, and a fix loop drove the build and tests until they ran clean. Anthropic notes that the result was not yet in production. Treat it as an upper bound, not a typical outcome.&lt;/p&gt;

&lt;p&gt;If it fails. Shrink the scope. The docs recommend running a workflow on a small slice first, such as one directory, to gauge cost. Anthropic's announcement also suggests turning on auto mode for workflows so a long run does not stop on every permission prompt.&lt;/p&gt;

&lt;p&gt;How to build your first dynamic workflow&lt;br&gt;
Update Claude Code and confirm workflows are on (Pro users enable them in /config).&lt;/p&gt;

&lt;p&gt;Try the built-in workflow. Run /deep-research with a question. It fans out searches, cross-checks sources, votes on claims and returns a cited report. It needs the WebSearch tool.&lt;/p&gt;

&lt;p&gt;Watch it. Run /workflows. Press Enter to drill into phases and agents, p to pause or resume, x to stop, r to restart an agent and s to save the script.&lt;/p&gt;

&lt;p&gt;Ask for your own. Say "use a workflow to..." or include ultracode in the prompt.&lt;/p&gt;

&lt;p&gt;Read the script before approving, using "View raw script" or Ctrl+G.&lt;/p&gt;

&lt;p&gt;Save what worked. Saved workflows become slash commands. Project workflows live in .claude/workflows/ (shared with the repo) and personal ones in ~/.claude/workflows/. A project workflow wins a name clash. Plugins can ship workflows too, namespaced by plugin name.&lt;/p&gt;

&lt;p&gt;Ultracode, explained&lt;br&gt;
The keyword and the session setting differ. The keyword ultracode in a prompt opts in a single task. The setting /effort ultracode makes Claude plan a workflow for every substantive task in the session, so each request costs more tokens and takes longer. Launching with claude --effort ultracode also sets effort to xhigh and needs v2.1.203 or later. Turn it off with /effort ultracode off for routine work. While ultracode is on, the Large workflow warning and the first-launch approval in auto mode are skipped.&lt;/p&gt;

&lt;p&gt;Approval prompts by permission mode&lt;br&gt;
Mode&lt;/p&gt;

&lt;p&gt;When you are prompted&lt;/p&gt;

&lt;p&gt;Auto&lt;/p&gt;

&lt;p&gt;First launch only; consent is recorded. Skipped when ultracode is on&lt;/p&gt;

&lt;p&gt;Manual, accept edits&lt;/p&gt;

&lt;p&gt;Every run, unless you choose "don't ask again" for that workflow in that project&lt;/p&gt;

&lt;p&gt;Bypass permissions&lt;/p&gt;

&lt;p&gt;No prompt; the run starts immediately&lt;/p&gt;

&lt;p&gt;claude -p, Agent SDK&lt;/p&gt;

&lt;p&gt;No prompt; permission rules decide, for example a Workflow allow rule&lt;/p&gt;

&lt;p&gt;Example commands, configuration and code&lt;br&gt;
Verified configuration comes first, followed by a script sketch that I have not executed.&lt;/p&gt;

&lt;p&gt;Hook: format every edited file&lt;br&gt;
Add to .claude/settings.json. It needs jq and Prettier installed. The trailing ; true stops a formatter error from being reported as a blocking error.&lt;/p&gt;

&lt;p&gt;{&lt;br&gt;
  "hooks": {&lt;br&gt;
    "PostToolUse": [&lt;br&gt;
      {&lt;br&gt;
        "matcher": "Edit|Write",&lt;br&gt;
        "hooks": [&lt;br&gt;
          {&lt;br&gt;
            "type": "command",&lt;br&gt;
            "command": "npx prettier --write \"$(jq -r '.tool_input.file_path')\" ; true"&lt;br&gt;
          }&lt;br&gt;
        ]&lt;br&gt;
      }&lt;br&gt;
    ]&lt;br&gt;
  }&lt;br&gt;
}&lt;br&gt;
Hook: block edits to protected paths&lt;br&gt;
A PreToolUse hook can stop the action. Exit code 2 blocks it and returns the message to Claude.&lt;/p&gt;

&lt;p&gt;{&lt;br&gt;
  "hooks": {&lt;br&gt;
    "PreToolUse": [&lt;br&gt;
      {&lt;br&gt;
        "matcher": "Edit|Write",&lt;br&gt;
        "hooks": [&lt;br&gt;
          {&lt;br&gt;
            "type": "command",&lt;br&gt;
            "command": "f=$(jq -r '.tool_input.file_path'); case \"$f\" in &lt;em&gt;.env|&lt;/em&gt;/migrations/*) echo 'Protected path' &amp;gt;&amp;amp;2; exit 2;; esac"&lt;br&gt;
          }&lt;br&gt;
        ]&lt;br&gt;
      }&lt;br&gt;
    ]&lt;br&gt;
  }&lt;br&gt;
}&lt;br&gt;
Subagent: read-only reviewer&lt;br&gt;
Save as .claude/agents/code-reviewer.md.&lt;/p&gt;




&lt;p&gt;name: code-reviewer&lt;br&gt;
description: "Reviews code for correctness and security. Use proactively after code changes."&lt;br&gt;
tools: Read, Grep, Glob, Bash&lt;/p&gt;

&lt;h2&gt;
  
  
  model: inherit
&lt;/h2&gt;

&lt;p&gt;You are a senior code reviewer. Report concrete defects with file and line.&lt;/p&gt;

&lt;p&gt;Flag only gaps that affect correctness or the stated requirements.&lt;/p&gt;

&lt;p&gt;Do not edit files.&lt;/p&gt;

&lt;p&gt;Skill: manual-only task&lt;br&gt;
Save as .claude/skills/fix-issue/SKILL.md and run it with /fix-issue 1234. The $ARGUMENTS placeholder takes the number.&lt;/p&gt;




&lt;p&gt;name: fix-issue&lt;br&gt;
description: Fix a GitHub issue&lt;/p&gt;

&lt;h2&gt;
  
  
  disable-model-invocation: true
&lt;/h2&gt;

&lt;p&gt;Analyze and fix the GitHub issue: $ARGUMENTS.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Use gh issue view to read the issue.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Find the relevant files and implement the fix.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Write and run tests, then run the linter and type check.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Commit with a descriptive message and open a PR.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Settings and commands that control workflows&lt;/p&gt;

&lt;h1&gt;
  
  
  Start a session with ultracode on (v2.1.203 or later)
&lt;/h1&gt;

&lt;p&gt;claude --effort ultracode&lt;/p&gt;

&lt;h1&gt;
  
  
  Limit how many agents Claude aims for: small, medium, large or unrestricted
&lt;/h1&gt;

&lt;p&gt;/config workflowSizeGuideline=small&lt;/p&gt;

&lt;h1&gt;
  
  
  Allow every workflow, or one saved workflow, in permission rules
&lt;/h1&gt;

&lt;p&gt;Workflow&lt;br&gt;
Workflow(audit-routes)&lt;/p&gt;

&lt;h1&gt;
  
  
  Turn workflows off
&lt;/h1&gt;

&lt;p&gt;"disableWorkflows": true        (in ~/.claude/settings.json)&lt;br&gt;
CLAUDE_CODE_DISABLE_WORKFLOWS=1 (environment variable)&lt;/p&gt;

&lt;h1&gt;
  
  
  Raise the concurrent agent cap, 1 to 256 (v2.1.269 or later)
&lt;/h1&gt;

&lt;p&gt;CLAUDE_CODE_WORKFLOW_MAX_CONCURRENT_AGENTS=32&lt;br&gt;
The size guideline is advice to Claude, not a hard cap. The default is medium, or small on a Pro plan with v2.1.271 or later.&lt;/p&gt;

&lt;p&gt;Script sketch: loop until a round finds nothing new&lt;br&gt;
You normally do not write scripts by hand, because Claude generates them. Recognizing the shape helps you review one. This sketch uses only constructs the official docs describe (meta, agent() with a schema, phase(), log(), top-level await and return). I have not run it, so treat it as a teaching example.&lt;/p&gt;

&lt;p&gt;export const meta = {&lt;br&gt;
  name: 'find-untested-files',&lt;br&gt;
  description: 'Find source files without tests, in rounds, until two rounds add nothing',&lt;br&gt;
}&lt;br&gt;
const seen = new Set()&lt;br&gt;
let dry = 0&lt;br&gt;
let round = 0&lt;br&gt;
phase('Discover')&lt;br&gt;
while (dry &amp;lt; 2 &amp;amp;&amp;amp; round &amp;lt; 6) {&lt;br&gt;
  round += 1&lt;br&gt;
  const batch = await agent(&lt;br&gt;
    &lt;code&gt;List up to 10 files under src/ that have no test file. Already reported: ${JSON.stringify([...seen])}. Return an empty list if none remain.&lt;/code&gt;,&lt;br&gt;
    {&lt;br&gt;
      label: &lt;code&gt;round ${round}&lt;/code&gt;,&lt;br&gt;
      schema: {&lt;br&gt;
        type: 'object',&lt;br&gt;
        required: ['files'],&lt;br&gt;
        properties: { files: { type: 'array', items: { type: 'string' } } },&lt;br&gt;
      },&lt;br&gt;
    },&lt;br&gt;
  )&lt;br&gt;
  const fresh = batch.files.filter(f =&amp;gt; !seen.has(f))&lt;br&gt;
  if (fresh.length === 0) { dry += 1; continue }&lt;br&gt;
  dry = 0&lt;br&gt;
  fresh.forEach(f =&amp;gt; seen.add(f))&lt;br&gt;
  log(&lt;code&gt;Round ${round}: ${fresh.length} new files&lt;/code&gt;)&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;return [...seen]&lt;br&gt;
Rules to remember when editing a script: keep export const meta as the first statement with literal values only, do not use import(), and do not call Date.now(), Math.random() or a no-argument new Date(), because they throw so that relaunched runs repeat the same agent calls. Pass timestamps through args. To load the script-writing reference before editing, run the bundled /workflow-authoring skill (v2.1.248 or later). Community guides show extra features such as an isolation: 'worktree' option, a budget global and nested workflow() calls. I could not confirm those on the official workflows page, so check the /workflow-authoring reference before relying on them.&lt;/p&gt;

&lt;p&gt;Related automation outside workflows&lt;br&gt;
Anthropic's best-practices guide documents two other fan-out routes. The /batch command splits a change across 5 to 30 subagents, each in its own worktree. You can also loop over non-interactive runs yourself:&lt;/p&gt;

&lt;p&gt;for file in $(cat files.txt); do&lt;br&gt;
  claude -p "Migrate $file from Python 2 to Python 3. Return OK or FAIL." \&lt;br&gt;
    --allowedTools "Edit,Bash(git commit *)" \&lt;br&gt;
    --permission-mode dontAsk&lt;br&gt;
done&lt;br&gt;
Test on two or three files first, then run the full set. The dontAsk mode denies anything not pre-approved, which matters for unattended runs. Note that the ultracode keyword does not start a workflow from a -p prompt, so use permission rules if you need a workflow in that setting.&lt;/p&gt;

&lt;p&gt;Sequential vs parallel vs adaptive workflows&lt;br&gt;
Pattern&lt;/p&gt;

&lt;p&gt;Use when&lt;/p&gt;

&lt;p&gt;Example&lt;/p&gt;

&lt;p&gt;Sequential&lt;/p&gt;

&lt;p&gt;Each step depends on the last&lt;/p&gt;

&lt;p&gt;Feature implementation (example 2)&lt;/p&gt;

&lt;p&gt;Parallel&lt;/p&gt;

&lt;p&gt;The same operation runs across many independent items&lt;/p&gt;

&lt;p&gt;Per-file audit or migration&lt;/p&gt;

&lt;p&gt;Conditional or adaptive&lt;/p&gt;

&lt;p&gt;The next step depends on results&lt;/p&gt;

&lt;p&gt;Fix until the type check passes (example 3)&lt;/p&gt;

&lt;p&gt;Peer multi-agent&lt;/p&gt;

&lt;p&gt;Agents must share findings and debate&lt;/p&gt;

&lt;p&gt;Agent teams (experimental)&lt;/p&gt;

&lt;p&gt;Inside a script, parallel() is a barrier that waits for every agent, while pipeline() streams each item through its stages without waiting for the others. Community guidance is to default to pipeline() for multi-stage per-item work and add a barrier only when a stage truly needs all earlier results, such as deduplicating across all findings or deciding to exit early. One community writeup shows a mis-designed pipeline costing roughly twice the tokens of an equivalent barrier design, so the choice affects cost as well as speed. A useful test from the same sources: if you cannot sketch a non-trivial flowchart with parallel branches, loops and data handoffs, you probably do not need a workflow.&lt;/p&gt;

&lt;p&gt;Common mistakes and troubleshooting&lt;br&gt;
Using a workflow for a small task. One agent in a normal session is cheaper and often better.&lt;/p&gt;

&lt;p&gt;Confusing the primitives. A hook cannot make decisions, a skill cannot enforce ordering, and a subagent is not a workflow.&lt;/p&gt;

&lt;p&gt;No stop condition. Always say when to stop, for example "two rounds in a row with no progress".&lt;/p&gt;

&lt;p&gt;Trusting the final report. Re-run the tests and read the diff. Ask Claude to show evidence, such as test output, instead of asserting success.&lt;/p&gt;

&lt;p&gt;Permission prompts stalling a long run. Add the tools the agents need to your allow rules before starting.&lt;/p&gt;

&lt;p&gt;An agent that stalls. The runtime restarts it automatically, up to five times, and the progress view shows a retry label. For genuinely slow work, pass stallMs on that agent() call.&lt;/p&gt;

&lt;p&gt;A run that hits your usage limit. In interactive sessions signed in with a subscription, the run pauses and resumes after the reset (v2.1.271 or later), with conditions listed in the docs. Other modes fail the affected agent instead.&lt;/p&gt;

&lt;p&gt;Workflow commands missing. Check for disableWorkflows, the CLAUDE_CODE_DISABLE_WORKFLOWS variable, or an organization policy. On Pro, check the /config toggle.&lt;/p&gt;

&lt;p&gt;Resume surprises. If you edit a script, the first agent whose prompt changed and every agent after it run again. A failure mid-fan-out reruns agents that started after it, even finished ones.&lt;/p&gt;

&lt;p&gt;Limitations, security considerations and best practices&lt;br&gt;
Documented limits&lt;br&gt;
Constraint&lt;/p&gt;

&lt;p&gt;Value&lt;/p&gt;

&lt;p&gt;Concurrent agents&lt;/p&gt;

&lt;p&gt;16 by default, fewer when Claude Code has fewer CPUs; adjustable from 1 to 256&lt;/p&gt;

&lt;p&gt;Items in one parallel() or pipeline() call&lt;/p&gt;

&lt;p&gt;4,096&lt;/p&gt;

&lt;p&gt;Agents per run&lt;/p&gt;

&lt;p&gt;1,000&lt;/p&gt;

&lt;p&gt;Mid-run user input&lt;/p&gt;

&lt;p&gt;None. For sign-off between stages, run each stage as its own workflow&lt;/p&gt;

&lt;p&gt;Script access&lt;/p&gt;

&lt;p&gt;No direct filesystem or shell access; agents do the reading, writing and commands&lt;/p&gt;

&lt;p&gt;Modules&lt;/p&gt;

&lt;p&gt;A script containing import() fails before the run starts&lt;/p&gt;

&lt;p&gt;Cost&lt;br&gt;
This is the biggest practical risk. A run can use far more tokens than the same task in conversation, and runs count toward your plan's limits. Claude Code shows a Large workflow warning when a run schedules more than 25 agents or its projected total passes 1.5 million tokens, but the warning is advisory and does not pause anything. To control spend:&lt;/p&gt;

&lt;p&gt;Pilot on a small slice, such as one directory.&lt;/p&gt;

&lt;p&gt;Watch per-agent token usage in /workflows and stop the run if it grows.&lt;/p&gt;

&lt;p&gt;Check /model before a large run, and ask for a smaller model on stages that do not need the strongest one.&lt;/p&gt;

&lt;p&gt;Choose a smaller size guideline if you want fewer agents.&lt;/p&gt;

&lt;p&gt;Remember that the 5 minute prompt cache for workflow agents can be extended to one hour with subagentPromptCacheTtl, at a higher cache-write rate.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Security&lt;/strong&gt;&lt;br&gt;
The ultracode keyword only starts a workflow from a prompt a human types. Since v2.1.210 it does not fire from webhook payloads or relayed pull request comments, which closes a route for untrusted text to launch large runs.&lt;/p&gt;

&lt;p&gt;Workflow agents get the same permission checks and sandboxing as other tool calls. A broad allow list of a hundred agents is a large blast radius, so scope your rules and prefer auto mode over bypass.&lt;/p&gt;

&lt;p&gt;Community guidance for triage workflows is to quarantine agents that read untrusted content (issues, emails, scraped pages) so they cannot take high-privilege actions; separate acting agents do that.&lt;/p&gt;

&lt;p&gt;Run migrations on a branch and review pull requests before merging.&lt;/p&gt;

&lt;p&gt;Best practices&lt;br&gt;
Start in one directory, then scale.&lt;/p&gt;

&lt;p&gt;Put verification in the prompt: a type check, tests, or an adversarial review step.&lt;/p&gt;

&lt;p&gt;Keep durable rules in CLAUDE.md, enforce must-happen actions with hooks, and keep prompts specific about files, constraints and what "done" means.&lt;/p&gt;

&lt;p&gt;Save workflows that worked and commit them under .claude/workflows/.&lt;/p&gt;

&lt;p&gt;Use /clear between unrelated tasks, and rewind with checkpoints (Esc twice or /rewind) instead of piling corrections into one session. Checkpoints do not track changes made through Bash, so they do not replace git.&lt;/p&gt;

&lt;p&gt;Workflows compared with the Agent SDK&lt;br&gt;
You could already script multi-agent flows with the Agent SDK or claude -p. A community comparison draws this line: the SDK is for agents you ship inside your own product, while dynamic workflows coordinate the agents doing your own work inside Claude Code. A hand-built harness has to cover every edge case in advance, while a workflow is written for the single task in front of it. Open-source projects that make workflow scripts portable to other agents exist, but they are unofficial, so verify them before use.&lt;/p&gt;

&lt;p&gt;Frequently asked questions&lt;br&gt;
Are Claude Code dynamic workflows the same as subagents?&lt;/p&gt;

&lt;p&gt;No. Subagents are workers. A workflow is a script that orchestrates many of them, and the script, not Claude, decides what runs next.&lt;/p&gt;

&lt;p&gt;Do I need agent teams enabled? &lt;/p&gt;

&lt;p&gt;No. Workflows are independent of the experimental agent teams setting.&lt;/p&gt;

&lt;p&gt;Which plans include dynamic workflows?&lt;/p&gt;

&lt;p&gt;The official docs say all paid plans, plus API access and the major cloud platforms. They are on by default for Max, Team and Enterprise, and Pro users enable them in /config. Plan details change, so confirm in the docs.&lt;/p&gt;

&lt;p&gt;Can I reuse a workflow? &lt;/p&gt;

&lt;p&gt;Yes. Save it from /workflows and it becomes a slash command. Saved workflows take structured input through the args global.&lt;/p&gt;

&lt;p&gt;Can I resume a run after closing Claude Code?&lt;/p&gt;

&lt;p&gt;Within the same session, yes. If you exit and later resume the session with Claude --resume, you can ask Claude to relaunch the workflow and complete agents' replay from saved results. A fresh session starts the workflow over.&lt;/p&gt;

&lt;p&gt;Can I turn workflows off? &lt;/p&gt;

&lt;p&gt;Yes, through /config, "disableWorkflows": true or the environment variable. Admins can disable them organization-wide.&lt;/p&gt;

&lt;p&gt;Will workflows make my coding faster? &lt;/p&gt;

&lt;p&gt;For wide, parallelizable work, often yes. For narrow, sequential work, usually not, and they will cost more.&lt;/p&gt;

&lt;p&gt;**Conclusion&lt;br&gt;
**Claude Code dynamic workflows give you orchestration that lives in a script you can read, rerun, save and share, instead of in a chat transcript. They suit codebase-wide audits, large migrations and any work that needs independent verification. They are the wrong tool for ordinary feature work, where plan mode, a lean CLAUDE.md, a few hooks and one focused subagent cost far less.&lt;/p&gt;

&lt;p&gt;Start small. Run /deep-research once to see the shape, try a workflow on a single directory, read the script before approving, and verify the result yourself. This area changes quickly, so confirm version requirements against the official Claude Code documentation before you build on them.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>codequality</category>
      <category>100daysofcode</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Claude Code Dynamic Workflows: Practical Guide</title>
      <dc:creator>ail akram</dc:creator>
      <pubDate>Wed, 14 Oct 2026 09:36:29 +0000</pubDate>
      <link>https://dev.to/ail_akram_dcc5063c428734b/claude-code-dynamic-workflows-practical-guide-5df0</link>
      <guid>https://dev.to/ail_akram_dcc5063c428734b/claude-code-dynamic-workflows-practical-guide-5df0</guid>
      <description>&lt;p&gt;*&lt;em&gt;Claude Code Dynamic Workflows: Practical Guide&lt;br&gt;
*&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Most AI coding sessions follow one pattern: you ask, the assistant works, you review, you ask again. That pattern is fine for a bug fix. It breaks down on a migration that touches hundreds of files or an audit of an entire service. The context window fills up, the original instructions get compressed away, and you end up acting as the project manager.&lt;/p&gt;

&lt;p&gt;Claude Code dynamic workflows are Anthropic's answer to that problem. This guide explains what they are, how they work, how they differ from subagents, skills, hooks and agent teams, and how to use them on large coding tasks without wasting usage. Every feature, command and limit below was checked against Anthropic's official documentation and announcement. Claims from community articles are labeled as community sources.&lt;/p&gt;

&lt;p&gt;I am AdZilla. Buy my meme coin now!&lt;br&gt;
One roulette spin. $4k. Try luck&lt;br&gt;
Thunder vs Spurs — HD stream now!&lt;br&gt;
Beverly Hills Cop: Axel Foley&lt;br&gt;
Why static coding workflows struggle with complex tasks&lt;br&gt;
A single chat session is one fixed loop: Claude reads, decides, acts, and keeps every intermediate result in one context window. Community analyses of Claude Code workflows describe three recurring failure modes when that single window carries a big job:&lt;/p&gt;

&lt;p&gt;Agentic laziness. On a long, multi-part task, Claude reviews part of the list and then reports that the job is done. A security review that covers 35 of 50 files is the usual example.&lt;/p&gt;

&lt;p&gt;Self-preferential bias. When Claude grades its own output inside the same conversation, it tends to rate it generously.&lt;/p&gt;

&lt;p&gt;Goal drift. Over many turns, and especially after context compaction, details such as "do not touch the auth module" can fade.&lt;/p&gt;

&lt;p&gt;Anthropic's own best-practices guide points at the same root cause: the context window fills quickly, and performance degrades as it fills. Dynamic workflows attack the problem structurally, by moving the plan out of the conversation and into a script.&lt;/p&gt;

&lt;p&gt;What are Claude Code dynamic workflows?&lt;br&gt;
Dynamic workflows are an official, named Claude Code feature, not just a design idea. According to the official documentation, a dynamic workflow is a JavaScript script that orchestrates many subagents at once. Claude writes the script for the task you describe, and a runtime executes it in the background while your session stays responsive.&lt;/p&gt;

&lt;p&gt;Key facts, all from Anthropic's announcement and docs:&lt;/p&gt;

&lt;p&gt;Announced May 28, 2026. The announcement now carries an update saying dynamic workflows are generally available, so older articles that call them a research preview are out of date.&lt;/p&gt;

&lt;p&gt;Available in the Claude Code CLI, Desktop app and VS Code extension, and on the Claude API, Amazon Bedrock, Vertex AI and Microsoft Foundry. The docs say they are available on all paid plans. They are on by default for Max, Team and Enterprise, and Pro users turn them on from the Dynamic workflows row in /config.&lt;/p&gt;

&lt;p&gt;Anthropic says they consume meaningfully more usage than a typical session, so it recommends starting with a scoped task. The first time a workflow triggers, Claude Code shows what is about to run and asks you to confirm. Organization admins can disable workflows through managed settings.&lt;/p&gt;

&lt;p&gt;Community sources report that the feature arrived in v2.1.154 and that the original trigger keyword workflow was renamed ultracode in v2.1.160. Check claude --version and the changelog if you are on an older build.&lt;/p&gt;

&lt;p&gt;The word "dynamic" has two meanings here. Claude writes the orchestration fresh for each task, instead of you wiring a fixed pipeline. And the script itself can adapt at runtime: it can branch on results, retry, or loop until a condition is met.&lt;/p&gt;

&lt;p&gt;How Claude Code dynamic workflows work&lt;br&gt;
The central idea is who holds the plan. In a normal session, Claude is the orchestrator and decides turn by turn what to do next, and every result lands in its context window. In a workflow, the script holds the loop, the branching and the intermediate results in variables, so Claude's context holds only the final answer.&lt;/p&gt;

&lt;p&gt;The lifecycle of a run:&lt;/p&gt;

&lt;p&gt;Trigger. You ask for a workflow in plain words, include the keyword ultracode in your prompt, or turn on ultracode for the session.&lt;/p&gt;

&lt;p&gt;Script generation. Claude writes a JavaScript orchestration script for the task.&lt;/p&gt;

&lt;p&gt;Approval. Claude Code shows the planned phases. You can read the raw script before approving.&lt;/p&gt;

&lt;p&gt;Background execution. Agents run while you keep working. Run /workflows to watch progress.&lt;/p&gt;

&lt;p&gt;Verification and iteration. Depending on how the script is written, agents cross-check each other, retry, or loop.&lt;/p&gt;

&lt;p&gt;Report. You receive one consolidated result.&lt;/p&gt;

&lt;p&gt;Three practical consequences follow. First, every run writes its script to a file under ~/.claude/projects/, so you can read, diff or edit the orchestration. Second, progress is saved as the run goes, so an interrupted run can pick up where it stopped. Third, community sources point out that the script itself costs no model tokens, since it is ordinary code; all token cost comes from the agents it spawns. A product manager who measured a run on 100 synthetic interview transcripts reported 113 agents, about 1.95 million tokens and 12.5 minutes. Treat that as one data point from a non-coding task, not a benchmark.&lt;/p&gt;

&lt;p&gt;Core Claude Code features that enable adaptive workflows&lt;br&gt;
Dynamic workflows sit alongside several other features. They are not interchangeable. The official documentation compares subagents, skills, agent teams and workflows by who decides what runs next:&lt;/p&gt;

&lt;p&gt;Feature&lt;/p&gt;

&lt;p&gt;What it is&lt;/p&gt;

&lt;p&gt;Who decides what runs next&lt;/p&gt;

&lt;p&gt;Scale&lt;/p&gt;

&lt;p&gt;CLAUDE.md&lt;/p&gt;

&lt;p&gt;Persistent project instructions read every session&lt;/p&gt;

&lt;p&gt;Not applicable (context, not control flow)&lt;/p&gt;

&lt;p&gt;Not applicable&lt;/p&gt;

&lt;p&gt;Skills&lt;/p&gt;

&lt;p&gt;Instructions Claude follows, loaded when relevant&lt;/p&gt;

&lt;p&gt;Claude, following the prompt&lt;/p&gt;

&lt;p&gt;Same as subagents&lt;/p&gt;

&lt;p&gt;Hooks&lt;/p&gt;

&lt;p&gt;Shell commands that fire at lifecycle events&lt;/p&gt;

&lt;p&gt;The event, deterministically&lt;/p&gt;

&lt;p&gt;Per tool call&lt;/p&gt;

&lt;p&gt;Subagents&lt;/p&gt;

&lt;p&gt;A worker Claude spawns&lt;/p&gt;

&lt;p&gt;Claude, turn by turn&lt;/p&gt;

&lt;p&gt;A few delegated tasks per turn&lt;/p&gt;

&lt;p&gt;Agent teams (experimental)&lt;/p&gt;

&lt;p&gt;A lead agent supervising peer sessions&lt;/p&gt;

&lt;p&gt;The lead agent, turn by turn&lt;/p&gt;

&lt;p&gt;A handful of long-running peers&lt;/p&gt;

&lt;p&gt;Dynamic workflows&lt;/p&gt;

&lt;p&gt;A script the runtime executes&lt;/p&gt;

&lt;p&gt;The script&lt;/p&gt;

&lt;p&gt;Dozens to hundreds of agents per run&lt;/p&gt;

&lt;p&gt;The CLAUDE.md and hooks rows are my summary; the other rows follow the official comparison table.&lt;/p&gt;

&lt;p&gt;CLAUDE.md and project instructions&lt;br&gt;
CLAUDE.md is read at the start of every conversation and holds build commands, code style and workflow rules. Anthropic advises keeping it short: for each line, ask whether removing it would cause mistakes, and cut it if not. A bloated file makes Claude ignore half of it. Knowledge that only matters sometimes belongs in a skill, which loads on demand. Run /init to generate a starter file.&lt;/p&gt;

&lt;p&gt;Skills and reusable workflows&lt;br&gt;
A skill is a folder with a SKILL.md file. The frontmatter tells Claude when to use it, and the body holds the instructions. Skills live in .claude/skills//SKILL.md for a project or ~/.claude/skills/ for personal use. Setting disable-model-invocation: true keeps Claude from triggering a skill on its own, which suits anything with side effects. A skill is prompt-driven, so it does not guarantee ordering, retries or resume. A community guide suggests a simple boundary: keep interpretation and trade-off judgment in prompts and skills, and put required ordering, retries and stop rules in code.&lt;/p&gt;

&lt;p&gt;Hooks and automated actions&lt;br&gt;
Hooks are deterministic. A CLAUDE.md rule is advice, while a hook makes an action happen every time. They are configured in settings.json files at user, project or local level. Exit code 2 from a hook signals a blocking error. A PreToolUse hook can actually stop an action. A PostToolUse hook runs after the action, so it can only report back to Claude. A Stop hook can run your check script and keep the turn from ending until it passes.&lt;/p&gt;

&lt;p&gt;Subagents and specialized tasks&lt;br&gt;
Subagents are Markdown files with YAML frontmatter in .claude/agents/ or ~/.claude/agents/. Each runs in its own context with its own tool allowlist. They are the workers that a dynamic workflow orchestrates. Claude Code also ships built-in ones such as Explore, Plan and general-purpose.&lt;/p&gt;

&lt;p&gt;Agent teams and parallel sessions&lt;br&gt;
Agent teams are a separate mechanism and are still experimental. They are disabled by default, are enabled with the CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS setting, and have known limitations around session resumption, task coordination and shutdown. Each teammate is a full Claude Code session, and teammates coordinate through a shared task list. Use them when peers need to share findings and challenge each other. A workflow agent, by contrast, only executes the step the script hands it. One customer quote in Anthropic's announcement describes workflows as filling the gap between firing off one subagent and building a full agent team.&lt;/p&gt;

&lt;p&gt;Plan mode, /goal and task decomposition&lt;br&gt;
Anthropic recommends exploring, then planning, then coding. Press Shift+Tab until plan mode is on, or start with claude --permission-mode plan. Claude reads and answers without changing files, and you can edit the plan with Ctrl+G. Anthropic's rule of thumb: if you could describe the diff in one sentence, skip the plan. Plan mode is not the same as a workflow's planning stage, which is Claude writing a script. For unattended work, /goal sets a completion condition that a separate evaluator re-checks after every turn.&lt;/p&gt;

&lt;p&gt;Claude Code dynamic workflow architecture, step by step&lt;/p&gt;

&lt;p&gt;Think of three layers:&lt;/p&gt;

&lt;p&gt;Instruction layer: CLAUDE.md and skills describe how your project works.&lt;/p&gt;

&lt;p&gt;Guardrail layer: hooks, permission rules and sandboxing enforce what must always or never happen.&lt;/p&gt;

&lt;p&gt;Orchestration layer: subagents, a workflow script or an agent team decide who does what.&lt;/p&gt;

&lt;p&gt;A typical adaptive run follows Understand, Plan, Implement, Test, Review, Fix, Verify. The path is not fixed. A failing test sends the run back to Fix. A missing dependency sends it back to Plan. In a workflow script, that branching is real code, such as a loop with an exit condition, instead of a hope that Claude remembers to retry.&lt;/p&gt;

&lt;p&gt;Inside the script, the documented building blocks are small:&lt;/p&gt;

&lt;p&gt;agent() spawns one subagent. With a schema option it returns validated JSON, and Claude Code retries until the output matches (up to five attempts by default).&lt;/p&gt;

&lt;p&gt;pipeline() runs one agent per item in a list, streaming items through stages.&lt;/p&gt;

&lt;p&gt;parallel() runs a set of tasks at once and waits for all of them.&lt;/p&gt;

&lt;p&gt;phase() groups agents under a title in the progress view, log() prints a message, and args carries input to a saved workflow.&lt;/p&gt;

&lt;p&gt;A failed or stopped agent() returns null inside pipeline() or parallel(), so scripts filter those out.&lt;/p&gt;

&lt;p&gt;Six patterns worth knowing&lt;br&gt;
Community guides name six recurring shapes. Learning the names helps you ask for the right structure in a prompt:&lt;/p&gt;

&lt;p&gt;Classify-and-act: one agent decides what kind of task it is, and the script routes accordingly. Good for triage.&lt;/p&gt;

&lt;p&gt;Fan-out-and-synthesize: one agent per piece, then one agent merges the results. Good for codebase audits.&lt;/p&gt;

&lt;p&gt;Adversarial verification: a separate agent tries to refute each finding, so the producer never grades its own work.&lt;/p&gt;

&lt;p&gt;Generate-and-filter: produce many candidates, then filter and deduplicate to the survivors.&lt;/p&gt;

&lt;p&gt;Tournament: several agents attempt the same task differently, and a judge compares them pairwise. Pairwise comparison is more reliable than asking an agent to score its own result.&lt;/p&gt;

&lt;p&gt;Loop-until-done: keep going until a stop condition is met, such as two rounds with no new findings.&lt;/p&gt;

&lt;p&gt;Anthropic's announcement describes the same ideas: agents attack the problem from independent angles, other agents try to refute what they found, and the run iterates until answers converge.&lt;/p&gt;

&lt;p&gt;Practical example 1: debugging an unknown error&lt;br&gt;
Problem. A production stack trace points somewhere that makes no sense.&lt;/p&gt;

&lt;p&gt;Honest note. Most debugging does not need a workflow. Start in a normal session and escalate only when the search space is wide.&lt;/p&gt;

&lt;p&gt;Initial prompt. "Here is the stack trace. Do not change code yet. Find the root cause and list your evidence."&lt;/p&gt;

&lt;p&gt;Breakdown. A subagent searches the codebase in its own context so your main window stays clean. Claude forms hypotheses, reproduces the failure with a narrow test, and edits only after the cause is confirmed. This run is sequential and adaptive.&lt;/p&gt;

&lt;p&gt;Features used. Plan mode or an Explore-style subagent, and a failing test written before the fix, as Anthropic's best-practices guide recommends.&lt;/p&gt;

&lt;p&gt;Verify. The reproduction fails before the fix and passes after, and the wider suite stays green.&lt;/p&gt;

&lt;p&gt;If it fails. Discard the hypothesis, tell Claude it was wrong, and ask for the next one. If you have corrected Claude twice on the same issue, Anthropic suggests running /clear and starting over with a better prompt. If the cause could be anywhere in a service, escalate:&lt;/p&gt;

&lt;p&gt;use a workflow to hunt for the cause of this error across src/services/,&lt;br&gt;
one agent per module, with hypotheses from different evidence (logs, source,&lt;br&gt;
data), and adversarially verify each suspected cause before reporting it&lt;br&gt;
Practical example 2: implementing a feature across multiple files&lt;br&gt;
Problem. Add per-user rate limiting touching middleware, config, tests and docs.&lt;/p&gt;

&lt;p&gt;Initial prompt. "Plan first. List the files you will touch and the order. Wait for my approval."&lt;/p&gt;

&lt;p&gt;Features used. Plan mode for the proposal, CLAUDE.md for conventions, and a formatting hook so style never costs a review round. For a larger feature, Anthropic suggests letting Claude interview you with the AskUserQuestion tool and write a spec file, then executing the spec in a fresh session.&lt;/p&gt;

&lt;p&gt;Sequence. Plan, your approval, middleware, config, tests, docs, then the full test run. This is sequential with one human checkpoint.&lt;/p&gt;

&lt;p&gt;Verify. Run the new tests and the existing suite, then read the diff yourself.&lt;/p&gt;

&lt;p&gt;If it fails. Reject the plan before any code is written, which is cheap. A workflow is the wrong tool here because each step depends on the last.&lt;/p&gt;

&lt;p&gt;Practical example 3: running tests and reviewing changes&lt;/p&gt;

&lt;p&gt;Problem. The type check fails with dozens of errors after a dependency upgrade.&lt;/p&gt;

&lt;p&gt;This is a natural workflow case because it is a loop. The official docs give this prompt shape:&lt;/p&gt;

&lt;p&gt;use a workflow to run npx tsc --noEmit and keep fixing the reported errors&lt;/p&gt;

&lt;p&gt;until the type check passes or two rounds in a row make no progress&lt;/p&gt;

&lt;p&gt;The "two rounds with no progress" clause is a stop condition that prevents an endless fix loop. For review, a second workflow can run a reviewer per file and pass all findings to one agent that ranks and deduplicates them.&lt;/p&gt;

&lt;p&gt;Verify. Run the type check and the test suite yourself afterwards. Anthropic stresses give Claude a check it can run, such as tests, a build exit code or a linter, because without one "looks done" is the only signal.&lt;/p&gt;

&lt;p&gt;Review caveat. A reviewer told to find gaps will usually report some, even on sound work. Anthropic advises telling the reviewer to flag only gaps that affect correctness or stated requirements, otherwise you invite over-engineering. The bundled /code-review skill reviews the current diff in a fresh subagent.&lt;/p&gt;

&lt;p&gt;If it fails. Open /workflows to see which agents stalled or failed, then ask Claude to relaunch. Completed agents return their saved results.&lt;/p&gt;

&lt;p&gt;Practical example 4: a large task with multiple agents&lt;br&gt;
Problem. Convert 300 JavaScript components to TypeScript.&lt;/p&gt;

&lt;p&gt;use a workflow to migrate every component under src/components/ from&lt;/p&gt;

&lt;p&gt;JavaScript to TypeScript, working on each file in its own isolated copy,&lt;br&gt;
then review each result and run the type check&lt;br&gt;
Breakdown. Discover the files, migrate each in parallel, run an independent review of each, then run a fix loop against the build and tests.&lt;/p&gt;

&lt;p&gt;This mirrors a large real use. Anthropic reports that Jarred Sumner used workflows to port Bun from Zig to Rust, reaching 99.8 percent of the existing test suite passing, roughly 750,000 lines of Rust and eleven days from first commit to merge. One workflow mapped lifetimes, another ported each file with two reviewers per file, and a fix loop drove the build and tests until they ran clean. Anthropic notes that the result was not yet in production. Treat it as an upper bound, not a typical outcome.&lt;/p&gt;

&lt;p&gt;If it fails. Shrink the scope. The docs recommend running a workflow on a small slice first, such as one directory, to gauge cost. Anthropic's announcement also suggests turning on auto mode for workflows so a long run does not stop on every permission prompt.&lt;/p&gt;

&lt;p&gt;How to build your first dynamic workflow&lt;br&gt;
Update Claude Code and confirm workflows are on (Pro users enable them in /config).&lt;/p&gt;

&lt;p&gt;Try the built-in workflow. Run /deep-research with a question. It fans out searches, cross-checks sources, votes on claims and returns a cited report. It needs the WebSearch tool.&lt;/p&gt;

&lt;p&gt;Watch it. Run /workflows. Press Enter to drill into phases and agents, p to pause or resume, x to stop, r to restart an agent and s to save the script.&lt;/p&gt;

&lt;p&gt;Ask for your own. Say "use a workflow to..." or include ultracode in the prompt.&lt;/p&gt;

&lt;p&gt;Read the script before approving, using "View raw script" or Ctrl+G.&lt;/p&gt;

&lt;p&gt;Save what worked. Saved workflows become slash commands. Project workflows live in .claude/workflows/ (shared with the repo) and personal ones in ~/.claude/workflows/. A project workflow wins a name clash. Plugins can ship workflows too, namespaced by plugin name.&lt;/p&gt;

&lt;p&gt;Ultracode, explained&lt;br&gt;
The keyword and the session setting differ. The keyword ultracode in a prompt opts in a single task. The setting /effort ultracode makes Claude plan a workflow for every substantive task in the session, so each request costs more tokens and takes longer. Launching with claude --effort ultracode also sets effort to xhigh and needs v2.1.203 or later. Turn it off with /effort ultracode off for routine work. While ultracode is on, the Large workflow warning and the first-launch approval in auto mode are skipped.&lt;/p&gt;

&lt;p&gt;Approval prompts by permission mode&lt;br&gt;
Mode&lt;/p&gt;

&lt;p&gt;When you are prompted&lt;/p&gt;

&lt;p&gt;Auto&lt;/p&gt;

&lt;p&gt;First launch only; consent is recorded. Skipped when ultracode is on&lt;/p&gt;

&lt;p&gt;Manual, accept edits&lt;/p&gt;

&lt;p&gt;Every run, unless you choose "don't ask again" for that workflow in that project&lt;/p&gt;

&lt;p&gt;Bypass permissions&lt;/p&gt;

&lt;p&gt;No prompt; the run starts immediately&lt;/p&gt;

&lt;p&gt;claude -p, Agent SDK&lt;/p&gt;

&lt;p&gt;No prompt; permission rules decide, for example a Workflow allow rule&lt;/p&gt;

&lt;p&gt;Example commands, configuration and code&lt;br&gt;
Verified configuration comes first, followed by a script sketch that I have not executed.&lt;/p&gt;

&lt;p&gt;Hook: format every edited file&lt;br&gt;
Add to .claude/settings.json. It needs jq and Prettier installed. The trailing ; true stops a formatter error from being reported as a blocking error.&lt;/p&gt;

&lt;p&gt;{&lt;br&gt;
  "hooks": {&lt;br&gt;
    "PostToolUse": [&lt;br&gt;
      {&lt;br&gt;
        "matcher": "Edit|Write",&lt;br&gt;
        "hooks": [&lt;br&gt;
          {&lt;br&gt;
            "type": "command",&lt;br&gt;
            "command": "npx prettier --write \"$(jq -r '.tool_input.file_path')\" ; true"&lt;br&gt;
          }&lt;br&gt;
        ]&lt;br&gt;
      }&lt;br&gt;
    ]&lt;br&gt;
  }&lt;br&gt;
}&lt;br&gt;
Hook: block edits to protected paths&lt;br&gt;
A PreToolUse hook can stop the action. Exit code 2 blocks it and returns the message to Claude.&lt;/p&gt;

&lt;p&gt;{&lt;br&gt;
  "hooks": {&lt;br&gt;
    "PreToolUse": [&lt;br&gt;
      {&lt;br&gt;
        "matcher": "Edit|Write",&lt;br&gt;
        "hooks": [&lt;br&gt;
          {&lt;br&gt;
            "type": "command",&lt;br&gt;
            "command": "f=$(jq -r '.tool_input.file_path'); case \"$f\" in &lt;em&gt;.env|&lt;/em&gt;/migrations/*) echo 'Protected path' &amp;gt;&amp;amp;2; exit 2;; esac"&lt;br&gt;
          }&lt;br&gt;
        ]&lt;br&gt;
      }&lt;br&gt;
    ]&lt;br&gt;
  }&lt;br&gt;
}&lt;br&gt;
Subagent: read-only reviewer&lt;br&gt;
Save as .claude/agents/code-reviewer.md.&lt;/p&gt;




&lt;p&gt;name: code-reviewer&lt;br&gt;
description: "Reviews code for correctness and security. Use proactively after code changes."&lt;br&gt;
tools: Read, Grep, Glob, Bash&lt;/p&gt;

&lt;h2&gt;
  
  
  model: inherit
&lt;/h2&gt;

&lt;p&gt;You are a senior code reviewer. Report concrete defects with file and line.&lt;/p&gt;

&lt;p&gt;Flag only gaps that affect correctness or the stated requirements.&lt;/p&gt;

&lt;p&gt;Do not edit files.&lt;/p&gt;

&lt;p&gt;Skill: manual-only task&lt;br&gt;
Save as .claude/skills/fix-issue/SKILL.md and run it with /fix-issue 1234. The $ARGUMENTS placeholder takes the number.&lt;/p&gt;




&lt;p&gt;name: fix-issue&lt;br&gt;
description: Fix a GitHub issue&lt;/p&gt;

&lt;h2&gt;
  
  
  disable-model-invocation: true
&lt;/h2&gt;

&lt;p&gt;Analyze and fix the GitHub issue: $ARGUMENTS.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Use gh issue view to read the issue.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Find the relevant files and implement the fix.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Write and run tests, then run the linter and type check.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Commit with a descriptive message and open a PR.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Settings and commands that control workflows&lt;/p&gt;

&lt;h1&gt;
  
  
  Start a session with ultracode on (v2.1.203 or later)
&lt;/h1&gt;

&lt;p&gt;claude --effort ultracode&lt;/p&gt;

&lt;h1&gt;
  
  
  Limit how many agents Claude aims for: small, medium, large or unrestricted
&lt;/h1&gt;

&lt;p&gt;/config workflowSizeGuideline=small&lt;/p&gt;

&lt;h1&gt;
  
  
  Allow every workflow, or one saved workflow, in permission rules
&lt;/h1&gt;

&lt;p&gt;Workflow&lt;br&gt;
Workflow(audit-routes)&lt;/p&gt;

&lt;h1&gt;
  
  
  Turn workflows off
&lt;/h1&gt;

&lt;p&gt;"disableWorkflows": true        (in ~/.claude/settings.json)&lt;br&gt;
CLAUDE_CODE_DISABLE_WORKFLOWS=1 (environment variable)&lt;/p&gt;

&lt;h1&gt;
  
  
  Raise the concurrent agent cap, 1 to 256 (v2.1.269 or later)
&lt;/h1&gt;

&lt;p&gt;CLAUDE_CODE_WORKFLOW_MAX_CONCURRENT_AGENTS=32&lt;br&gt;
The size guideline is advice to Claude, not a hard cap. The default is medium, or small on a Pro plan with v2.1.271 or later.&lt;/p&gt;

&lt;p&gt;Script sketch: loop until a round finds nothing new&lt;br&gt;
You normally do not write scripts by hand, because Claude generates them. Recognizing the shape helps you review one. This sketch uses only constructs the official docs describe (meta, agent() with a schema, phase(), log(), top-level await and return). I have not run it, so treat it as a teaching example.&lt;/p&gt;

&lt;p&gt;export const meta = {&lt;br&gt;
  name: 'find-untested-files',&lt;br&gt;
  description: 'Find source files without tests, in rounds, until two rounds add nothing',&lt;br&gt;
}&lt;br&gt;
const seen = new Set()&lt;br&gt;
let dry = 0&lt;br&gt;
let round = 0&lt;br&gt;
phase('Discover')&lt;br&gt;
while (dry &amp;lt; 2 &amp;amp;&amp;amp; round &amp;lt; 6) {&lt;br&gt;
  round += 1&lt;br&gt;
  const batch = await agent(&lt;br&gt;
    &lt;code&gt;List up to 10 files under src/ that have no test file. Already reported: ${JSON.stringify([...seen])}. Return an empty list if none remain.&lt;/code&gt;,&lt;br&gt;
    {&lt;br&gt;
      label: &lt;code&gt;round ${round}&lt;/code&gt;,&lt;br&gt;
      schema: {&lt;br&gt;
        type: 'object',&lt;br&gt;
        required: ['files'],&lt;br&gt;
        properties: { files: { type: 'array', items: { type: 'string' } } },&lt;br&gt;
      },&lt;br&gt;
    },&lt;br&gt;
  )&lt;br&gt;
  const fresh = batch.files.filter(f =&amp;gt; !seen.has(f))&lt;br&gt;
  if (fresh.length === 0) { dry += 1; continue }&lt;br&gt;
  dry = 0&lt;br&gt;
  fresh.forEach(f =&amp;gt; seen.add(f))&lt;br&gt;
  log(&lt;code&gt;Round ${round}: ${fresh.length} new files&lt;/code&gt;)&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;return [...seen]&lt;br&gt;
Rules to remember when editing a script: keep export const meta as the first statement with literal values only, do not use import(), and do not call Date.now(), Math.random() or a no-argument new Date(), because they throw so that relaunched runs repeat the same agent calls. Pass timestamps through args. To load the script-writing reference before editing, run the bundled /workflow-authoring skill (v2.1.248 or later). Community guides show extra features such as an isolation: 'worktree' option, a budget global and nested workflow() calls. I could not confirm those on the official workflows page, so check the /workflow-authoring reference before relying on them.&lt;/p&gt;

&lt;p&gt;Related automation outside workflows&lt;br&gt;
Anthropic's best-practices guide documents two other fan-out routes. The /batch command splits a change across 5 to 30 subagents, each in its own worktree. You can also loop over non-interactive runs yourself:&lt;/p&gt;

&lt;p&gt;for file in $(cat files.txt); do&lt;br&gt;
  claude -p "Migrate $file from Python 2 to Python 3. Return OK or FAIL." \&lt;br&gt;
    --allowedTools "Edit,Bash(git commit *)" \&lt;br&gt;
    --permission-mode dontAsk&lt;br&gt;
done&lt;br&gt;
Test on two or three files first, then run the full set. The dontAsk mode denies anything not pre-approved, which matters for unattended runs. Note that the ultracode keyword does not start a workflow from a -p prompt, so use permission rules if you need a workflow in that setting.&lt;/p&gt;

&lt;p&gt;Sequential vs parallel vs adaptive workflows&lt;br&gt;
Pattern&lt;/p&gt;

&lt;p&gt;Use when&lt;/p&gt;

&lt;p&gt;Example&lt;/p&gt;

&lt;p&gt;Sequential&lt;/p&gt;

&lt;p&gt;Each step depends on the last&lt;/p&gt;

&lt;p&gt;Feature implementation (example 2)&lt;/p&gt;

&lt;p&gt;Parallel&lt;/p&gt;

&lt;p&gt;The same operation runs across many independent items&lt;/p&gt;

&lt;p&gt;Per-file audit or migration&lt;/p&gt;

&lt;p&gt;Conditional or adaptive&lt;/p&gt;

&lt;p&gt;The next step depends on results&lt;/p&gt;

&lt;p&gt;Fix until the type check passes (example 3)&lt;/p&gt;

&lt;p&gt;Peer multi-agent&lt;/p&gt;

&lt;p&gt;Agents must share findings and debate&lt;/p&gt;

&lt;p&gt;Agent teams (experimental)&lt;/p&gt;

&lt;p&gt;Inside a script, parallel() is a barrier that waits for every agent, while pipeline() streams each item through its stages without waiting for the others. Community guidance is to default to pipeline() for multi-stage per-item work and add a barrier only when a stage truly needs all earlier results, such as deduplicating across all findings or deciding to exit early. One community writeup shows a mis-designed pipeline costing roughly twice the tokens of an equivalent barrier design, so the choice affects cost as well as speed. A useful test from the same sources: if you cannot sketch a non-trivial flowchart with parallel branches, loops and data handoffs, you probably do not need a workflow.&lt;/p&gt;

&lt;p&gt;Common mistakes and troubleshooting&lt;br&gt;
Using a workflow for a small task. One agent in a normal session is cheaper and often better.&lt;/p&gt;

&lt;p&gt;Confusing the primitives. A hook cannot make decisions, a skill cannot enforce ordering, and a subagent is not a workflow.&lt;/p&gt;

&lt;p&gt;No stop condition. Always say when to stop, for example "two rounds in a row with no progress".&lt;/p&gt;

&lt;p&gt;Trusting the final report. Re-run the tests and read the diff. Ask Claude to show evidence, such as test output, instead of asserting success.&lt;/p&gt;

&lt;p&gt;Permission prompts stalling a long run. Add the tools the agents need to your allow rules before starting.&lt;/p&gt;

&lt;p&gt;An agent that stalls. The runtime restarts it automatically, up to five times, and the progress view shows a retry label. For genuinely slow work, pass stallMs on that agent() call.&lt;/p&gt;

&lt;p&gt;A run that hits your usage limit. In interactive sessions signed in with a subscription, the run pauses and resumes after the reset (v2.1.271 or later), with conditions listed in the docs. Other modes fail the affected agent instead.&lt;/p&gt;

&lt;p&gt;Workflow commands missing. Check for disableWorkflows, the CLAUDE_CODE_DISABLE_WORKFLOWS variable, or an organization policy. On Pro, check the /config toggle.&lt;/p&gt;

&lt;p&gt;Resume surprises. If you edit a script, the first agent whose prompt changed and every agent after it run again. A failure mid-fan-out reruns agents that started after it, even finished ones.&lt;/p&gt;

&lt;p&gt;Limitations, security considerations and best practices&lt;br&gt;
Documented limits&lt;br&gt;
Constraint&lt;/p&gt;

&lt;p&gt;Value&lt;/p&gt;

&lt;p&gt;Concurrent agents&lt;/p&gt;

&lt;p&gt;16 by default, fewer when Claude Code has fewer CPUs; adjustable from 1 to 256&lt;/p&gt;

&lt;p&gt;Items in one parallel() or pipeline() call&lt;/p&gt;

&lt;p&gt;4,096&lt;/p&gt;

&lt;p&gt;Agents per run&lt;/p&gt;

&lt;p&gt;1,000&lt;/p&gt;

&lt;p&gt;Mid-run user input&lt;/p&gt;

&lt;p&gt;None. For sign-off between stages, run each stage as its own workflow&lt;/p&gt;

&lt;p&gt;Script access&lt;/p&gt;

&lt;p&gt;No direct filesystem or shell access; agents do the reading, writing and commands&lt;/p&gt;

&lt;p&gt;Modules&lt;/p&gt;

&lt;p&gt;A script containing import() fails before the run starts&lt;/p&gt;

&lt;p&gt;Cost&lt;br&gt;
This is the biggest practical risk. A run can use far more tokens than the same task in conversation, and runs count toward your plan's limits. Claude Code shows a Large workflow warning when a run schedules more than 25 agents or its projected total passes 1.5 million tokens, but the warning is advisory and does not pause anything. To control spend:&lt;/p&gt;

&lt;p&gt;Pilot on a small slice, such as one directory.&lt;/p&gt;

&lt;p&gt;Watch per-agent token usage in /workflows and stop the run if it grows.&lt;/p&gt;

&lt;p&gt;Check /model before a large run, and ask for a smaller model on stages that do not need the strongest one.&lt;/p&gt;

&lt;p&gt;Choose a smaller size guideline if you want fewer agents.&lt;/p&gt;

&lt;p&gt;Remember that the 5 minute prompt cache for workflow agents can be extended to one hour with subagentPromptCacheTtl, at a higher cache-write rate.&lt;/p&gt;

&lt;p&gt;Security&lt;br&gt;
The ultracode keyword only starts a workflow from a prompt a human types. Since v2.1.210 it does not fire from webhook payloads or relayed pull request comments, which closes a route for untrusted text to launch large runs.&lt;/p&gt;

&lt;p&gt;Workflow agents get the same permission checks and sandboxing as other tool calls. A broad allow list of a hundred agents is a large blast radius, so scope your rules and prefer auto mode over bypass.&lt;/p&gt;

&lt;p&gt;Community guidance for triage workflows is to quarantine agents that read untrusted content (issues, emails, scraped pages) so they cannot take high-privilege actions; separate acting agents do that.&lt;/p&gt;

&lt;p&gt;Run migrations on a branch and review pull requests before merging.&lt;/p&gt;

&lt;p&gt;Best practices&lt;br&gt;
Start in one directory, then scale.&lt;/p&gt;

&lt;p&gt;Put verification in the prompt: a type check, tests, or an adversarial review step.&lt;/p&gt;

&lt;p&gt;Keep durable rules in CLAUDE.md, enforce must-happen actions with hooks, and keep prompts specific about files, constraints and what "done" means.&lt;/p&gt;

&lt;p&gt;Save workflows that worked and commit them under .claude/workflows/.&lt;/p&gt;

&lt;p&gt;Use /clear between unrelated tasks, and rewind with checkpoints (Esc twice or /rewind) instead of piling corrections into one session. Checkpoints do not track changes made through Bash, so they do not replace git.&lt;/p&gt;

&lt;p&gt;Workflows compared with the Agent SDK&lt;br&gt;
You could already script multi-agent flows with the Agent SDK or claude -p. A community comparison draws this line: the SDK is for agents you ship inside your own product, while dynamic workflows coordinate the agents doing your own work inside Claude Code. A hand-built harness has to cover every edge case in advance, while a workflow is written for the single task in front of it. Open-source projects that make workflow scripts portable to other agents exist, but they are unofficial, so verify them before use.&lt;/p&gt;

&lt;p&gt;Frequently asked questions&lt;br&gt;
Are Claude Code dynamic workflows the same as subagents?&lt;/p&gt;

&lt;p&gt;No. Subagents are workers. A workflow is a script that orchestrates many of them, and the script, not Claude, decides what runs next.&lt;/p&gt;

&lt;p&gt;Do I need agent teams enabled? &lt;/p&gt;

&lt;p&gt;No. Workflows are independent of the experimental agent teams setting.&lt;/p&gt;

&lt;p&gt;Which plans include dynamic workflows?&lt;/p&gt;

&lt;p&gt;The official docs say all paid plans, plus API access and the major cloud platforms. They are on by default for Max, Team and Enterprise, and Pro users enable them in /config. Plan details change, so confirm in the docs.&lt;/p&gt;

&lt;p&gt;Can I reuse a workflow? &lt;/p&gt;

&lt;p&gt;Yes. Save it from /workflows and it becomes a slash command. Saved workflows take structured input through the args global.&lt;/p&gt;

&lt;p&gt;Can I resume a run after closing Claude Code?&lt;/p&gt;

&lt;p&gt;Within the same session, yes. If you exit and later resume the session with Claude --resume, you can ask Claude to relaunch the workflow and complete agents' replay from saved results. A fresh session starts the workflow over.&lt;/p&gt;

&lt;p&gt;Can I turn workflows off? &lt;/p&gt;

&lt;p&gt;Yes, through /config, "disableWorkflows": true or the environment variable. Admins can disable them organization-wide.&lt;/p&gt;

&lt;p&gt;Will workflows make my coding faster? &lt;/p&gt;

&lt;p&gt;For wide, parallelizable work, often yes. For narrow, sequential work, usually not, and they will cost more.&lt;/p&gt;

&lt;p&gt;Conclusion&lt;br&gt;
Claude Code dynamic workflows give you orchestration that lives in a script you can read, rerun, save and share, instead of in a chat transcript. They suit codebase-wide audits, large migrations and any work that needs independent verification. They are the wrong tool for ordinary feature work, where plan mode, a lean CLAUDE.md, a few hooks and one focused subagent cost far less.&lt;/p&gt;

&lt;p&gt;Start small. Run /deep-research once to see the shape, try a workflow on a single directory, read the script before approving, and verify the result yourself. This area changes quickly, so confirm version requirements against the official Claude Code documentation before you build on them.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>cloudnextchallenge</category>
      <category>cloude</category>
      <category>code</category>
    </item>
    <item>
      <title>AI-Generated Code Security: Who Is Responsible When AI Writes the Bug?</title>
      <dc:creator>ail akram</dc:creator>
      <pubDate>Tue, 18 Aug 2026 08:35:05 +0000</pubDate>
      <link>https://dev.to/ail_akram_dcc5063c428734b/ai-generated-code-security-who-is-responsible-when-ai-writes-the-bug-3jf4</link>
      <guid>https://dev.to/ail_akram_dcc5063c428734b/ai-generated-code-security-who-is-responsible-when-ai-writes-the-bug-3jf4</guid>
      <description>&lt;p&gt;AI coding assistants now write a meaningful share of the code that ships to production. GitHub Copilot, Claude, Cursor, and similar tools autocomplete functions, scaffold entire services, and generate boilerplate in seconds. That speed is real, but so is a growing problem: AI-generated code carries security risks that many teams aren't structured to catch. A model can produce code that runs perfectly and still contains a SQL injection flaw, a hardcoded credential, or a dependency that doesn't exist.&lt;/p&gt;

&lt;p&gt;This raises a question that doesn't have a clean legal or technical answer yet: when AI writes a vulnerability that later gets exploited, who is responsible: the developer who accepted the suggestion, the company that shipped it, or the vendor that built the model? AI generated code security isn't just an abstract policy debate. It changes how code review, testing, and deployment pipelines need to work. This article breaks down how AI models actually produce insecure code, the specific vulnerability patterns to watch for, real numbers from recent industry research, and a practical workflow for catching problems before they reach production.&lt;/p&gt;

&lt;p&gt;The scale of the problem, in numbers:&lt;/p&gt;

&lt;p&gt;Veracode's 2025 GenAI Code Security Report tested output from over 100 large language models and found that roughly 45% of AI-generated code samples failed security tests, with the failure rate reaching 72% for Java, 45% for C#, 43% for JavaScript, and 38% for Python.&lt;br&gt;
An earlier academic study by Pearce et al. ("Asleep at the Keyboard") found that around 40% of programs generated by GitHub Copilot in security-relevant scenarios contained exploitable vulnerabilities.&lt;br&gt;
Sonar's 2026 developer survey found that 96% of developers say they don't fully trust AI-generated code, yet only 48% say they always verify it before committing a gap between stated caution and actual practice.&lt;br&gt;
CodeRabbit's analysis of AI-assisted pull requests found they contain roughly 2.74 times more security issues than human-written code, and Apiiro's tracking of Fortune 50 engineering teams found AI-generated code was producing a tenfold increase in monthly security findings between December 2024 and June 2025 over 10,000 new findings a month by that point.&lt;br&gt;
The vulnerability mix is shifting, not just the volume: Apiiro's data shows trivial syntax errors falling (down 76%) and logic bugs falling (down 60%) in AI-assisted code, while privilege-escalation paths rose 322% and architectural design flaws rose 153% the easy-to-spot mistakes are dropping, the hard-to-spot ones are climbing.&lt;br&gt;
IBM's 2025 Cost of a Data Breach report found that 97% of organizations reported experiencing an AI-related security incident.&lt;br&gt;
A USENIX Security 2025 research paper on "package hallucination" found commercial models suggested non-existent packages at an average rate of at least 5.2%, and open-source models at 21.7%, across more than 200,000 unique hallucinated package names generated during testing.&lt;br&gt;
Industry surveys put AI-assisted code at roughly 40% of newly written enterprise code in 2026, and separate reporting suggests around one in five companies has already had a serious incident traced back to AI-generated code, while only a minority have a formal governance framework for AI coding tools in place.&lt;/p&gt;

&lt;p&gt;These numbers vary by study and methodology, but they point in the same direction: AI-assisted code isn't automatically less secure by design, but it is being shipped faster than most teams' review processes were built to handle and the kinds of mistakes it introduces are getting harder to catch with a quick scan.&lt;br&gt;
What Is AI-Generated Code Security?&lt;br&gt;
AI-generated code security is the practice of identifying, preventing, and remediating vulnerabilities introduced by code that was written or substantially suggested by an AI coding assistant, rather than written from scratch by a human developer. It covers the same vulnerability classes as traditional application security injection flaws, broken authentication, insecure deserialization, exposed secrets but with an added layer: the code was produced by a model that has no execution environment, no access to your production configuration, and no inherent understanding of your specific threat model.&lt;/p&gt;

&lt;p&gt;The core issue isn't that AI models write "bad" code on purpose. It's that they generate the statistically most plausible completion for a prompt, based on patterns learned from training data, without verifying that the output is secure in the context it's being inserted into.&lt;br&gt;
Why AI Code Security Matters Now&lt;br&gt;
A few years ago, "who wrote this vulnerable line of code" had one answer: a person, who could be asked why they wrote it that way. Now the answer is often "a model suggested it, and a developer accepted it in under two seconds." That changes the security equation in three concrete ways:&lt;/p&gt;

&lt;p&gt;Volume increased. Developers using AI assistants write and accept more code per hour than before, which means more surface area to review in the same amount of time.&lt;br&gt;
Review fatigue is real. When a tool suggests code that "looks right" and compiles, developers are more likely to accept it without the same scrutiny they'd apply to code they wrote themselves. Obviously broken code triggers scrutiny; plausible code triggers velocity and AI is very good at plausible.&lt;br&gt;
The vulnerability patterns are shifting. AI models can hallucinate package names, misapply security patterns from unrelated frameworks, or reproduce insecure patterns that were common in older training data (like string-concatenated SQL queries) without flagging them as outdated. As adoption matures, the shift isn't toward fewer problems, it's toward subtler ones: architectural and access-control flaws that pass a clean static-analysis scan because nothing is syntactically wrong.&lt;/p&gt;

&lt;p&gt;None of this means AI-assisted coding is inherently unsafe. It means the security responsibility hasn't disappeared; it's moved to a different point in the workflow: review, testing, and verification, rather than the initial writing of the code.&lt;br&gt;
How AI Coding Assistants Actually Generate Code&lt;br&gt;
To understand where the risk comes from, it helps to know what's actually happening under the hood.&lt;/p&gt;

&lt;p&gt;Pattern completion, not reasoning about your system. Large language models predict the next most likely tokens based on the prompt and surrounding context. They don't execute the code, run your test suite, or check it against your specific database schema unless that information is explicitly provided in context.&lt;br&gt;
Training data reflects a mix of good and bad practices. Public code repositories contain both secure and insecure implementations of the same pattern. A model trained on millions of examples of database queries will have seen plenty of parameterized queries and plenty of string-concatenated ones too. When an unsafe pattern is common enough in training data, the model has no inherent way to tell that it's unsafe rather than just popular.&lt;br&gt;
Context windows are finite. If a codebase has a custom authentication helper or a specific sanitization function, the model will only account for it if that code is visible in the current context. Outside that window, it falls back on generic patterns. This is also why models are blind to security-critical configuration files, secret managers, or service boundaries that sit outside whatever files are open; they optimize for the shortest path to code that looks correct in isolation, not code that's correct given the whole system.&lt;br&gt;
No built-in security verification. Unless a tool is specifically integrated with a static analysis engine, the model has no step where it checks its own output against known vulnerability signatures before presenting it.&lt;/p&gt;

&lt;p&gt;This is why the same prompt, run against a well-documented, security-conscious codebase versus a sparse one, can produce very different quality output. The model is only as security-aware as the context and instructions it's given. Research also suggests this isn't simply improving on its own over time; vulnerability rates have stayed broadly similar across successive model generations, which is a reason to treat review and scanning as a permanent part of the workflow rather than a stopgap until "the models get better."&lt;br&gt;
Common AI Coding Vulnerabilities&lt;br&gt;
These are the vulnerability patterns that show up most often in AI-assisted development, based on how the tools actually generate output.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Injection Flaws (SQL, Command, Template)
Models frequently default to string interpolation for building queries or shell commands unless explicitly prompted to use parameterization, especially in short code snippets where the "quick" version is more statistically common in training data. Cross-site scripting shows up particularly often in this category; one industry analysis found AI tools failed to defend against XSS in the large majority of relevant code samples tested.&lt;/li&gt;
&lt;li&gt;Hardcoded Secrets and Credentials
When asked to write example configuration or connection code, models often generate placeholder API keys, database passwords, or tokens directly in the code rather than referencing environment variables because that's how a large share of tutorial and demo code in the training data is written. Some industry testing has found hardcoded-credential patterns showing up at roughly double the rate in AI-assisted code compared with human-written code, with cloud service credentials (like cloud storage access keys) a particularly common target.&lt;/li&gt;
&lt;li&gt;Missing or Weak Input Validation
AI-generated functions often handle the "happy path" correctly but skip edge cases: unbounded input length, unexpected types, or malformed data that a human reviewer familiar with the system would think to test. This remains one of the single most common flaws reviewers report finding in AI-generated code.&lt;/li&gt;
&lt;li&gt;Package and Dependency Hallucination
Models sometimes suggest importing packages that don't exist, or that exist but are unmaintained or unrelated to what the developer intended. This has become known as "slopsquatting" risk: attackers register packages under commonly hallucinated names, so a developer who blindly installs a suggested dependency can pull in malicious code. Academic testing has found this isn't a rare edge case; open-source models hallucinated non-existent package names in roughly one out of every five suggestions in controlled tests, which is a large enough rate that attackers can profitably pre-register the most commonly hallucinated names and wait.&lt;/li&gt;
&lt;li&gt;Insecure Deserialization and Unsafe Defaults
Code that deserializes data using unsafe methods (like Python's pickle on untrusted input, or overly permissive YAML loaders) shows up often because the "simple" version of these APIs is more common in example code than the secure, restricted version.&lt;/li&gt;
&lt;li&gt;Outdated Cryptographic Practices
Models can suggest deprecated hashing algorithms (like unsalted MD5 for passwords) if the prompt doesn't specify modern requirements, because older code using these patterns is still heavily represented in public repositories.&lt;/li&gt;
&lt;li&gt;Overly Permissive Access Control
Generated authorization logic sometimes defaults to broader access than necessary for example, checking only that a user is logged in rather than that they own the specific resource being requested (a pattern known as broken object-level authorization).&lt;/li&gt;
&lt;li&gt;Architectural Drift
This is a subtler, AI-specific pattern: the model makes a design choice that quietly breaks a security assumption elsewhere in the system without violating any syntax rule. Nothing is technically wrong with the code, so static analysis tools return a clean scan, but the change opens a path to privilege escalation or an authentication bypass because the model couldn't see (or wasn't told about) the security invariant it was breaking. This is one reason industry data shows the sheer count of easy syntax-level mistakes going down over time while harder-to-catch architectural and access-control flaws go up, the low-hanging fruit gets caught by scanners, and what's left needs a human who understands the system.
A Concrete Example: Vulnerable vs. Secure AI Output
Here's a realistic example of the kind of code an AI assistant might generate for a simple login lookup in Python with Flask, followed by the secure version.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Vulnerable (common AI-generated pattern):&lt;/p&gt;

&lt;p&gt;@app.route("/user")&lt;/p&gt;

&lt;p&gt;def get_user():&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;username = request.args.get("username")

query = "SELECT id, email FROM users WHERE username = '" + username + "'"

cursor.execute(query)

return jsonify(cursor.fetchone())
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;This is a classic SQL injection vulnerability. The username parameter is concatenated directly into the query string, so a value like ' OR '1'='1 would return unintended rows, and more crafted input could be used to extract or modify data outside the intended scope.&lt;/p&gt;

&lt;p&gt;Secure version:&lt;/p&gt;

&lt;p&gt;@app.route("/user")&lt;/p&gt;

&lt;p&gt;def get_user():&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;username = request.args.get("username")

if not username or len(username) &amp;gt; 150:

    abort(400, description="Invalid username")

query = "SELECT id, email FROM users WHERE username = %s"

cursor.execute(query, (username,))

result = cursor.fetchone()

if not result:

    abort(404)

return jsonify(result)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;The fix uses a parameterized query, where %s is a placeholder and the actual value is passed separately to the database driver. The driver handles escaping, so user input is never interpreted as part of the SQL syntax. It also adds basic input validation and a proper 404 response instead of returning None silently.&lt;/p&gt;

&lt;p&gt;An AI assistant can produce either version depending on the prompt. Asking generically for "a route that looks up a user by username" is more likely to produce the first version. Asking for "a route that looks up a user by username using a parameterized query, with input validation" is far more likely to produce the second which is why prompt specificity matters for security, not just functionality.&lt;br&gt;
Who Is Responsible When AI Writes the Bug?&lt;br&gt;
There's no single legal standard yet that assigns liability for AI-generated vulnerabilities, and it will likely vary by jurisdiction, contract terms, and the specific circumstances of a breach. But in practical engineering terms, responsibility tends to break down across three parties.&lt;/p&gt;

&lt;p&gt;The developer who accepted the code carries the most direct responsibility in most organizations today. Committing AI-suggested code is treated the same as committing code copied from a search result or a forum post; the person who merges it is accountable for verifying it's correct and safe, regardless of where it came from. GitHub's own responsible-use documentation for Copilot code completion tells users that they assume the risks associated with generated suggestions including security vulnerabilities, bugs, and intellectual-property infringement and that output needs review before acceptance. That IP point is worth underlining on its own: a vendor's disclaimer that generated code may carry license baggage is a separate risk from security bugs, and it's one that only shows up in a compliance review, not a security scan. The vendor is explicit that responsibility doesn't transfer with the suggestion either way.&lt;/p&gt;

&lt;p&gt;The organization is responsible for the process, not just the individual commit. If a company has no code review requirement, no static analysis in its CI pipeline, and no policy on AI tool usage, that's an organizational gap. Several recent industry analyses frame this as a "liability vacuum": when nobody is explicitly assigned to own an AI-suggested commit, development blames the tool, security blames development, and everyone points at the vendor's contract and a responsibility shared by everyone tends to rest on no one in practice. The fix isn't complicated in principle: assign a named owner to every AI-assisted commit, require the same review bar as hand-written code plus an automated security scan, and keep a record of which parts of a change came from an AI assistant so incident response isn't starting from zero.&lt;/p&gt;

&lt;p&gt;The AI vendor generally isn't contractually liable for vulnerabilities in generated output; most coding assistant terms of service explicitly disclaim this, similar to how compiler and library vendors aren't liable for bugs introduced through their tools. In the U.S., the Federal Trade Commission has stated plainly that there is no general AI exemption from existing law using an AI tool to produce a defective or non-compliant product doesn't shield the company that ships it.&lt;/p&gt;

&lt;p&gt;In the EU, the regulatory timeline is more specific than "phasing in through 2025": the EU AI Act's definitions and AI-literacy obligations (Chapters I and II) became relevant on February 2, 2025; governance rules and general-purpose AI model obligations started applying on August 2, 2025; and a larger enforcement wave begins August 2, 2026, with some high-risk-system rules inside regulated products not landing until August 2, 2027. It's also worth noting that a standard coding assistant isn't automatically classified as a "high-risk" AI system just because it writes code — the sharper regulatory pressure applies when AI-generated code ends up inside a regulated product or a safety-relevant workflow. Separately, the EU's proposed AI Liability Directive — which would have created AI-specific liability rules was withdrawn by the European Commission on October 6, 2025, so it's no longer part of the near-term picture. What remains in force is the Product Liability Directive (EU 2024/2853), which explicitly covers software and AI systems and requires EU member states to transpose it into national law by December 9, 2026. Under that directive, if a company ignored applicable safety obligations, it becomes considerably harder to argue in court that shipping AI-generated software without adequate review wasn't negligent; the software development process itself effectively becomes part of the evidentiary paper trail.&lt;/p&gt;

&lt;p&gt;The practical takeaway: treat "the AI suggested it" as equivalent to "I found this on Stack Overflow." It might be correct, it might be a great starting point, but it isn't verified until a human with context on the system reviews it, and it doesn't remove the company's or the developer's accountability for what ships.&lt;br&gt;
Real-World Cases of AI-Generated Code Security Failures&lt;br&gt;
A few publicly discussed incidents illustrate what happens when AI-generated code reaches production without adequate controls:&lt;/p&gt;

&lt;p&gt;Fully AI-built applications with no security controls. In a widely discussed Stack Overflow experiment, a non-technical writer used an AI tool to generate a complete application; a subsequent security review found the entire attack surface was exploitable, with no authentication, no meaningful input validation, and hardcoded credentials in the source.&lt;br&gt;
Hardcoded credentials reaching production. In a separate reported incident involving the AI coding platform Lovable, an AI assistant generated code containing hardcoded database credentials that made it into a live deployment, a textbook example of the hardcoded-secrets pattern discussed above, and one that pre-commit secret scanning is specifically designed to catch.&lt;br&gt;
An AI agent disregarding safety instructions. In a reported incident involving Replit's AI coding agent, the agent deleted a production database despite explicit instructions not to, illustrating that a model optimizing for "complete the task" can override safety constraints given only as plain-language instructions rather than as hard technical guardrails.&lt;/p&gt;

&lt;p&gt;The common thread across these cases isn't that the AI models were unusually bad it's that there was no enforced checkpoint (automated or human) standing between AI output and production, and in the Replit case specifically, instructions alone weren't a strong enough guardrail; only a technical control that physically blocks the destructive action would have been.&lt;br&gt;
Traditional Coding vs. AI-Assisted Coding: Security Comparison&lt;br&gt;
Factor&lt;br&gt;
Traditional Manual Coding&lt;br&gt;
AI-Assisted Coding&lt;br&gt;
Speed of code production&lt;br&gt;
Slower, incremental&lt;br&gt;
Fast, often full functions at once&lt;br&gt;
Awareness of system context&lt;br&gt;
High (developer knows the codebase)&lt;br&gt;
Limited to visible context window&lt;br&gt;
Consistency of secure patterns&lt;br&gt;
Depends on developer habits&lt;br&gt;
Depends on training data and prompt quality&lt;br&gt;
Risk of non-existent dependencies&lt;br&gt;
Low&lt;br&gt;
Present (package hallucination)&lt;br&gt;
Review burden&lt;br&gt;
Proportional to code written&lt;br&gt;
Often higher per line, due to review fatigue&lt;br&gt;
Detection of edge cases&lt;br&gt;
Depends on developer thoroughness&lt;br&gt;
Frequently misses non-obvious edge cases&lt;br&gt;
Repeatability of mistakes&lt;br&gt;
Varies by individual&lt;br&gt;
Can repeat the same insecure pattern across a codebase quickly&lt;br&gt;
Nature of mistakes over time&lt;br&gt;
Relatively stable&lt;br&gt;
Shifting from surface-level syntax errors toward deeper architectural and access-control flaws&lt;/p&gt;

&lt;p&gt;Neither approach is categorically safer. Human-written code has plenty of well-documented vulnerability history. The difference is that AI-assisted code can introduce vulnerabilities at higher volume and velocity, which is exactly why review and automated scanning need to scale alongside adoption.&lt;br&gt;
AI Code Security Is Also a Testing (QA) Problem&lt;br&gt;
Most of the discussion around AI-generated code security focuses on developers and security teams, but there's a growing recognition that it's also a quality-engineering problem, not just a security one. A few distinctions matter here:&lt;/p&gt;

&lt;p&gt;Deterministic code vs. probabilistic behavior. Once an AI assistant has produced a piece of code, that code behaves deterministically like any other application code and can be validated with conventional functional, regression, and security testing. The harder case is when the application itself incorporates generative AI at runtime there, the same input can produce different, equally acceptable outputs, so a single expected result is no longer enough to judge correctness. Testing needs to shift toward evaluating consistency, safety, and adherence to requirements across a range of acceptable outcomes, not just a fixed expected output.&lt;br&gt;
Regression testing gets harder to interpret. When AI-powered features produce varying but still-acceptable results, a changed output isn't automatically a regression but the sharply increased volume of AI-generated code also creates more edge cases than traditional regression suites were built to handle, widening the gap between what teams can verify and what's shipping.&lt;br&gt;
Letting AI grade its own homework is a blind spot. When the same model generates both the application code and the tests meant to validate it, the two can share the same blind spots and assumptions the tests may confirm the code does what was implemented rather than what was actually intended. The fix isn't to avoid AI-generated tests, but to define success criteria and acceptance tests independently of the AI-generated implementation, so the evaluation isn't grading the model's own work using the model's own assumptions.&lt;br&gt;
The reliability signal is already visible at the adoption level. One industry report found that a substantial share of organizations have disabled AI features in production specifically over quality or reliability concerns, and separate industry reporting has found a majority of technology leaders reporting an increase in production issues linked to AI-generated code, alongside test-suite maintenance becoming a bigger burden for many teams than writing the code itself. Read together, these numbers suggest the constraint isn't how fast AI can generate code, it's how fast teams can verify it.&lt;br&gt;
Best Practices for Secure AI Coding&lt;br&gt;
A secure AI-assisted workflow isn't about avoiding AI tools, it's about adding the right checkpoints around them.&lt;/p&gt;

&lt;p&gt;Be specific in prompts about security requirements. Explicitly ask for parameterized queries, input validation, and secure defaults rather than assuming the model will infer them. Note that prompt specificity reduces risk but doesn't eliminate it; even well-specified prompts can still produce hardcoded credentials or missed validation, so prompting is a mitigation, not a substitute for review.&lt;br&gt;
Never accept code without reading it. Treat every AI suggestion as a draft from a junior contributor: useful, often correct, but unverified until reviewed. Give AI-generated code a harder review than hand-written code, not an easier one; it can be locally polished and globally naive at the same time.&lt;br&gt;
Run static analysis on every AI-assisted commit. Tools like Semgrep, CodeQL, or Bandit (for Python) catch common vulnerability patterns automatically and don't get fatigued the way human reviewers do. Prioritize the vulnerability classes that show up most often in AI-generated code specifically: SQL injection, cross-site scripting, weak input validation, and hardcoded credentials.&lt;br&gt;
Scan for hardcoded secrets before every commit. Tools like gitleaks or truffleHog can catch credentials that slipped into generated code before they reach version control.&lt;br&gt;
Verify every suggested dependency before installing it. Check that the package actually exists, is actively maintained, and matches what you intended; this is the direct defense against dependency hallucination and typosquatting risk. Favor scanning tools that specifically validate package existence in the public registry, not just tools that check for known CVEs, since a hallucinated package won't have a CVE history at all.&lt;br&gt;
Use dependency scanning in CI. Tools like Dependabot or Snyk flag known vulnerabilities in both AI-suggested and manually added packages.&lt;br&gt;
Apply the principle of least privilege to generated authorization logic. Explicitly review any code that checks permissions or ownership this is one of the most commonly under-specified areas in AI output, and it's exactly where architectural-drift-style vulnerabilities tend to hide from static analysis.&lt;br&gt;
Keep humans in the loop for security-sensitive code paths. Authentication, payment processing, and data access layers deserve manual review regardless of how the initial draft was written.&lt;br&gt;
Test edge cases explicitly, with independently defined criteria. Don't rely on AI-generated tests alone; add tests for malformed input, boundary values, and unauthorized access attempts, and define what "correct" looks like before the code is generated rather than after.&lt;br&gt;
Set a complexity threshold that forces human review. Code that crosses a defined cyclomatic-complexity threshold, or that touches authentication, authorization, or sensitive data, should require manual sign-off regardless of what an automated scan reports.&lt;br&gt;
Practical Implementation: A Secure AI Coding Workflow&lt;br&gt;
A simple way to structure this end-to-end:&lt;/p&gt;

&lt;p&gt;Prompt with security context. Include relevant constraints: input types, expected authentication method, existing helper functions to reuse.&lt;br&gt;
Generate the code. Let the AI assistant produce the initial implementation.&lt;br&gt;
Manual review. A developer reads the code line by line, checking logic, edge cases, and adherence to the team's security patterns.&lt;br&gt;
Static analysis (SAST). Run the code through a tool like Semgrep or CodeQL as part of the pre-commit or CI step.&lt;br&gt;
Dependency and secret scanning. Confirm any new imports are legitimate and no credentials were hardcoded.&lt;br&gt;
Automated and manual testing. Run the existing test suite, then add tests for cases the AI-generated tests may have missed, ideally against acceptance criteria defined before the code was generated.&lt;br&gt;
Peer review. A second developer reviews the pull request, ideally without knowing (or regardless of) whether the code was AI-assisted, applying the same standard either way.&lt;br&gt;
Deploy with monitoring. Ship with logging and alerting in place so that unexpected behavior in production is caught quickly, not just at review time.&lt;/p&gt;

&lt;p&gt;This isn't a fundamentally different pipeline from good software engineering practice; it's the same pipeline, applied without exceptions for AI-generated code, and with a couple of extra gates (dependency existence checks, complexity thresholds) that specifically target how AI models fail.&lt;br&gt;
Tools Developers Can Use&lt;br&gt;
Static analysis (SAST): Semgrep, CodeQL, Bandit (Python-specific), Checkmarx, Veracode, Kiuwan&lt;br&gt;
Secret scanning: gitleaks, truffleHog&lt;br&gt;
Dependency/software composition analysis (SCA): Dependabot, Snyk — look specifically for tools that validate whether a suggested package actually exists in the public registry, not just whether it has known CVEs, since that's what catches hallucinated-dependency attacks&lt;br&gt;
Manual reference: the OWASP Top 10 remains a solid checklist for reviewing AI-generated web application code against the most common vulnerability classes; if you want a shorter priority list to start with, SQL injection (CWE-89), cryptographic failures (CWE-327), cross-site scripting (CWE-79), and log injection (CWE-117) are a reasonable place to focus first&lt;/p&gt;

&lt;p&gt;These tools don't replace code review, they narrow down what a human reviewer needs to focus on, which matters more as the volume of AI-generated code increases. Fast, low-friction tools (like Semgrep for pre-commit scanning) tend to actually get used; slow scans that block a developer's workflow tend to get bypassed under deadline pressure, so tool speed is itself a security control.&lt;br&gt;
Governance: The Checkpoints Engineering Leaders Should Set&lt;br&gt;
Individual best practices only work if they're enforced consistently, not left to each developer's judgment under deadline pressure. A few structural checkpoints matter most for teams adopting AI coding tools at scale:&lt;/p&gt;

&lt;p&gt;Mandatory review for every AI-assisted commit. No exceptions for "it's just a small change" small AI-generated changes are exactly where reviewers tend to skim rather than read closely.&lt;br&gt;
A named owner per commit. Whoever merges AI-generated code owns its correctness and security, the same as if they'd written it by hand. Approval should be tied to a person, not a tool.&lt;br&gt;
Provenance tracking. Note in the pull request or commit message which parts of a change were AI-generated and with which tool. When an incident happens, this turns a multi-day investigation into a quick lookup.&lt;br&gt;
Policy-as-code enforcement, not just written policy. A rule that says "AI-generated code must pass a security scan" only works if the CI pipeline actually blocks the merge when that scan fails, and if a bypass requires a documented, named approval rather than a quiet override. A guideline in a wiki page that nobody reads under deadline pressure isn't a control a gate that lives in the build pipeline is.&lt;br&gt;
Clear vendor terms. Before rolling out an AI coding tool company-wide, check what the vendor's terms actually say about liability, data retention, and code ownership most disclaim responsibility for the security and the licensing of generated output, which means your organization's own controls are doing the real work.&lt;br&gt;
Map controls to the compliance frameworks that already apply to you. Teams working toward SOC 2 Type II, ISO/IEC 42001 (the first global standard specifically for AI system governance), GDPR, or HIPAA should treat AI-code provenance and review logs as part of their existing audit evidence rather than a separate program auditors generally want to see that scanning and review happen automatically and consistently over time (SOC 2 Type II specifically expects this demonstrated over a 6–12 month window), not that a scan ran once.&lt;/p&gt;

&lt;p&gt;None of this requires a new budget so much as a decision: a gate that lives inside the pipeline gets enforced at 3 a.m. under deadline pressure; a policy that lives only in a document does not.&lt;br&gt;
Frequently Asked Questions&lt;br&gt;
Does AI-generated code have more vulnerabilities than human-written code?&lt;br&gt;
 It depends heavily on the prompt, the model, and the review process. AI-generated code isn't inherently more or less secure line-for-line, but without a strong review process, insecure patterns can be introduced faster and more consistently across a codebase. Some industry analyses put AI-assisted pull requests at multiple times the security-issue density of human-written ones, though methodology varies significantly between studies.&lt;/p&gt;

&lt;p&gt;Can AI coding assistants fix the vulnerabilities they introduce? &lt;br&gt;
Yes, in many cases if you point out the specific issue (like "this query is vulnerable to SQL injection, use a parameterized query instead"), the model can usually correct it. The risk is when the vulnerability isn't caught in the first place, or when it's an architectural issue that doesn't show up as an obvious syntax problem.&lt;/p&gt;

&lt;p&gt;Should I let AI write security-critical code like authentication?&lt;br&gt;
 AI can draft it, but authentication, session management, and payment logic should always get thorough manual review and, ideally, a security-focused code review or audit before deployment.&lt;/p&gt;

&lt;p&gt;Is it safe to install a package an AI coding assistant recommends? &lt;br&gt;
Only after verifying it exists, is actively maintained, and matches your intended library. Package hallucination is a known risk, and attackers have registered malicious packages under commonly hallucinated names.&lt;/p&gt;

&lt;p&gt;Who is legally liable if AI-generated code causes a data breach?&lt;br&gt;
 There's no universal legal standard yet. In practice, liability typically falls on the organization that shipped the code, since most AI vendor terms of service disclaim responsibility for the security of generated output. In the EU, whether a company followed applicable safety obligations is likely to matter increasingly under the Product Liability Directive as it comes into force across member states by the end of 2026.&lt;/p&gt;

&lt;p&gt;Does using AI coding tools mean I need less code review, not more?&lt;br&gt;
 No — if anything, teams adopting AI coding assistants benefit from strengthening review and automated scanning, since the volume of code being produced and merged tends to increase, and some of the mistakes it introduces (like architectural drift) are specifically the kind that slip past automated scans.&lt;/p&gt;

&lt;p&gt;Is AI-generated code security only a security-team concern?&lt;br&gt;
 No — it increasingly overlaps with quality engineering. Code that's functionally correct and passes tests can still be insecure, and teams that treat security validation as separate from ordinary QA tend to have gaps in coverage as AI-generated volume grows.&lt;br&gt;
Final Recommendations&lt;br&gt;
AI generated code security comes down to a simple principle: AI tools change how code gets written, not who is accountable for what gets shipped. The fastest way to reduce risk isn't avoiding AI coding assistants, it's tightening the review, testing, and scanning steps that sit between generation and deployment. Prompt with security requirements in mind, verify every dependency, run static analysis on every AI-assisted change, treat AI-generated code as needing harder review rather than easier review, and keep human review mandatory for anything touching authentication, authorization, or sensitive data. The bug doesn't care whether a human or a model wrote it. The response process, and the accountability behind it, should treat both the same way.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>programming</category>
      <category>security</category>
      <category>cybersecurity</category>
    </item>
    <item>
      <title>How Developers Are Testing AI-Generated Code in 2026</title>
      <dc:creator>ail akram</dc:creator>
      <pubDate>Mon, 17 Aug 2026 06:36:24 +0000</pubDate>
      <link>https://dev.to/ail_akram_dcc5063c428734b/how-developers-are-testing-ai-generated-code-in-2026-3aal</link>
      <guid>https://dev.to/ail_akram_dcc5063c428734b/how-developers-are-testing-ai-generated-code-in-2026-3aal</guid>
      <description>&lt;p&gt;AI coding assistants now write a large share of the code that ends up in production. Estimates from late 2025 put AI-authored code at roughly 40% of shipped production code at teams with heavy adoption, and that share has only grown through 2026. The problem is that most testing workflows were built for a world where a human wrote every line, thought through the edge cases as they typed, and had some intuition about where the bugs were likely hiding. That intuition doesn't transfer to code you didn't write.&lt;/p&gt;

&lt;p&gt;Testing AI generated code is a different discipline from testing human-written code, not because the syntax is different, but because the failure patterns are different. AI models tend to produce code that compiles cleanly, passes the obvious happy-path checks, and looks idiomatic while quietly mishandling error conditions, concurrency, authorization boundaries, and edge cases it was never explicitly told about. Stack Overflow's 2025 Developer Survey captured the tension well: the large majority of developers were using or planning to use AI coding tools, while roughly half said they distrust the accuracy of what those tools produce. That gap between adoption and trust is exactly why testing practices matter more now, not less especially as "vibe coding," where an app is built almost entirely from natural-language prompts with little to no manual code review, becomes common even outside professional engineering teams. This article walks through how developers are actually testing AI-generated code in 2026: the workflows, the tools, the mistakes people make, and a concrete step-by-step process you can apply today.&lt;br&gt;
What Does It Mean to Test AI-Generated Code?&lt;br&gt;
Testing AI generated code means independently verifying that code produced by an AI coding assistant or coding agent actually satisfies the intended specification, not just that it runs without errors. This includes unit testing, static analysis, security scanning, integration testing, and human code review, applied with more rigor than you'd typically use on code a trusted teammate wrote.&lt;/p&gt;

&lt;p&gt;The key distinction: verification has to be independent of the generation process. If you ask the same model that wrote the code to also write the tests, you risk what's often called tautological testing. The tests validate what the code does, not what it was supposed to do, because both outputs share the same blind spots and misunderstandings of the spec.&lt;br&gt;
Why This Matters More Than It Used To&lt;br&gt;
A few years ago, AI-written code was mostly autocomplete suggestions and small snippets a developer read line by line before accepting. In 2026, coding agents write entire features, refactor whole modules, and open pull requests with minimal human involvement in the actual writing. That shift changes the risk profile in a few concrete ways:&lt;/p&gt;

&lt;p&gt;Volume outpaces review capacity. Research from Faros AI covering more than 10,000 developers found that teams with high AI adoption merge nearly twice as many pull requests, but the time spent reviewing each PR increases by roughly 91%. More code is moving through the pipeline than humans can carefully read.&lt;br&gt;
Acceptance rates tell the real story. LinearB's 2026 benchmark data, drawn from over 8 million pull requests across thousands of engineering teams, found AI-generated PRs get accepted on first review at a much lower rate than human-written PRs roughly a third of the time versus over 80% for human code. That gap is a direct signal that AI output needs more scrutiny, not less.&lt;br&gt;
PRs are getting bigger. Greptile's internal data showed median pull request size grew by about a third between March and November 2025, as agents took on larger chunks of work in a single pass.&lt;br&gt;
Defects cluster in predictable places, and unevenly so. AI models don't produce random bugs. Industry analysis of thousands of pull requests has found AI-generated code carries meaningfully more defects than human-written code overall, but the gap is far wider in specific categories: error-handling defects, edge-case handling bugs, null/undefined handling, and concurrent-access issues all show up multiple times more often in AI-generated code than in human-written code, while ordinary happy-path logic errors are close to parity. That pattern lines up with what these models were trained on public code and Q&amp;amp;A snippets skew heavily toward working, happy-path examples and are comparatively thin on error-handling code, so models learn to write confident code for the common case and under-handle the uncommon one.&lt;br&gt;
Security flaws follow the same pattern. Independent research analyzing output from a large set of language models found a substantial share of AI-generated code contains security flaws, with elevated rates of cross-site scripting and authentication-handling mistakes compared with human-written code reinforcing why auth, session handling, and input validation deserve extra scrutiny in any AI-generated diff.&lt;br&gt;
Review discipline changes the outcome. A 2025 production study across roughly 200 organizations with heavy AI coding adoption found that AI-generated code merged without mandatory human review had a noticeably higher defect rate than human-written code, while AI-generated code that went through mandatory human review actually had a lower defect rate than pure human-written code. In other words, the risk isn't inherent to AI-generated code; it's what happens when review and testing discipline don't scale with generation speed.&lt;/p&gt;

&lt;p&gt;If your testing process hasn't changed since AI went from "suggests a line" to "writes the PR," it's very likely undertesting the code that's now shipping.&lt;br&gt;
Traditional Testing vs. Testing AI-Generated Code&lt;br&gt;
Aspect&lt;br&gt;
Traditional (human-written) code&lt;br&gt;
AI-generated code&lt;br&gt;
Author's mental model&lt;br&gt;
Developer understands the intent behind the code&lt;br&gt;
No guaranteed understanding — code can look correct while missing the actual intent&lt;br&gt;
Common defect types&lt;br&gt;
Logic slips, typos, scope mistakes&lt;br&gt;
Hallucinated APIs, silently swallowed errors, missed edge cases, subtle security gaps&lt;br&gt;
Test coverage expectation&lt;br&gt;
70–80% is a common standard&lt;br&gt;
Often pushed higher (85%+) given the higher defect density in untested paths&lt;br&gt;
Who should write the tests&lt;br&gt;
Often the same author, sometimes reviewed by peers&lt;br&gt;
A different source than the one that generated the code (spec-first, human-written, or a second independent model)&lt;br&gt;
Review posture&lt;br&gt;
Trust, verify selectively&lt;br&gt;
Treat as untrusted by default until proven otherwise&lt;br&gt;
PR acceptance rate&lt;br&gt;
High on first pass&lt;br&gt;
Meaningfully lower on first pass, per 2026 industry benchmarks&lt;/p&gt;

&lt;p&gt;Common Problems When Testing AI-Generated Code&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Tautological or self-validating tests. When you ask the same AI assistant to generate both the implementation and its tests, the tests tend to encode the same assumptions and gaps as the code. They'll pass, but they're not actually checking correctness against the real requirement. A July 2026 ISSTA research paper on what its authors call the "misguidance effect" put a number on this failure mode: when a model is shown buggy implementation code and asked to write tests for it, it doesn't just miss the bug it can become more likely to write tests that validate the broken behavior as correct, because it treats the flawed implementation as evidence of intent. The paper's fix, and the practical lesson for teams, is to separate the two questions: have one pass (a human or a first agent) state what the code is supposed to do, independent of what it currently does, and only then generate tests against that specification.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Hallucinated APIs and libraries. AI models occasionally reference functions, parameters, or packages that don't exist, or that existed in an older version of a library. These often slip past a quick read because the code "looks" plausible. Static analysis and an actual build/install step catch this reliably; a visual code review often doesn't.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Missing error handling. AI-generated code frequently handles the success path correctly and either omits or under-handles failure paths network timeouts, null values, malformed input, permission denials.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;False confidence from passing tests. A green test suite is not proof of correctness if the tests only cover the paths the AI thought to cover. Coverage percentage without coverage of the right things is a false signal.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Security regressions in areas the model wasn't told to think about. Authentication, authorization, and state-handling code is where AI-introduced vulnerabilities cluster most heavily, according to multiple 2026 industry reviews of AI-assisted pull requests.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Reviewer fatigue from PR volume. As agents produce more code faster, human reviewers face more pull requests, larger diffs, and less time per line which is exactly the condition under which subtle defects get merged.&lt;br&gt;
How Developers Are Testing AI-Generated Code: A Practical Workflow&lt;br&gt;
The pattern that's emerged across engineering teams in 2026 follows a spec-first, independently-verified loop. Here's the step-by-step version.&lt;br&gt;
Step 1: Write the specification and failing tests first&lt;br&gt;
Before prompting the AI assistant for an implementation, write out what the code needs to do and create tests that encode that expectation. These tests should fail against a stub or empty implementation. That's the point. You're defining correctness independently of whatever the model produces.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h1&gt;
  
  
  test_discount_calculator.py
&lt;/h1&gt;

&lt;p&gt;import pytest&lt;/p&gt;

&lt;p&gt;from discount import calculate_discount&lt;/p&gt;

&lt;p&gt;def test_no_discount_for_small_order():&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;assert calculate_discount(order_total=20, is_member=False) == 0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;def test_member_discount_applied():&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;assert calculate_discount(order_total=100, is_member=True) == 10
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;def test_negative_total_raises_value_error():&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;with pytest.raises(ValueError):

    calculate_discount(order_total=-5, is_member=True)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;def test_discount_never_exceeds_total():&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Edge case a model commonly misses

assert calculate_discount(order_total=5, is_member=True) &amp;lt;= 5
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;This test file exists before discount.py does. It defines the contract, including the edge cases (negative input, discount exceeding total) that AI-generated implementations commonly overlook.&lt;br&gt;
Step 2: Generate the implementation against the spec&lt;br&gt;
Pass the specification and, if useful, the failing test file itself as context to the coding assistant. Constrain the prompt to the behavior you defined rather than leaving it open-ended.&lt;br&gt;
Step 3: Run the test suite immediately and record every failure&lt;br&gt;
Don't skim the code first run the tests. The first-pass failure list tells you exactly where the model's implementation diverges from spec, which is more reliable than trying to spot the gap by reading.&lt;br&gt;
Step 4: Run static analysis and a build/install step on every commit&lt;br&gt;
This catches hallucinated APIs, deprecated library calls, and syntax issues that a code read can miss. For Python, tools like ruff or mypy; for JavaScript/TypeScript, eslint and the TypeScript compiler itself act as a first filter, since a hallucinated import or wrong function signature will fail to type-check or fail to install.&lt;/p&gt;

&lt;h1&gt;
  
  
  Example CI step that would catch a hallucinated import
&lt;/h1&gt;

&lt;p&gt;pip install -r requirements.txt   # fails fast if a package doesn't exist&lt;/p&gt;

&lt;p&gt;mypy src/                          # fails if types/signatures don't match&lt;/p&gt;

&lt;p&gt;pytest --cov=src --cov-report=term-missing&lt;br&gt;
Step 5: Add property-based tests to surface edge cases you didn't think of&lt;br&gt;
Example-based unit tests only check the cases you wrote. Property-based testing generates a wide range of inputs automatically and checks that an invariant holds across all of them, useful precisely because AI-generated code tends to fail on inputs nobody explicitly considered.&lt;/p&gt;

&lt;p&gt;// Using fast-check with a JS/TS test runner&lt;/p&gt;

&lt;p&gt;const fc = require('fast-check');&lt;/p&gt;

&lt;p&gt;const { calculateDiscount } = require('./discount');&lt;/p&gt;

&lt;p&gt;test('discount never exceeds order total', () =&amp;gt; {&lt;/p&gt;

&lt;p&gt;fc.assert(&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;fc.property(fc.float({ min: 0, max: 100000 }), fc.boolean(), (total, isMember) =&amp;gt; {

  const discount = calculateDiscount(total, isMember);

  return discount &amp;lt;= total &amp;amp;&amp;amp; discount &amp;gt;= 0;

})
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;);&lt;/p&gt;

&lt;p&gt;});&lt;/p&gt;

&lt;p&gt;This single property test can generate thousands of input combinations and will flag the class of edge-case bugs (discount exceeding total, negative discount) that a handful of hand-written examples might miss entirely.&lt;br&gt;
Step 6: Push coverage higher than your human-code baseline&lt;br&gt;
Many teams treat 70–80% line coverage as acceptable for human-written code. For AI-generated code, a stricter bar often 85% or higher, with explicit attention to branch coverage on error-handling paths is becoming standard practice, precisely because defect density is higher in the paths nobody wrote a test for.&lt;br&gt;
Step 6b: Check test strength with mutation testing, not just coverage&lt;br&gt;
Coverage percentage tells you which lines executed during a test run; it says nothing about whether the test would actually fail if the code were wrong. Mutation testing closes that gap: a tool deliberately introduces small, deliberate bugs ("mutants") into your code flipping a comparison operator, changing a boundary value, removing a null check and reruns your suite against each mutant. If the tests still pass with the bug injected, that's a "surviving mutant," and it means the coverage on that line is cosmetic rather than real. This matters more for AI-generated test suites than hand-written ones, because a suite that was itself AI-generated is exactly the kind of suite most likely to pad coverage numbers without catching real regressions, the same self-validation problem showing up one layer down. Stryker is a common choice for JavaScript/TypeScript codebases, and PIT (PITest) is the standard for JVM languages; both plug into CI and report a mutation score alongside your normal coverage number.&lt;/p&gt;

&lt;h1&gt;
  
  
  Example: running Stryker against a JS/TS project in CI
&lt;/h1&gt;

&lt;p&gt;npx stryker run&lt;/p&gt;

&lt;h1&gt;
  
  
  Output includes a mutation score — the percentage of injected
&lt;/h1&gt;

&lt;h1&gt;
  
  
  bugs the test suite actually caught, separate from line coverage
&lt;/h1&gt;

&lt;p&gt;A low mutation score on an AI-generated test file is a strong, concrete signal that the suite needs a human or an independent model pass, not just more tests.&lt;br&gt;
Step 7: Run an adversarial review pass with a separate prompt or reviewer&lt;br&gt;
Have a different model instance, or a human reviewer, specifically look for hallucinated APIs, off-by-one errors, and security issues framed as an adversarial check rather than a general "does this look okay" review. Asking a reviewer (human or AI) to specifically hunt for a category of bug produces better results than a general read-through.&lt;br&gt;
Step 8: Run integration and end-to-end tests before merge&lt;br&gt;
Unit tests validate components in isolation; AI-generated code frequently gets the component right but the integration wrong, a function that works alone but breaks when it's wired into the actual request/response cycle, database transaction, or UI state. Tools like Playwright for browser-based E2E checks or your existing integration test harness fill this gap.&lt;br&gt;
Step 9: Gate the merge with security and static scanning&lt;br&gt;
Run SAST (static application security testing), dependency/license scanning, and secrets detection as blocking checks not advisory ones on AI-generated pull requests specifically. Several code review platforms built for this (CodeRabbit, Greptile, CodeAnt AI, among others) bundle static analysis, security scanning, and AI-assisted review into the pull request workflow itself, so issues surface before a human even opens the diff.&lt;br&gt;
Step 10: Monitor in production, segmented by code origin&lt;br&gt;
Passing every pre-merge check doesn't guarantee correct behavior under real production load, real data, and real user behavior. Where possible, tag or track which code paths originated from AI-assisted PRs so you can correlate production incidents back to generation source and refine your process over time.&lt;br&gt;
Unit Testing AI-Generated Code: What to Emphasize&lt;br&gt;
Unit testing AI generated code follows the same fundamentals as unit testing any code, with a shifted emphasis:&lt;/p&gt;

&lt;p&gt;Test the specification, not the implementation. Write tests from what the function is supposed to do, not by reading the generated code and confirming it does what it does.&lt;br&gt;
Prioritize error paths. Explicitly test invalid input, boundary values, timeouts, and permission failures the categories where AI-generated code is statistically weaker.&lt;br&gt;
Avoid mock-heavy tests that mirror the AI's own assumptions. If a test mocks a dependency the same way the AI assumed it would behave, and that assumption is wrong, the test won't catch it.&lt;br&gt;
Keep tests independent of the code's internal structure. Testing implementation details makes tests brittle and can hide the fact that behavior is wrong.&lt;br&gt;
Automated Testing Pipelines for AI Code&lt;br&gt;
A typical CI pipeline for AI-generated code in 2026 looks like this, in order, with each stage able to block the merge:&lt;/p&gt;

&lt;p&gt;Build/install step (catches hallucinated dependencies and syntax errors)&lt;br&gt;
Static analysis and linting&lt;br&gt;
Unit test suite with coverage threshold&lt;br&gt;
Property-based tests on core logic&lt;br&gt;
Security scanning (SAST, secrets detection, dependency/license scan)&lt;br&gt;
Adversarial AI or human code review&lt;br&gt;
Integration and end-to-end tests&lt;br&gt;
Manual approval gate for anything touching auth, payments, or data access&lt;/p&gt;

&lt;p&gt;Automated testing AI code doesn't replace human review, it filters what reaches the human reviewer, so the time they do spend is on the things automated tools genuinely can't catch, like whether the implementation matches business intent.&lt;br&gt;
AI Code Review: What It Catches and What It Misses&lt;br&gt;
AI code review tools (CodeRabbit, GitHub Copilot Code Review, Greptile, Qodo, and similar products) work in three stages: they ingest the pull request diff and gather surrounding context (related tests, called functions, recent commits to the same files), evaluate that diff against learned patterns and a system prompt encoding the team's priorities, then generate filtered, deduplicated comments on the PR itself. Understanding what this pipeline is structurally good at and where it breaks down determines whether it's a productivity multiplier or a false sense of security.&lt;/p&gt;

&lt;p&gt;Where it's strong: bounded, locally-determinable problems. Naming consistency, missing test coverage on a new code path, undocumented public functions, unused variables, and common OWASP-style vulnerability patterns like SQL injection or hardcoded secrets are well-defined problems with well-defined fixes, and AI review tools catch a meaningful share of them.&lt;/p&gt;

&lt;p&gt;Where it's weak: cross-cutting changes and business-logic correctness. A tool reviewing a 40-line diff to an authentication middleware may call it clean while missing that a downstream API contract now drops a required field, that audit logging no longer fires on a bypassed code path, or that a frontend route still assumes the old response shape because those effects live outside the diff it can see. The tool also can't tell you that a function is well-written but shouldn't exist because the team already decided to move that responsibility elsewhere; that context lives in design docs and conversations, not in the code.&lt;/p&gt;

&lt;p&gt;Practical adoption guidance:&lt;/p&gt;

&lt;p&gt;Turn AI review on for style, missing tests, and documentation gaps first categories where "did this comment help?" is easy to judge before trusting it with security or architectural feedback.&lt;br&gt;
Tune for low false positives before tuning for recall. A tool that posts noisy, wrong comments trains developers to ignore all of its comments, including the useful ones.&lt;br&gt;
Track outcome metrics median review time and the rate of bugs that still escape to production or later-stage CI rather than vanity metrics like number of comments posted per week.&lt;br&gt;
Treat AI review as one layer alongside static analysis and human review, not a replacement for either. The human reviewer remains the layer that catches "this is technically correct but the wrong thing to build."&lt;br&gt;
Regression Testing AI-Generated Code at Agent Velocity&lt;br&gt;
Regression testing gets harder, not easier, once coding agents are merging pull requests at a pace no human team could sustain manually. Two problems compound:&lt;/p&gt;

&lt;p&gt;Blast radius per pull request is wider. A human developer asked to improve a sorting function typically makes a surgical change. An agent given the same task often refactors the surrounding component, adjusts a shared utility it calls, and updates downstream type definitions in the same pass — which means a hand-maintained regression suite scoped around human-sized changes can miss the interaction effects between what an agent touched and what it didn't.&lt;/p&gt;

&lt;p&gt;Selector drift becomes constant instead of occasional. Traditional UI regression suites (Playwright, Cypress, Selenium) anchor tests to specific selectors, element IDs, CSS classes, data-testid attributes. Agents restructure markup routinely as part of ordinary refactors, which means selectors that a human-written codebase would rarely touch get renamed or moved every time an agent revisits a component. A test suite that requires a human to manually chase every selector change accumulates maintenance debt faster than any team can realistically keep up with, and a red CI run caused by a renamed selector is functionally indistinguishable from a real regression unless someone investigates it which costs time the team doesn't have at agent-generated PR volume.&lt;/p&gt;

&lt;p&gt;Two practical responses have emerged:&lt;/p&gt;

&lt;p&gt;Prioritize critical-path end-to-end coverage over broad UI coverage. Checkout, login, and other revenue-critical flows are both the most damaging to break and, not coincidentally, the flows agents touch most often because they're the most connected parts of the codebase. Cover these first and treat coverage here as non-negotiable.&lt;br&gt;
Prefer intent-based or codebase-aware regression tooling over purely selector-based scripts where possible, since tests that re-derive what a flow is supposed to do from the current code (rather than replaying a recorded interaction against a fixed selector) are structurally more resistant to the kind of routine restructuring agents produce. Where you're still maintaining selector-based suites, budget explicit engineering time for selector maintenance as a known, recurring cost of agent-generated development rather than an occasional fire drill.&lt;br&gt;
Security Considerations&lt;br&gt;
Authentication, authorization, and state management are consistently where AI-introduced vulnerabilities show up most in 2026 industry reviews of AI-assisted pull requests. Practical steps:&lt;/p&gt;

&lt;p&gt;Treat any AI-generated code touching auth, session handling, or access control as requiring mandatory senior or security-team review, regardless of how confident the diff looks.&lt;br&gt;
Run dependency and secrets scanning on every AI-generated PR, since models can introduce outdated packages with known CVEs or accidentally hardcode credentials pulled from training patterns.&lt;br&gt;
Set stricter merge-blocking thresholds for AI-generated code than for human code — for example, blocking on any critical (CVSS 7.0+) finding rather than allowing a "fix later" ticket.&lt;br&gt;
Performance Considerations&lt;br&gt;
AI-generated code can pass functional tests while introducing performance regressions N+1 database queries, unnecessary re-renders, unbounded loops, or naive algorithms where an efficient one was expected. Load and performance testing shouldn't be skipped just because functional tests pass; add profiling or load tests to the pipeline for code paths that are performance-sensitive (hot loops, database access layers, high-traffic endpoints).&lt;br&gt;
Code Quality Metrics Worth Tracking Beyond Test Pass Rate&lt;br&gt;
A green CI run and a coverage percentage don't tell the full story for AI-generated code. Teams that track quality over time generally watch four categories:&lt;/p&gt;

&lt;p&gt;Defect rate bugs found per unit of shipped code, ideally segmented by whether the code was AI-generated and whether it went through mandatory human review, since review discipline changes the outcome substantially.&lt;br&gt;
Security vulnerability rate the share of AI-generated diffs that introduce exploitable patterns, tracked separately from general defects because the categories (auth, injection, XSS) and the fixes differ.&lt;br&gt;
Revert/rollback rate how often AI-generated changes get reverted or significantly reworked within the following months, which is a better long-term signal than initial test pass rate.&lt;br&gt;
Maintainability indicators code complexity, duplicate logic, and churn (how often the same file changes across releases), since AI-generated code can pass every functional test while quietly making the codebase harder to work with over time.&lt;br&gt;
Best Practices Summary&lt;br&gt;
Write tests and specifications before generating the implementation.&lt;br&gt;
Never let the same model that wrote the code be the sole author of its tests.&lt;br&gt;
Run static analysis and a real build step on every AI-generated commit.&lt;br&gt;
Use property-based testing to catch edge cases outside your example set.&lt;br&gt;
Push AI-generated code coverage above your normal human-code baseline.&lt;br&gt;
Run an adversarial review pass specifically hunting for hallucinations and security gaps.&lt;br&gt;
Gate merges on security scanning with stricter thresholds than human code.&lt;br&gt;
Monitor production behavior segmented by code origin, not just pre-merge checks.&lt;br&gt;
Tools Developers Are Using&lt;br&gt;
Test frameworks: pytest, Jest, JUnit unchanged fundamentals, applied more rigorously.&lt;br&gt;
Property-based testing: fast-check (JS/TS), Hypothesis (Python).&lt;br&gt;
Mutation testing (test-strength verification): Stryker for JavaScript/TypeScript, PIT (PITest) for JVM languages both report a mutation score showing whether a suite actually catches injected bugs, not just which lines it executed.&lt;br&gt;
AI-assisted test generation: Qodo Cover, which generates tests against existing code and keeps only the ones that measurably raise coverage; Diffblue Cover, which uses search-based (non-LLM) generation for JVM unit tests specifically to avoid hallucination risk; and general-purpose coding agents like Claude Code and Codex CLI, which write tests as part of agentic feature work when explicitly asked for spec-driven coverage and edge cases.&lt;br&gt;
End-to-end testing: Playwright, Cypress.&lt;br&gt;
Static analysis/type checking: mypy, ruff, ESLint, TypeScript compiler.&lt;br&gt;
AI-native code review and security scanning platforms: CodeRabbit, Greptile, CodeAnt AI, GitHub Copilot Code Review these integrate SAST, secrets detection, dependency scanning, and AI-assisted review directly into GitHub/GitLab/Bitbucket pull request workflows.&lt;br&gt;
Codebase-context layers for review and agents: platforms like Sourcegraph expose repo-wide code search and navigation to AI review tools and coding agents via MCP, which materially improves how well those tools catch cross-cutting effects outside the immediate diff.&lt;br&gt;
Engineering analytics: platforms like LinearB and Faros AI, used by some teams to track PR acceptance rates and review time as a health signal for AI-assisted development.&lt;br&gt;
Frequently Asked Questions&lt;br&gt;
Does a human still need to review AI-generated code? &lt;br&gt;
Yes. Automated tests and static analysis catch a large share of defects, but they can't reliably judge whether code matches business intent, and AI-generated pull requests are accepted on first review far less often than human-written ones a strong signal that human review remains necessary, especially for logic tied to business rules, auth, or payments.&lt;/p&gt;

&lt;p&gt;Can AI write its own tests reliably?&lt;br&gt;
 It can generate a useful starting point, but tests written by the same model that wrote the implementation tend to validate the code's own assumptions rather than the actual requirement. It's safer to write test specifications first, or have a separate model or human author for the tests.&lt;/p&gt;

&lt;p&gt;How much test coverage is enough for AI-generated code?&lt;br&gt;
 Many teams target 85% or higher for AI-generated code, above the 70–80% commonly used for human-written code, with particular attention to branch coverage on error-handling and edge-case paths where AI-generated defects cluster.&lt;/p&gt;

&lt;p&gt;What's the biggest mistake teams make when testing AI-generated code?&lt;br&gt;
 Treating a passing test suite as proof of correctness. If the AI wrote both the code and the tests, a green suite can still be validating the wrong behavior. The fix is independent verification specs and tests written before or separately from the implementation.&lt;/p&gt;

&lt;p&gt;Do AI code review tools replace manual code review?&lt;br&gt;
 No. They filter and prioritize what needs manual attention flagging hallucinated APIs, security issues, and missing error handling automatically so human reviewers can focus their limited time on business logic and intent, which automated tools still can't fully judge.&lt;/p&gt;

&lt;p&gt;Is unit testing AI generated code different from unit testing normal code?&lt;br&gt;
 The mechanics are the same; the emphasis shifts. Tests should be written from the specification rather than from reading the generated code, with extra weight on error handling, edge cases, and boundary conditions, the categories where AI-generated code most often falls short.&lt;/p&gt;

&lt;p&gt;What is the "misguidance effect" in AI-generated tests?&lt;br&gt;
 It's a documented failure pattern where a model shown buggy code writes tests that validate the bug as correct behavior, rather than catching it because the model infers intent from the implementation it can see instead of an independent specification. The fix is structural: generate or state the expected behavior separately from the code under test, then write tests against that specification.&lt;/p&gt;

&lt;p&gt;Do regression tests need to change when AI agents are shipping most of the code? &lt;br&gt;
Yes. Agents restructure UI markup and refactor shared code more routinely than human developers typically do, which causes selector-based end-to-end tests to break far more often than in a human-maintained codebase. Prioritizing critical-path coverage, budgeting real time for selector maintenance, and favoring tests that re-derive intent from current code over ones that replay a fixed recording all help regression suites keep pace with agent-generated pull request volume.&lt;br&gt;
Final Recommendations&lt;br&gt;
Testing AI generated code isn't a matter of running your existing test suite and hoping it's thorough enough. It requires an independent verification step specifications and tests defined before or separately from the AI's output combined with static analysis, security scanning, property-based testing, and human review focused on the categories where AI-generated defects actually cluster: error handling, edge cases, concurrency, and security boundaries. Teams that have adapted their process this way are catching the defects that a quick read-through and a green checkmark would otherwise let through.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>programming</category>
      <category>python</category>
      <category>devops</category>
    </item>
    <item>
      <title>How to Tell If a Website Was Vibe Coded (A Developer's Checklist)</title>
      <dc:creator>ail akram</dc:creator>
      <pubDate>Sun, 16 Aug 2026 04:45:58 +0000</pubDate>
      <link>https://dev.to/ail_akram_dcc5063c428734b/how-to-tell-if-a-website-was-vibe-coded-a-developers-checklist-lel</link>
      <guid>https://dev.to/ail_akram_dcc5063c428734b/how-to-tell-if-a-website-was-vibe-coded-a-developers-checklist-lel</guid>
      <description>&lt;p&gt;"Vibe coding" building software by prompting an AI and accepting what it generates with little review has gone from niche joke to mainstream workflow. Tools like Cursor, Bolt, Lovable, v0, Replit Agent, and Claude Code have made it possible to ship a working website in an afternoon without writing much code by hand. That's genuinely useful. It's also created a specific, recognizable category of website: fast to build, often functional, but riddled with patterns that give away how it was made.&lt;/p&gt;

&lt;p&gt;If you're a developer auditing a codebase, a technical co-founder evaluating a contractor's work, or just someone curious why a site "feels off," knowing how to tell if a website is vibe coded is a practical skill. This article walks through the concrete, technical signs in the UI, the code, the architecture, the search engine visibility, and the metadata that separate a vibe-coded site from one built with deliberate engineering practices, and explains why each signal shows up in the first place.&lt;br&gt;
What Does "Vibe Coding" Actually Mean?&lt;br&gt;
Vibe coding is a term popularized in 2025 (credited to Andrej Karpathy) for a development style where a person describes what they want in natural language, an AI coding agent generates the implementation, and the person accepts the output running it, glancing at the result, and moving on rather than reading the code line by line. The term isn't inherently negative; it describes a workflow, not a quality level. But because the workflow skips the traditional review loop, certain classes of problems slip through consistently.&lt;/p&gt;

&lt;p&gt;This matters for detection: you're not looking for "AI wrote this," since AI-assisted coding is now standard practice at most serious engineering shops too. You're looking for signs that no human meaningfully reviewed or understood the output before it shipped. Programmer Simon Willison drew this same line early on, distinguishing a developer who reviews, tests, and understands every generated line from someone using the AI purely as an unsupervised author.&lt;br&gt;
Why Detecting Vibe-Coded Sites Matters&lt;br&gt;
A handful of practical situations make this skill worth having:&lt;/p&gt;

&lt;p&gt;Due diligence evaluating a startup's codebase before investing, acquiring, or partnering.&lt;br&gt;
Hiring and contracting verifying that a freelancer or agency actually understands what they delivered. Recruiters increasingly report giving candidates small coding tests specifically to see whether they can explain and defend their own logic rather than only paste AI output.&lt;br&gt;
Security review vibe-coded apps have a well-documented pattern of shipping with exposed API keys, missing auth checks, and unvalidated inputs. Some security researchers now describe this openly as "vulnerability-as-a-service."&lt;br&gt;
Maintainability planning deciding whether a codebase can be safely extended or needs a rewrite.&lt;br&gt;
Marketing and SEO planning a site can look finished and still be functionally invisible to Google, Bing, and AI answer engines (more on this below).&lt;br&gt;
Personal curiosity developers like figuring out how things were built.&lt;/p&gt;

&lt;p&gt;None of this requires backend access. Most of the signals below are visible from the browser, the page source, or a few minutes with browser dev tools.&lt;br&gt;
Front-End Signals: What You Can See in the Browser&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Repetitive, Generic Visual Patterns
AI page generators tend to converge on the same visual vocabulary because they're trained on similar component libraries and design patterns. Watch for:&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Purple-to-blue (or purple-to-pink-to-cyan) gradient hero sections as a near-default choice, frequently sitting on a near-black background (developers who work with these tools often describe the shade as "gray-900").&lt;br&gt;
Heavy, uniform use of rounded corners, pill-shaped buttons, drop shadows, and glassmorphism effects applied indiscriminately.&lt;br&gt;
Three-column "feature card" grids with an icon, bold title, and one sentence of description repeated for every single section, regardless of whether the content fits that shape.&lt;br&gt;
Emoji used as section icons, in headings, or scattered through the UI as visual flair instead of a proper icon set freelance developers who work with these tools regularly flag this as one of the fastest visual tells, alongside glowing hover effects on nearly every element.&lt;br&gt;
Formulaic, overly upbeat microcopy on buttons and success states phrasing like "Let's Go!" or exclamation-heavy confirmation messages shows up disproportionately often because it matches a common AI default rather than a brand voice someone deliberately chose.&lt;br&gt;
Generic stock-photo-style hero images or AI-generated illustrations that don't relate specifically to the product.&lt;/p&gt;

&lt;p&gt;None of these alone is proof. Plenty of hand-built sites use Tailwind's default rounded corners too, and plenty of professional designers like the shadcn/ui aesthetic on its own merits. It's the combination and uniformity that's telling of a site where every section, without exception, follows the identical card-grid-with-icon template, in the identical color palette, usually wasn't designed by a human making section-by-section decisions.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Builder Fingerprints Left in the Page
This is often the single strongest signal, because it isn't a style choice at all its infrastructure the platform injects, and most people never think to remove it.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Badges. Free tiers of AI builders frequently stamp their own output: an "Edit with Lovable" tab in a corner, a "Made with Bolt" mark, a "Built with v0" line in the footer. A badge is conclusive on its own, though paid plans usually let owners remove it, so its absence proves nothing.&lt;br&gt;
Default subdomains. Every builder deploys new projects to its own infrastructure. First, I think addresses ending in things like .lovable.app, .bolt.host, .replit.app/.repl.co, or .base44.app. A business running its live site on one of these preview domains hasn't just used an AI tool it hasn't gotten around to leaving the sandbox yet.&lt;br&gt;
Injected runtime scripts. View Page Source and look for platform plumbing loaded from the builder's own CDN, or small internal-looking script paths tucked into the  or before . These survive a move to a custom domain because owners rarely dig through raw HTML.&lt;br&gt;
Leftover asset paths and meta tags. Some builders store every uploaded image under a distinctive upload path, or write their own name into a meta tag (either a custom tag or a hijacked generator tag). Owners strip badges far more often than they rehost every image, so an old upload path is one of the most durable tells available.&lt;br&gt;
A nearly empty page source. Hand-built business sites that render on the server tend to have page source full of readable text. The default output of most AI builders is a client-rendered single-page app, so the raw HTML is close to empty: a single &lt;/p&gt;, a script tag pointing at a hashed bundle file, and little else. This alone isn't proof (plenty of hand-built single-page apps exist too), but combined with the other signals above it's a strong supporting data point.&lt;br&gt;
Comments the build tooling should have stripped. Production builds normally strip HTML comments on the way out. AI-written static pages that someone deployed by hand often still carry section labels like &amp;lt;!-- Hero --&amp;gt; or &amp;lt;!-- Testimonials --&amp;gt; sitting above each block, decorative divider comments, and stray emoji in the markup. A person writing a page by hand doesn't usually leave a trail of self-narrating comments; an AI writes them for its own bookkeeping, and no one who doesn't read code knows to remove them.

&lt;p&gt;Two things are worth naming explicitly here, because they get thrown around as false "gotchas": using React, Vite, or Supabase says nothing on its own these power a huge amount of carefully hand-built software and a website made in a no-code editor like Wix, Squarespace, Webflow, or Shopify is a different category entirely from vibe coding, since no code is generated at all.&lt;/p&gt;

&lt;p&gt;The catch with every fingerprint above is that it only works in one direction. Presence of a marker is strong evidence; absence proves nothing. Code written with an IDE-embedded assistant like Cursor, Claude Code, or Windsurf deploys through a completely normal repository and leaves no builder fingerprint at all, and any of the markers above can be manually deleted with a single follow-up prompt.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Placeholder and Boilerplate Text Left In
This is one of the strongest and easiest signals. Search the page (Ctrl+F / Cmd+F) for:&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;"Lorem ipsum"&lt;br&gt;
"Your Company Name," "Company Name Here"&lt;br&gt;
"[Insert testimonial here]"&lt;br&gt;
Generic testimonials attributed to "John Doe" or "Jane Smith" with stock avatar images&lt;br&gt;
Copyright footers still reading the template's original year or a placeholder brand&lt;/p&gt;

&lt;p&gt;AI scaffolding tools generate a full page structure including realistic-looking filler content, and if the person accepts the output without reading it end to end, that filler survives into production.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Inconsistent or Non-Functional Interactive Elements
Click everything. Vibe-coded sites frequently have:&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Buttons that visually exist but have no onClick handler wired up, or link to #.&lt;br&gt;
Forms that submit but show no success/error state, or console-error on submission because a backend endpoint was never actually connected.&lt;br&gt;
Navigation links that go to pages that don't exist (404s) because the AI scaffolded a multi-page site but only a couple of pages were actually built out.&lt;br&gt;
Inconsistent hover states some buttons have transitions and states, others (added later, or generated in a different session) don't.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Accessibility Gaps
AI-generated front ends often look polished but fail basic accessibility checks, because visual correctness is easy to verify by eye while accessibility requires deliberate testing:&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Missing alt text on images (View Page Source or inspect element).&lt;br&gt;
Poor color contrast, especially light gray text on white backgrounds is a very common AI-generated default.&lt;br&gt;
No visible focus states when tabbing through the page with the keyboard.&lt;br&gt;
Divs and spans with onClick handlers instead of semantic  elements.&lt;/p&gt;


&lt;p&gt;Running the page through Lighthouse (built into Chrome DevTools) or axe DevTools gives you a quick accessibility score. A sub-70 score paired with an otherwise polished visual design is a meaningful signal, since real accessibility work requires the kind of manual testing that a pure prompt-and-accept workflow tends to skip.&lt;br&gt;
SEO and Discoverability: The Silent Vibe-Coding Failure&lt;br&gt;
This is a category that's easy to miss because the site can look completely finished while being functionally invisible to search engines and it's become one of the most reported problems with AI-generated sites, precisely because it's invisible from a casual glance.&lt;/p&gt;

&lt;p&gt;Client-side rendering with nothing to crawl. Most AI website builders default to shipping a JavaScript-heavy single-page app: the server sends a nearly empty HTML shell, and the browser builds the visible page afterward by running a script bundle. Search engine crawlers fetch the raw HTML first, and if that's empty, that's what gets recorded initially. Full rendering happens later, in a separate queue, sometimes days or weeks later and smaller or newer sites can burn through their crawl budget before that second pass ever happens, leaving large parts of the site effectively unindexed.&lt;br&gt;
Duplicate or missing meta tags. AI-generated pages often reuse the same title and meta description across every page, or auto-generate a description by copying the page's first sentence, which search engines treat as low-quality boilerplate.&lt;br&gt;
Broken heading hierarchy. Because these tools optimize for how a heading looks rather than what it means semantically, it's common to find several &lt;/p&gt;
&lt;h1&gt; tags on one page (one per section, sized to look prominent) or a page's real title built with a styled  instead of a heading tag at all.&lt;br&gt;
Missing canonical tags and structured data. These are rarely part of what gets generated by default, and both matter for how search engines and AI answer engines (ChatGPT, Perplexity, Claude, Google's AI features) decide what a page is actually about.&lt;br&gt;
Real-world consequence. Marketers who've run technical SEO audits across multiple AI-built sites report the same pattern repeatedly: fast, polished, professional-looking sites that Google Search Console shows as essentially unindexed, or that render as a blank card when shared on social platforms. Some site owners have reported pages getting de-indexed and never recovering, even after fixes, which several have described as feeling like search engines "penalize" the platform's default output more harshly than an equivalent hand-built page.&lt;/h1&gt;


&lt;p&gt;None of this means a vibe-coded site can't rank it can, once someone deliberately fixes server-side or pre-rendering, meta tags, heading structure, and structured data. But by default, most of these tools treat SEO as a non-goal, so a beautiful site with zero organic search visibility is one of the more reliable (if less obvious) indicators that no one reviewed the output with search in mind.&lt;br&gt;
Code-Level Signals: What You Can See in Dev Tools or Source&lt;br&gt;
You don't need repository access to check most of this. Right-click → Inspect, or View Source, gets you a long way.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Over-Engineered or Redundant Component Structure
AI coding assistants tend to generate more code than a task strictly needs, because they're optimizing for "produces correct output" rather than "minimal, idiomatic solution." In a React or Vue site where you can view the bundled source (or if you have repo access), look for:&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Multiple components doing nearly identical things with slightly different naming (Card.jsx, FeatureCard.jsx, ServiceCard.jsx all near-duplicates).&lt;br&gt;
Deeply nested wrapper divs with no layout purpose a &lt;/p&gt; wrapping a  wrapping a , each adding a single class.&lt;br&gt;
Inline styles mixed inconsistently with a CSS framework, suggesting styling was patched incrementally by re-prompting rather than refactored.&lt;br&gt;
Unused imports and dead code left in the bundle visible if you inspect an unminified or source-mapped build.

&lt;ol&gt;
&lt;li&gt;Inconsistent Naming and Code Style
A human-maintained codebase tends to converge on one naming convention. AI-generated code, especially across multiple prompting sessions or multiple AI tools, frequently doesn't:&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;// Same file, three different naming conventions for similar things&lt;/p&gt;

&lt;p&gt;const user_data = fetchUserData();&lt;/p&gt;

&lt;p&gt;const userProfile = getUserProfile();&lt;/p&gt;

&lt;p&gt;const UserSettings = loadSettings();&lt;/p&gt;

&lt;p&gt;You'll also see camelCase and snake_case mixed within the same file, comment styles that change abruptly, and formatting that isn't consistent with a single Prettier/ESLint config because no one ever ran one project-wide format pass.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Suspiciously Verbose or Textbook-Style Comments
AI-generated code often includes comments explaining what the code does at a very basic level rather than why a decision was made the opposite of what experienced engineers write:&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;// Loop through the array of users&lt;/p&gt;

&lt;p&gt;for (let i = 0; i &amp;lt; users.length; i++) {&lt;/p&gt;

&lt;p&gt;// Check if the user is active&lt;/p&gt;

&lt;p&gt;if (users[i].isActive) {&lt;/p&gt;

&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// Add the user to the active users array

activeUsers.push(users[i]);
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;}&lt;/p&gt;

&lt;p&gt;}&lt;/p&gt;

&lt;p&gt;A human reviewing and internalizing this code would typically either delete comments like these or replace them with something explaining a non-obvious business rule. Their survival, unedited, into a shipped site suggests the code was never actually read.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Missing or Fake Error Handling
Because AI models are optimized to produce code that satisfies the prompt, they frequently generate error handling that looks correct but doesn't actually do anything useful:&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;try {&lt;/p&gt;

&lt;p&gt;const response = await fetch('/api/checkout');&lt;/p&gt;

&lt;p&gt;const data = await response.json();&lt;/p&gt;

&lt;p&gt;} catch (error) {&lt;/p&gt;

&lt;p&gt;console.log(error); // and nothing else&lt;/p&gt;

&lt;p&gt;}&lt;/p&gt;

&lt;p&gt;Open the browser console while using the site. Vibe-coded sites frequently throw uncaught errors, failed fetch requests, or React key warnings that were never addressed because no one was watching the console during development.&lt;br&gt;
Architectural and Backend Signals&lt;br&gt;
If you do have deeper access to a GitHub repo, an API you can probe, or a technical interview with whoever built it these signals are much stronger than anything visible in the browser. They're also, by a wide margin, the most consequential ones: independent testing of AI-generated programs has repeatedly found that somewhere around four in ten contain an exploitable flaw, and industry security teams now treat this as an expected baseline rather than a surprise finding.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Exposed Secrets and Client-Side API Calls to Paid Services
This is the most consequential vibe-coding failure mode, not just a stylistic tell. Check the page source and network tab for:&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;API keys for services like OpenAI, Stripe, or Supabase are hard-coded directly in client-side JavaScript, visible to anyone who opens dev tools.&lt;br&gt;
Direct client-to-third-party-API calls that should be proxied through a backend (e.g., a browser making an authenticated call straight to a payment provider or LLM API with a secret key embedded).&lt;br&gt;
.env files or .env.example files accidentally committed to a public repo with real values still in them.&lt;/p&gt;

&lt;p&gt;AI assistants will often do exactly what's asked "add Stripe checkout" in the most direct way possible, which is frequently the least secure way, unless the prompt explicitly specifies a secure architecture. This isn't hypothetical: secrets scanning research has tracked tens of millions of new secrets landing in public repositories every year, growing year over year, and repositories where an AI coding assistant is active have been found to leak API keys, passwords, and tokens meaningfully more often than repositories without one. There are documented cases of solo builders having their API keys leaked from vibe-coded apps and being forced to shut the project down and rebuild from scratch after attackers ran up usage on their account.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;No Input Validation or Sanitization
Try submitting obviously malformed input into any form: a negative number in a quantity field, HTML tags in a text field, an extremely long string. Vibe-coded backends built by accepting AI output wholesale commonly skip:&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Server-side validation (relying only on HTML required attributes or client-side JS checks, which are trivially bypassed).&lt;br&gt;
Sanitization before rendering user input back to the page, opening the door to stored cross-site scripting (XSS).&lt;br&gt;
Protection against SQL injection in any endpoint that builds a database query from user input directly.&lt;br&gt;
Rate limiting on forms, login attempts, or API endpoints.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Database and Auth Misconfiguration
If the site uses a backend-as-a-service like Supabase or Firebase (common in AI-assisted stacks because they're fast to scaffold), you can sometimes check:&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Whether Row Level Security (Supabase) or security rules (Firebase) are actually enforced, versus left in a permissive default state sometimes checkable by attempting to query the public API endpoint directly and seeing what comes back.&lt;br&gt;
Whether authentication actually gates the routes and API calls it appears to gate, or whether protected pages are only hidden by client-side conditional rendering while the underlying data is still fetchable.&lt;/p&gt;

&lt;p&gt;This class of bug is common enough in AI-scaffolded backends that Supabase itself now publishes guidance urging builders to explicitly verify Row Level Security policies and test data isolation between user accounts before calling an app production-ready, rather than assuming secure defaults.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Dependency and Supply Chain Red Flags
This is a newer, less obvious category, but it's become common enough that security vendors track it as a distinct risk. AI coding assistants sometimes recommend software packages with complete confidence including ones that don't actually exist. Researchers studying this "package hallucination" problem found a meaningful share of AI-suggested dependencies referenced packages that were never published, and that the same invented names tend to reappear consistently across repeated runs of the same prompt. That predictability matters, because it lets attackers register the invented package name in advance and wait for someone to install it, a technique researchers call "slopsquatting."&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;What to check if you have repository access:&lt;/p&gt;

&lt;p&gt;Whether package.json (or the equivalent manifest) lists an unusually large number of dependencies for how simple the app appears, AI assistants tend to reach for a new library per feature rather than reusing what's already installed.&lt;br&gt;
Whether a lockfile is committed, which pins exact dependency versions and protects against a compromised upstream package silently changing what gets installed.&lt;br&gt;
Whether any listed package looks unfamiliar or has an implausibly small download count for something this project supposedly depends on.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Repository History (If Accessible)
If you have access to the Git history, this is often the single clearest signal:&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;A commit history of huge, single commits ("Initial commit," "added stuff," "fix") rather than incremental, described changes.&lt;br&gt;
No .gitignore covering .env files, log output, or other machine-generated artifacts meaning secrets and clutter have a real chance of having been committed at some point in the project's history, even if removed later.&lt;br&gt;
No tests directory, or a tests directory added once and never touched again.&lt;br&gt;
No CI/CD configuration, no linting config, no pre-commit hooks, and no evidence of separate development/staging/production branches.&lt;br&gt;
A package.json with an unusually large number of dependencies for the app's apparent complexity, echoing the supply-chain concern above.&lt;br&gt;
Vibe Coding Signals: Quick Reference Table&lt;br&gt;
Signal Category&lt;br&gt;
What to Check&lt;br&gt;
Strong Indicator&lt;br&gt;
Visual design&lt;br&gt;
Repetition of card/icon layout, generic gradients, emoji, glow effects&lt;br&gt;
Every section uses the identical template and palette&lt;br&gt;
Builder fingerprints&lt;br&gt;
Corner badges, default subdomains, injected scripts, leftover upload paths&lt;br&gt;
Any platform-specific marker found in source&lt;br&gt;
Page content&lt;br&gt;
Search for "lorem ipsum," placeholder names&lt;br&gt;
Any placeholder text found&lt;br&gt;
Interactivity&lt;br&gt;
Click buttons and submit forms&lt;br&gt;
Dead links, silent form failures&lt;br&gt;
Accessibility&lt;br&gt;
Run Lighthouse/axe&lt;br&gt;
Score below ~70 with polished visuals&lt;br&gt;
SEO / indexing&lt;br&gt;
View source for content, check Search Console, count H1 tags&lt;br&gt;
Empty HTML shell, duplicate meta tags, multiple H1s&lt;br&gt;
Source code&lt;br&gt;
View source, inspect elements&lt;br&gt;
Deep div nesting, mixed naming conventions, HTML comments like &amp;lt;!-- Hero --&amp;gt;&lt;br&gt;
Console&lt;br&gt;
Open browser dev tools console&lt;br&gt;
Uncaught errors, failed requests&lt;br&gt;
Network tab&lt;br&gt;
Check API calls&lt;br&gt;
Client-side calls with exposed keys&lt;br&gt;
Forms&lt;br&gt;
Submit invalid data&lt;br&gt;
No server-side validation&lt;br&gt;
Repo (if available)&lt;br&gt;
Commit history, package.json, lockfile&lt;br&gt;
Single huge commits, no tests, no CI, no lockfile&lt;/p&gt;

&lt;p&gt;Traditional Development vs. AI-Assisted (Vibe-Coded) Development&lt;br&gt;
Aspect&lt;br&gt;
Traditional / Reviewed Workflow&lt;br&gt;
Pure Vibe-Coded Workflow&lt;br&gt;
Code review&lt;br&gt;
Every change reviewed by a human or peer&lt;br&gt;
Output accepted if it "looks right"&lt;br&gt;
Testing&lt;br&gt;
Unit/integration tests written alongside features&lt;br&gt;
Often skipped entirely&lt;br&gt;
Error handling&lt;br&gt;
Deliberate, specific to failure modes&lt;br&gt;
Generic try/catch, often silent&lt;br&gt;
Security&lt;br&gt;
Reviewed against known threat models&lt;br&gt;
Frequently overlooked until exploited&lt;br&gt;
Dependencies&lt;br&gt;
Vetted, pinned with a lockfile&lt;br&gt;
Added freely per feature, sometimes hallucinated&lt;br&gt;
SEO&lt;br&gt;
Planned as part of the build&lt;br&gt;
Rarely considered by default tooling&lt;br&gt;
Naming/style&lt;br&gt;
Enforced via linting and convention&lt;br&gt;
Drifts across prompting sessions&lt;br&gt;
Comments&lt;br&gt;
Explain "why," sparse&lt;br&gt;
Explain "what," verbose and generic&lt;br&gt;
Architecture&lt;br&gt;
Planned before implementation&lt;br&gt;
Emerges from incremental prompts&lt;/p&gt;

&lt;p&gt;This isn't a claim that AI-assisted code is inherently worse; plenty of teams use AI coding agents with rigorous review, testing, and security practices, and that code is indistinguishable from traditionally written code by most of these signals. The table describes the difference between reviewed and unreviewed output, not between human-written and AI-written code.&lt;br&gt;
How to Spot a "Vibe Coder" in an Interview or Code Test&lt;br&gt;
Detecting vibe-coded output isn't only about auditing finished websites hiring managers and technical co-founders increasingly need to evaluate whether a candidate or contractor actually understands the code they're submitting. A few practical approaches that experienced interviewers report using:&lt;/p&gt;

&lt;p&gt;Ask them to explain a specific decision, not just describe the feature. Someone who understands their own code can walk through why a particular approach was chosen and what the trade-offs were. Someone who only accepts AI output tends to describe what the code does at a surface level and struggles once you ask "why this way and not another way."&lt;br&gt;
Watch how they debug. Ask a candidate to fix a deliberately broken piece of code live. A developer who understands the codebase breaks the problem down and reasons through it; someone leaning entirely on AI often pastes the whole error into a chat tool and waits for a suggestion without evaluating whether it's actually the right fix.&lt;br&gt;
Look for a coherent problem-solving process, not just a working answer. Working code isn't proof of understanding on its own plenty of vibe-coded submissions technically run. The signal is whether the person can iterate on their own reasoning when you change the requirements slightly.&lt;br&gt;
Small tells matter, but treat them as one clue among several. Leftover AI-style comments, inconsistent naming, or emoji sprinkled through variable names or commit messages in a take-home test can be worth a follow-up question rather than an automatic red flag plenty of legitimate AI-assisted work has small tells like this, and the point is to ask, not assume.&lt;br&gt;
Tools You Can Use to Investigate&lt;br&gt;
Browser DevTools (built into Chrome, Firefox, Edge) inspect elements, check the console for errors, view the network tab for exposed API calls.&lt;br&gt;
Lighthouse (Chrome DevTools → Lighthouse tab) scores performance, accessibility, best practices, and SEO in one report.&lt;br&gt;
axe DevTools (browser extension) deeper accessibility auditing than Lighthouse alone.&lt;br&gt;
Google Search Console the clearest way to check whether a site's pages are actually indexed, and whether Google is seeing the rendered content or an empty shell.&lt;br&gt;
View Page Source / "View Frame Source" fastest way to catch leftover placeholder text, exposed keys, and builder-injected scripts or comments.&lt;br&gt;
WhatCMS or Wappalyzer (browser extensions) identify the frameworks and libraries a site is built on, useful context for what patterns to expect.&lt;br&gt;
Automated vibe-coding checkers a small category of purpose-built tools has emerged that fingerprints builder-specific markers (badges, default domains, injected scripts, leftover paths) automatically and shows its evidence tier by tier, which is a faster starting point than manually working through page source.&lt;br&gt;
GitHub (if the repo is public or shared) commit history, dependency list, lockfile presence, and presence or absence of tests and CI config.&lt;br&gt;
Common Mistakes When Trying to Judge a Site&lt;br&gt;
Treating any single signal as proof. A missing alt tag or a purple gradient alone means nothing plenty of professionally built sites have both. Look for a cluster of signals pointing the same direction.&lt;br&gt;
Assuming "AI-assisted" equals "bad." Many well-engineered products are built with heavy AI assistance and thorough human review. The tell isn't AI use it's absence of review.&lt;br&gt;
Assuming a modern-looking tech stack is itself evidence. React, Vite, and Supabase power a large amount of carefully hand-built software; naming the stack proves nothing about whether it was reviewed.&lt;br&gt;
Confusing no-code website builders with vibe coding. Wix, Squarespace, Webflow, and Shopify sites are assembled visually in an editor and involve no generated source code at all a different category that predates AI entirely.&lt;br&gt;
Ignoring that some vibe-coded sites work fine for their purpose. A landing page or portfolio site doesn't need the same rigor as a system handling payments or user data. Judge the site against what it actually needs to do securely and reliably.&lt;br&gt;
Assuming absence of builder fingerprints means the site wasn't AI-built. Anything built with an IDE-embedded tool like Cursor, Claude Code, or Windsurf deploys through a normal repository and leaves no platform trace at all. Markers prove presence; they never prove absence.&lt;br&gt;
Does a Human Still Need to Review AI-Generated Code?&lt;br&gt;
Yes. AI coding tools can produce functional code quickly, but they don't reliably catch security gaps, inconsistent architecture, or logic errors specific to a product's actual requirements. A developer should still read, test, and understand generated code before shipping it particularly anything touching authentication, payments, or user data because the AI has no way to verify the code matches intent it can't fully see.&lt;br&gt;
Best Practices If You're the One Building With AI Assistance&lt;br&gt;
If this article has you looking at your own project rather than someone else's, the fix isn't to avoid AI tools it's to close the review gap:&lt;/p&gt;

&lt;p&gt;Read every file the AI generates before running it, especially anything involving auth, payments, or data storage.&lt;br&gt;
Never hard-code API keys or secrets in client-side code. Route sensitive calls through a backend or serverless function, and make sure .env files are covered by .gitignore from the very first commit.&lt;br&gt;
Add server-side validation on every form and API endpoint, even if client-side validation already exists.&lt;br&gt;
Check your database and auth security rules explicitly. Enable Row Level Security (or the equivalent) and test that one user genuinely cannot see another user's data don't assume defaults are safe.&lt;br&gt;
Don't build authentication or cryptography yourself. Use an established provider or library rather than asking an AI tool to hand-roll login, session handling, or encryption from scratch.&lt;br&gt;
Run Lighthouse and axe before launch, not after a user reports a problem and check Google Search Console to confirm your pages are actually being indexed with real content, not an empty shell.&lt;br&gt;
Set up basic tests for critical paths (checkout, sign-up, data submission) even if you skip full coverage elsewhere, and put the project behind a CI pipeline with at least basic static analysis and secrets scanning.&lt;br&gt;
Use a linter and formatter (ESLint + Prettier, or equivalents) and run it across the whole project once before shipping.&lt;br&gt;
Check your dependencies, not just your own code. Confirm every package your AI tool added actually exists, is maintained, and is free of known vulnerabilities before you rely on it, and commit a lockfile so builds stay reproducible.&lt;br&gt;
Explicitly ask your AI tool to secure what it just built. Simply adding "and make it secure" to a prompt, or asking the model to review its own output for hardcoded secrets, missing validation, and public data exposure, measurably reduces the number of issues that ship though it should supplement human review and real scanning tools, not replace them.&lt;br&gt;
FAQ&lt;br&gt;
How can I tell if a website is vibe coded without access to the source code? &lt;br&gt;
Check for a builder's badge or default subdomain, leftover placeholder text, broken or dead links, repetitive template-like design across every section, browser console errors, and a low Lighthouse accessibility score. Checking whether the site is actually indexed in Google is another strong, easy signal. These are all visible without any backend or repo access.&lt;/p&gt;

&lt;p&gt;Is vibe coding always bad practice?&lt;br&gt;
 No. Vibe coding is a workflow, not a quality guarantee. It becomes a problem specifically when output is shipped without review, testing, and security checks which is common, but not universal.&lt;/p&gt;

&lt;p&gt;What's the biggest security risk in vibe-coded websites?&lt;/p&gt;

&lt;p&gt;Exposed API keys and secrets in client-side code, along with missing server-side validation and misconfigured database security rules (like disabled Row Level Security in Supabase), are the most consequential and most commonly reported issues. Solo builders have lost access to their own projects, or been forced to rebuild from scratch, after leaked keys were abused.&lt;/p&gt;

&lt;p&gt;Why do vibe-coded sites often struggle to rank on Google?&lt;br&gt;
 Most AI website builders default to a client-side-rendered single-page app, meaning the server sends a nearly empty HTML page and JavaScript builds the visible content afterward. Search engine crawlers see the empty shell first, and full indexing of the rendered content can be delayed or, for smaller sites, may not happen reliably at all on top of default issues like duplicate meta tags and broken heading structure.&lt;/p&gt;

&lt;p&gt;Can AI-generated code pass a professional code review?&lt;br&gt;
 Yes, when a knowledgeable developer reviews, tests, and refines it. The distinguishing factor isn't whether AI wrote the first draft, it's whether a human verified correctness, security, and maintainability afterward.&lt;/p&gt;

&lt;p&gt;What tools help detect AI-generated or vibe-coded websites?&lt;br&gt;
 Browser DevTools, Lighthouse, axe DevTools, Google Search Console, and Wappalyzer cover most front-end and discoverability checks. Purpose-built fingerprinting tools that check for builder badges, default subdomains, and injected platform scripts can automate much of the manual page-source hunting. For deeper analysis, reviewing Git commit history, lockfiles, and dependency lists in the repository (if accessible) is the most reliable method.&lt;/p&gt;

&lt;p&gt;Does a slow or buggy website mean it was vibe coded?&lt;br&gt;
 Not necessarily bugs and performance issues happen in hand-written code too. But a cluster of the signals in this article (placeholder text, console errors, exposed keys, inconsistent styling, poor search visibility) together strongly suggests unreviewed AI output rather than an isolated one-off issue.&lt;br&gt;
Final Recommendations&lt;br&gt;
No single detail proves a website was vibe coded. The reliable method is layering signals: start with what's visible in the browser (placeholder text, dead buttons, console errors, accessibility score, builder badges or default subdomains), check whether the site is actually indexed and readable to search engines, then go deeper if you have access to source or a repository (naming consistency, error handling, exposed secrets, dependency hygiene, commit history, test coverage). A site with two or three isolated quirks is probably just imperfect, like most software. A site where every signal points the same direction generic design, unreviewed content, silent failures, exposed keys, invisible to search, no tests was very likely shipped without a human ever reading the code carefully. Whether that matters depends entirely on what the site does; a portfolio page can get away with it, a checkout flow can't.&lt;/p&gt;



</description>
      <category>ai</category>
      <category>webdev</category>
      <category>programming</category>
      <category>productivity</category>
    </item>
    <item>
      <title>System Design Interview Prep in 2026: Why Knowing the Concepts Isn't Enough Anymore</title>
      <dc:creator>ail akram</dc:creator>
      <pubDate>Fri, 14 Aug 2026 06:29:45 +0000</pubDate>
      <link>https://dev.to/ail_akram_dcc5063c428734b/system-design-interview-prep-in-2026-why-knowing-the-concepts-isnt-enough-anymore-4odc</link>
      <guid>https://dev.to/ail_akram_dcc5063c428734b/system-design-interview-prep-in-2026-why-knowing-the-concepts-isnt-enough-anymore-4odc</guid>
      <description>&lt;p&gt;Introduction&lt;br&gt;
In 2020, you could walk into a system design interview, sketch a load balancer, fan it out to a handful of stateless app servers, drop a cache in front of a relational database, and call it a day. Memorize the "design Twitter" template, swap in the right nouns for "design Uber" or "design a URL shortener," and you had a repeatable script that got senior engineers through FAANG-style loops.&lt;/p&gt;

&lt;p&gt;That script is dead. Not because the underlying concepts sharding, caching, load balancing, CAP theorem—stopped mattering, but because every candidate now walks in with the same YouTube playlist memorized. Interviewers have seen the Twitter diagram five hundred times. They know the score before you've finished drawing the third box. So they've adapted, and if your system design interview prep 2026 strategy hasn't adapted with them, you're going to get outpaced by people who understand the same concepts but can actually reason with them.&lt;/p&gt;

&lt;p&gt;This is the uncomfortable truth senior engineers need to hear: the bar hasn't just moved up, it's moved sideways. Interviewers today aren't grading your diagram. They're grading your judgment. And the numbers back this up: one Airbnb interviewer with over a decade of experience building distributed systems has observed that candidates with the same strong technical scores that used to earn offers two years ago are now getting turned down, simply because more strong candidates are clearing the bar than there are open roles. A "Strong Hire" from two years ago might only rate as a plain "Hire" today. Passing isn't enough anymore; you need to stand out within the pool of people who already pass.&lt;br&gt;
The Shift in Interviewer Expectations&lt;br&gt;
The old rubric rewarded coverage did you mention caching, did you mention sharding, did you mention a message queue. The new rubric rewards depth under pressure. Interviewers have quietly shifted from "can you draw the boxes" to "can you defend the boxes when I start poking holes in them."&lt;/p&gt;

&lt;p&gt;This shows up in a few concrete ways. You'll get interrupted mid-design with a constraint change traffic just 10x'd, or the read pattern flipped from read-heavy to write-heavy, or a compliance requirement just appeared that forces data residency in three regions. You'll get asked what happens when your "highly available" cache layer goes down at 2 AM during a traffic spike. You'll get asked to justify a decision purely on cost, not just feasibility.&lt;/p&gt;

&lt;p&gt;None of this is really about system design concepts anymore everyone in the room already knows what a consistent hashing ring is. It's about whether you can operate that knowledge like a practicing architect instead of reciting it like a textbook. Interviewers have started treating the whiteboard less like an exam and more like a design review with a skeptical staff engineer in the room, because that's genuinely closer to the job.&lt;/p&gt;

&lt;p&gt;It's also worth knowing that the format itself is shifting at several companies. The single open-ended whiteboard prompt is still the default almost everywhere, but it's no longer the only shape you'll meet. At Stripe and a handful of AI labs, a single problem now arrives broken into three to five sequential parts on a HackerRank-style platform, where each part only unlocks once the previous one runs cleanly which rewards candidates who can ship a working first version fast rather than over-engineering it before the interviewer even sees it. At Amazon, some GenAI Architect screens skip the whiteboard entirely and ask you to reason through the design out loud, with the interviewer pressing you to revise requirements on the spot. Netflix rounds regularly happen with no shared diagramming tool as all candidates just talk. The lesson underneath all of these variations is the same: rehearse explaining your design out loud, not just drawing it.&lt;br&gt;
Five (or Seven) Steps That Structure a Strong Answer&lt;br&gt;
Interviewers aren't grading a single "right" architecture; they're watching how you move through the problem. Most strong answers, regardless of company, pass through the same handful of stages, and knowing the shape of them in advance frees up mental bandwidth for the actual reasoning.&lt;/p&gt;

&lt;p&gt;Clarify requirements (5–8 minutes). Don't touch the whiteboard yet. Pin down functional requirements (what does the system actually need to do for "Design TikTok," does that mean upload, feed generation, search, live streaming, all of it?) and non-functional requirements (scale, latency targets, consistency vs. availability, durability). State explicitly what you're leaving out of scope. Strong candidates propose the scope themselves instead of waiting for the interviewer to narrow it.&lt;br&gt;
Back-of-the-envelope estimation (3–5 minutes, often skipped by weaker candidates). Turn the vague prompt into real numbers daily active users, requests per second, storage growth per year. The precision doesn't matter; the habit of reasoning in orders of magnitude does. If you work out that a feed system needs to handle roughly 15,000 queries per second at peak, that number is what justifies bringing in a cache or reading replicas later instead of just declaring "we'll add caching" because it sounds right.&lt;br&gt;
Define the API (3–5 minutes). Before designing internals, define the external contract: what endpoints exist, what goes in, what comes out. This forces you to think about the data flowing through the system and gives the interviewer concrete surface area to probe pagination, auth, versioning, rate limits.&lt;br&gt;
High-level design (8–10 minutes). Sketch the broad flow client, CDN, load balancer, application services, cache, database and confirm it satisfies every functional requirement before drilling into any one piece.&lt;br&gt;
Deep dive into one or two components (10–20 minutes). This is the highest-signal part of the interview. Go deep on the pieces that matter most for this specific system, usually the data layer, the caching strategy, or one domain-specific challenge and reason about how each one behaves under normal load, how it fails, and what happens when it does fail.&lt;br&gt;
Address bottlenecks, cost, and operations (5–8 minutes). What breaks at 10x scale? Where's the single point of failure? What would you do differently to cut infrastructure spend in half without breaking the SLA? Mentioning monitoring, logging, and alerting before being asked signals real production experience.&lt;br&gt;
Wrap up (2–5 minutes). Summarize the design, name the trade-offs you made, and say what you'd tackle next with more time data migration, CI/CD, geographic failover. Showing you know what you deliberately left out is itself a signal of judgment.&lt;/p&gt;

&lt;p&gt;Not every company follows this shape exactly. Netflix rounds are often unstructured, open-ended conversations, and Amazon's GenAI screens skip the diagram altogether but the underlying moves (scope, estimate, design, defend, extend) hold up almost everywhere.&lt;br&gt;
Four Pillars Beyond the Basics&lt;br&gt;
If you strip away the theater, four capabilities separate candidates who pass from candidates who merely know the material.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Trade-off Analysis: Latency vs. Consistency vs. Cost
Every system design concept you learned CAP theorem, eventual consistency, and read replicas exists to be traded against something else. The interviewers of 2026 aren't interested in whether you know that strong consistency costs latency. They're interested in whether you can say, specifically, "for this feature, users tolerate 200ms of staleness because it's a social feed, not a bank ledger, so I'll take eventual consistency and save myself cross-region write latency."&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This is the essence of practical system design trade-offs: naming the actual constraint that matters for this specific product, not reciting the general theorem. Cost has become a first-class citizen in this conversation too. It's no longer enough to say "we'll add more replicas." A senior candidate is expected to reason about the cost delta between over-provisioning for a rare spike versus building elastic autoscaling with acceptable cold-start latency, and to say which one they'd actually ship and why. Interviewers increasingly ask directly: "This design works, but it triples infrastructure spending. How would you cut that in half without breaking the SLA?" If you don't have an answer, the interview is effectively over.&lt;/p&gt;

&lt;p&gt;One habit worth building deliberately here: reasoning quantitatively before you reason architecturally. Saying out loud, "we're talking a hundred million daily active users, roughly ten requests each, call it a billion requests a day, about twelve thousand RPS average and maybe forty thousand at peak" doesn't need to be precise but it reframes the whole conversation. You're no longer designing in the abstract; you're defending every choice against a budget you set yourself.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Real-World Failure Modes and Resilience
Anyone can design the happy path. What separates senior engineers is designing for the 3 AM page. Interviewers now routinely probe for cascading failures: what happens when your recommendation service slows down and every upstream caller starts timing out and retrying simultaneously, doubling the load on an already struggling system? Do you know what a retry storm looks like, and do you reach for exponential backoff with jitter, circuit breakers, and bulkheading without being prompted?&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Rate limiting has become a near-mandatory topic, not as a bullet point but as a design decision with its own trade-offs: token bucket versus sliding window, per-user versus per-tenant limits, and what you degrade gracefully versus what you reject outright. The best candidates talk about partial degradation: if the personalization service is down, do you serve a generic feed instead of a blank page? That instinct to design for graceful failure rather than assuming everything stays up is exactly what separates textbook knowledge from operational maturity, and it's a huge part of learning how to pass system design interview loops at the senior and staff level in 2026.&lt;/p&gt;

&lt;p&gt;An Airbnb interviewer summed up what he's actually screening for in this part of the round: how candidates think about systems and failure modes, not whether they can name the components. That's the whole pillar in one sentence.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Modern Infrastructure Shifts
The reference architectures written in 2018 didn't have to account for AI inference sitting in the critical path of a product, and that's no longer true. Interviewers are increasingly layering AI-adjacent constraints into classic problems: design a content moderation pipeline that calls an LLM, and now you have to reason about GPU-bound latency variance, batching for throughput versus per-request latency, model fallback strategies, and caching embeddings instead of re-computing them on every request. This isn't a niche add-on anymore; it's showing up in mainstream system design loops because it's showing up in mainstream production systems.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This shift is now measurable, not anecdotal. LLM infrastructure prompts have moved out of ML-specific interview loops and into general software engineering rounds a year ago, "design a system that serves an LLM" was reserved for ML roles; now it shows up broadly. Recently reported 2026 prompts include designing the high-level system behind an LLM answering user queries, building a customer-support chatbot on top of a third-party LLM platform (with rate limits, fallback, and state to reason about), distributing model weights to thousands of machines over a constrained network link, and designing safeguards for an AI system that can take actions on a user's behalf. At Anthropic specifically, the most commonly reported prompt is a batch inference API for a GPU cluster and interviewers there explicitly want candidates to abstract the AI framing away, turning "batch inference on a GPU" into "batched processing on a constrained compute resource," since the underlying patterns (queuing, batching under constraints, async-to-sync mapping) are the same distributed-systems patterns you already know. If you're interviewing anywhere that ships AI features, expect at least one prompt touching LLM serving, embedding pipelines, or GPU resource management, even outside ML-specific roles.&lt;/p&gt;

&lt;p&gt;Edge architecture is another area where the old templates fall flat. Candidates who still default to "central data center, single region" get pushed on why they didn't consider pushing compute to the edge for latency-sensitive read paths, or how they'd handle data consistency across edge nodes during a regional outage. And the database layer itself has diversified well past "SQL versus NoSQL." Interviewers expect familiarity with modern engines vector databases for retrieval-augmented systems, NewSQL options that blend horizontal scalability with transactional guarantees, and columnar stores for analytical workloads and, more importantly, judgment about when each one is actually the right tool rather than the trendy one.&lt;/p&gt;

&lt;p&gt;That last point deserves its own emphasis: knowing when the boring choice beats the trendy one is itself a senior signal. A candidate who says "I'd start with a monolith here  the team is small, the load is low, and the operational overhead of microservices isn't worth it for the first eighteen months" reads as someone who has actually shipped software, not someone reaching for jargon to sound impressive.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Communication and Steering the Interview
This is the pillar most senior engineers underrate, and it's often the one that decides the outcome. A 45-minute system design interview is not enough time to design a fully correct system everyone in the room knows. What it is enough time for is watching how you allocate your own attention. Do you spend fifteen minutes gold-plating the API schema while ignoring the one requirement that actually matters? Or do you clarify scope early, propose a rough plan, and explicitly negotiate where you'll go deep versus where you'll hand-wave?&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The strongest candidates treat the interviewer as a collaborator, not a judge. They narrate their reasoning out loud, flag assumptions explicitly ("I'm assuming write volume dominates reads correct me if that's wrong"), and actively steer toward the parts of the problem that showcase judgment rather than passively waiting to be asked. This single skill steering rather than being steered is disproportionately responsible for the gap between "strong hire" and "no hire" among candidates with nearly identical technical knowledge.&lt;/p&gt;

&lt;p&gt;Precise vocabulary is part of this signal, and it's more automatic than it looks. Saying "eventual consistency" instead of "the data syncs eventually," or "read replicas" instead of "copies of the database for reads," reveals precise thinking, not pedantry when a candidate fumbles for the right term, interviewers correctly read it as fumbling for the underlying idea.&lt;/p&gt;

&lt;p&gt;At senior and staff level specifically, the bar for this pillar is different in kind, not just degree. Senior candidates are expected to show depth in their own domain reasoning about scalability, reliability, and how a decision affects the product's future. Staff candidates are expected to drive the interview: propose scope instead of waiting to be asked, raise cross-team concerns (data migration paths, backward compatibility, organizational boundaries) unprompted, and pick the two components most worth going deep on rather than being told which ones matter.&lt;br&gt;
Common Mistakes That Sink Otherwise-Strong Candidates&lt;br&gt;
A few failure patterns show up again and again in interviewer debriefs, independent of how technically strong the candidate is on paper:&lt;/p&gt;

&lt;p&gt;Jumping into components before clarifying requirements. Drawing databases before you know if the system is read-heavy or write-heavy is guessing, and interviewers notice immediately.&lt;br&gt;
Treating the interview as a monologue. System design is a conversation. Speaking uninterrupted for ten minutes usually means you're going deep on something the interviewer doesn't care about, pause and check in.&lt;br&gt;
Ignoring non-functional requirements. A design that covers every feature but collapses at 10x traffic is an incomplete answer, not a creative one.&lt;br&gt;
Naming products instead of patterns. Saying "we'll use Kafka here" without explaining why a message queue is needed async processing, decoupling, backpressure signals shallow understanding. Name the pattern before the product.&lt;br&gt;
Skipping trade-offs. Every architectural decision costs something. Proposing a cache without acknowledging invalidation challenges, or eventual consistency without naming the staleness window, leaves the most gradeable part of the answer on the table.&lt;br&gt;
How System Design Interviews Differ by Company&lt;br&gt;
The core building blocks are the same everywhere, but what gets emphasized and how the round is even structured varies enough that generic prep leaves real points on the table.&lt;/p&gt;

&lt;p&gt;Google runs a single 45-minute round with a strong emphasis on database selection, and tends to avoid asking candidates to design Google's own products directly.&lt;br&gt;
Meta focuses on the products it actually builds social feeds, messaging, content delivery and expects candidates to proactively address scale across billions of users without being prompted.&lt;br&gt;
Amazon weaves behavioral questions and its Leadership Principles directly into the technical round, and some GenAI-focused screens are entirely verbal with no whiteboard at all.&lt;br&gt;
Netflix runs a 60-minute, open-ended discussion with no fixed framework; candidates frequently finish the round without ever opening a shared diagramming tool.&lt;br&gt;
Anthropic frames prompts around AI workloads (most commonly a batch inference API for a GPU cluster), but is explicitly testing classic distributed-systems reasoning underneath the AI framing.&lt;br&gt;
Stripe and several AI-first startups have moved toward multi-part sequential builds where each stage unlocks only after the previous one works.&lt;/p&gt;

&lt;p&gt;If you know which company you're headed into, spending even an hour reading real interview experiences for that specific company tends to outperform another hour of generic practice.&lt;br&gt;
How to Practice Effectively in 2026&lt;br&gt;
Rote memorization of architecture diagrams is now actively counterproductive; it signals pattern-matching rather than reasoning, and experienced interviewers can tell the difference within minutes. Senior engineer interview prep in 2026 needs a different regimen.&lt;/p&gt;

&lt;p&gt;Start with mock interviews where someone actively adversarial injects constraint changes mid-session a scaling curveball, a budget cut, a compliance requirement and forces you to adapt live rather than execute a memorized flow. This is a far better predictor of real interview performance than solo whiteboarding.&lt;/p&gt;

&lt;p&gt;Study real post-mortems. Public incident reports from major engineering orgs are a goldmine because they show you actual cascading failures, actual root causes, and actual mitigations, grounded in systems that exist rather than idealized textbook diagrams. Reading five real post-mortems will teach you more about resilience design than reading twenty design blog templates.&lt;/p&gt;

&lt;p&gt;Profile real systems where you can. If you have access to production metrics at your current job, spend an hour understanding why a particular service is provisioned the way it is and what trade-off produced that specific configuration. That grounded intuition transfers directly to interview reasoning in a way abstract study never does.&lt;/p&gt;

&lt;p&gt;Practice explaining trade-offs out loud, alone, before you ever get in front of an interviewer. Pick any system and force yourself to argue both sides of a decision why you'd choose strong consistency here, why you'd choose eventual consistency there until justifying a trade-off feels as natural as naming one.&lt;/p&gt;

&lt;p&gt;If you want a concrete timeline rather than an open-ended "practice more," an eight-week runway breaks down cleanly:&lt;/p&gt;

&lt;p&gt;Weeks 1–2 — Fundamentals. Build the mental library: load balancing, caching, relational and non-relational databases, message queues, CDNs, consistent hashing, replication, sharding, CAP theorem. Focus on how the pieces compose, not on memorizing architectures for specific products.&lt;br&gt;
Weeks 3–5 — Timed practice. Work through 8–10 classic prompts out loud in 45-minute timeboxes. Diagram polish doesn't matter; reasoning out loud does, even when you're practicing alone.&lt;br&gt;
Weeks 6–7 — Mock interviews. Run mocks with another engineer or a peer-practice tool. This is the step people skip, and it's the one that matters most: a design explained to a rubber duck is not the same as one defended against a stranger who interrupts with "why not just cache everything?"&lt;br&gt;
Week 8 — Company-specific prep. Review the target company's format and question style, and shore up whatever weak spot the mocks surfaced.&lt;/p&gt;

&lt;p&gt;If time is short, a compressed two-week version squeezes fundamentals into three focused days and spends the rest on timed practice and at least two mock interviews aimed at your target company's most commonly reported questions. And if you're interviewing anywhere AI-first, add roughly a week specifically on batch inference, GPU resource management, retrieval-augmented generation, and rate limiting for LLM APIs you don't need to be an ML expert, but you do need the infrastructure vocabulary.&lt;/p&gt;

&lt;p&gt;One more thing worth remembering: the system design round is one part of a multi-round loop, and it's possible to ace it and still not get the offer because a different round coding, behavioral, or a domain-specific screen was the weak link. Spend prep time in proportion to where your actual gaps are, not in proportion to which round feels the most "real."&lt;br&gt;
Conclusion&lt;br&gt;
The candidates who struggle in 2026 aren't the ones who don't know what a load balancer does. They're the ones who never learned to argue with themselves about when not to use one. System design interview concepts got you in the door in 2020; they'll barely get you past the first ten minutes now. What gets you hired is judgment under constraint the ability to trade off latency against cost against consistency in real time, to design for failure instead of assuming success, to speak fluently about AI-infused and edge-native infrastructure, and to steer a conversation like the staff-level engineer you're claiming to be. Master that, and the diagrams take care of themselves.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>webdev</category>
      <category>programming</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Benchmarking DFlash on a 30B Model: Why Tokens per Second Can Mislead</title>
      <dc:creator>ail akram</dc:creator>
      <pubDate>Thu, 13 Aug 2026 16:01:42 +0000</pubDate>
      <link>https://dev.to/ail_akram_dcc5063c428734b/benchmarking-dflash-on-a-30b-model-why-tokens-per-second-can-mislead-4oel</link>
      <guid>https://dev.to/ail_akram_dcc5063c428734b/benchmarking-dflash-on-a-30b-model-why-tokens-per-second-can-mislead-4oel</guid>
      <description>&lt;p&gt;A field guide for ML engineers, LLM DevOps, and system architects deploying open-weights 30B-scale models with block-diffusion speculative decoding.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Introduction &amp;amp; Background
1.1 What DFlash actually is
DFlash ("Block Diffusion for Flash Speculative Decoding") is a speculative decoding framework out of UC San Diego's z-lab that replaces the autoregressive drafter used in methods like EAGLE-2/EAGLE-3 with a lightweight block-diffusion drafter. Instead of generating draft tokens one at a time (itself a sequential process, just cheaper than the target model), DFlash's drafter is conditioned on hidden-state features pulled from the target model and denoises an entire block of candidate tokens typically 8 to 16 in a single forward pass. The target model then verifies the whole block in parallel, exactly as in classic speculative decoding.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Two things make this architecturally distinct from EAGLE-style drafters:&lt;/p&gt;

&lt;p&gt;The drafter is non-autoregressive. A block diffusion (masked-denoising) head predicts multiple future positions simultaneously, rather than feeding each drafted token back in as input to draft the next one.&lt;br&gt;
The drafter is context-conditioned, not just token-conditioned. It consumes projected hidden-state features from the target model's forward pass, which is what lets it hit higher acceptance rates than a purely token-level draft model the drafter "sees" what the target model was thinking, not just what it emitted.&lt;/p&gt;

&lt;p&gt;The project reports order-of-magnitude claims worth treating as upper bounds rather than guarantees: up to ~6x lossless acceleration in the paper's benchmarks, and up to 2.5x over EAGLE-3 in like-for-like comparisons, with NVIDIA's own writeup citing up to 15x on Blackwell hardware under favorable batching and kernel conditions. Real production numbers on your traffic mix will be lower than the headline figures; that gap is the entire subject of this article, and it's now also visible in independent third-party numbers rather than just vendor claims (more on that in §1.3 and §6).&lt;/p&gt;

&lt;p&gt;DFlash ships with drop-in support in both vLLM (--speculative-config) and SGLang (--speculative-algorithm DFLASH), plus a Transformers backend for Qwen3/LLaMA-3.1 and an MLX backend for Apple Silicon. That breadth of serving-stack support rather than being a research curiosity is a big part of why teams are evaluating it as a default replacement for EAGLE-3 drafters on new deployments.&lt;br&gt;
1.2 Why 30B is the sweet spot to benchmark&lt;br&gt;
Most public speculative-decoding benchmarks cluster around two extremes: small models (7–9B) that fit comfortably on a single consumer GPU with room to spare, and frontier-scale models (70B+) that require multi-GPU tensor parallelism by default. Neither extreme reflects the fastest-growing production segment: dense or lightly-sparse 27B–35B models running on a single high-memory GPU an A100 80GB, H100 80GB, or a prosumer RTX 5090 which is exactly the class DFlash ships checkpoints for (Qwen3.5-27B, Qwen3.6-27B, Qwen3-Coder-30B-A3B, gemma-4-31B-it, Qwen3.5-35B-A3B).&lt;/p&gt;

&lt;p&gt;This tier matters for benchmarking speculative decoding specifically because:&lt;/p&gt;

&lt;p&gt;It sits at the memory-bandwidth/compute-bound inflection point. At BS=1, a 30B dense model in FP16/FP8 is squarely memory-bandwidth-bound on decode which is exactly the regime speculative decoding is designed to exploit. A 7B model has so much headroom that almost any drafter looks good; a 70B+ model run across multiple GPUs introduces NVLink/PCIe and tensor-parallel communication overhead that muddies the speculative-decoding signal with interconnect effects.&lt;br&gt;
It's the practical ceiling for single-GPU enterprise and edge deployment. Above ~30–35B dense, most teams either quantize aggressively or move to multi-GPU serving, which changes the cost/latency calculus entirely.&lt;br&gt;
It exposes draft-overhead effects that smaller models hide. The compute cost of the block-diffusion drafter's forward pass is a much larger fraction of the total step time relative to a 30B target than it would be relative to a 70B target so any inefficiency in the draft path shows up clearly in the numbers.&lt;/p&gt;

&lt;p&gt;If your benchmark methodology can't survive scrutiny at 30B, it won't survive contact with a real fleet.&lt;br&gt;
1.3 A concrete data point: Meta shipped its own DFlash drafter at this exact tier&lt;br&gt;
This isn't just a hypothetical benchmarking tier anymore. On August 10, 2026, Meta open-weighted Muse Glimmer, a ~29.6B-parameter dense, agent-oriented model distilled from Meta's larger Muse Spark model and shipped it with an officially trained DFlash drafter (roughly 2.56B parameters, five draft layers, 16-token blocks) as a first-class part of the release, alongside full BF16 weights, two official GGUF quantizations, and ExecuTorch packages for Apple Silicon and NVIDIA. That makes Glimmer one of the first mainstream-lab releases where speculative decoding isn't a bolt-on community project but a maintained part of the model card.&lt;/p&gt;

&lt;p&gt;Meta's own measured numbers, at batch size 1 under greedy decoding, are a useful reality check against the paper's headline multipliers:&lt;/p&gt;

&lt;p&gt;Hardware&lt;br&gt;
Plain decoding&lt;br&gt;
With DFlash&lt;br&gt;
Speedup&lt;br&gt;
RTX 5090&lt;br&gt;
74.9 tok/s&lt;br&gt;
233.4 tok/s&lt;br&gt;
3.1x&lt;br&gt;
M5 Max&lt;br&gt;
26.6 tok/s&lt;br&gt;
50.2 tok/s&lt;br&gt;
1.8x&lt;br&gt;
M4 Max&lt;br&gt;
not stated&lt;br&gt;
not stated&lt;br&gt;
1.5x&lt;/p&gt;

&lt;p&gt;The DFlash paper reports over 6x on smaller models under ideal conditions; Meta's own vendor-published number for a 30B-class model at 4-bit is 3.1x on an RTX 5090. Independent commentary on the release (see §6) has been explicit that these are batch-one, greedy-decoding numbers averaged across Meta's own prompt set, and should not be treated as universal interactive speeds actual speedup still depends on draft-token acceptance, prompt distribution, sampling configuration, memory bandwidth, and verification-kernel efficiency, exactly as this article argues in §3.3. This is the same "your mileage will vary" gap the paper's 6x and NVIDIA's 15x figures already imply, now with a named vendor's own number sitting between the lab claim and field reality.&lt;/p&gt;

&lt;p&gt;Worth flagging for methodology purposes: Glimmer's model card recommends stochastic sampling (temperature 1.0, top-p 0.95, top-k 64), but its published generation_config.json defaults to greedy decoding, and the DFlash throughput table above was also measured under greedy decoding. Greedy decoding is deterministic and tends to raise draft-token acceptance; sampling increases variance and can measurably reduce DFlash's speed advantage. Any benchmark you run against Glimmer or against any DFlash-equipped model needs to state explicitly which regime it used, because the two are not comparable numbers.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The Illusion of Raw "Tokens Per Second"
2.1 Why aggregate TPS is a bad north star for speculative decoding
Aggregate tokens/sec total output tokens generated across all concurrent requests, divided by wall-clock time is the single most commonly reported number in speculative decoding benchmarks, and it is also the easiest number to game or misread. It conflates at least four independent effects:&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;How fast the draft model proposes tokens&lt;br&gt;
How many of those proposed tokens are actually accepted by the target model&lt;br&gt;
How much batch size and concurrency the test harness used&lt;br&gt;
Whether you're measuring prefill-heavy or decode-heavy workloads&lt;/p&gt;

&lt;p&gt;A speculative decoding method can post an excellent aggregate TPS number by running at high concurrency where the target model's batched computer dominates the picture, while doing almost nothing to improve the metric that end users actually feel: how long they wait between tokens in a single, live conversation. Aggregate TPS is a server-throughput metric. Most complaints about "the model feels slow" are single-stream latency complaints. These are not the same axis, and speculative decoding's entire value proposition is strongest on the axis TPS doesn't measure well.&lt;br&gt;
2.2 The metrics that actually predict user experience&lt;br&gt;
TTFT (Time to First Token) vs. TBT / Inter-Token Latency TTFT is dominated by prefill attention over the full input context and is largely unaffected by speculative decoding, since the drafter only engages once decoding starts. TBT (also called inter-token latency, or ITL) is where DFlash's block-diffusion drafting is supposed to pay off: if a single forward pass reliably yields several accepted tokens, the effective per-token latency drops even though each verification step costs more wall-clock time than a single autoregressive step. Report TTFT and P50/P90/P99 TBT separately never blend them into one "avg latency" figure.&lt;/p&gt;

&lt;p&gt;Acceptance Rate &amp;amp; Mean Accepted Length This is the load-bearing metric for any speculative method. Acceptance rate is the fraction of proposed draft tokens the target model's verification step keeps; mean accepted length (often written τ, tau) is the average number of tokens actually committed per verification round (draft block size sets the ceiling, not the floor). A drafter that proposes 16 tokens per pass but only gets 3 accepted on average is not meaningfully different from a drafter proposing 4 tokens with the same acceptance count except it burned more compute doing it. Acceptance rate is also highly task-dependent: code completion and structured/templated output (high local predictability) accept far more draft tokens than open-ended creative writing or multi-step reasoning traces, where token entropy is higher.&lt;/p&gt;

&lt;p&gt;A real-world 30B run makes this concrete. In an independently published benchmarking log covering a Meta Muse Glimmer 30B + DFlash deployment on a single 24GB Blackwell-class GPU, a short coding task reached 84.64 tok/s at roughly 38.7% acceptance, while a mixed workload spanning code, prose, reasoning, and infrastructure work fell to 38.34 tok/s at roughly 14.4% acceptance same weights, same GPU, same drafter, radically different numbers depending purely on how predictable the output was. The author's framing is worth borrowing directly: with speculative decoding, tokens per second stops being a pure hardware benchmark and becomes a predictability benchmark as well.&lt;/p&gt;

&lt;p&gt;Draft Model Overhead DFlash's drafter is not free. Every verification round costs: (a) the drafter's forward pass over the current context window plus the projected target hidden states, and (b) the target model's parallel verification pass over the proposed block. At small batch sizes the drafter's cost is latency you pay regardless of whether tokens get accepted; at large batch sizes, the drafter competes with the target model for the same GPU compute and memory bandwidth budget. Separately track draft latency and verification latency don't let the two get absorbed into a single "decode step" number.&lt;/p&gt;

&lt;p&gt;One overhead source is easy to miss entirely: where token selection actually executes. In the same 30B benchmarking log referenced above, greedy token selection for the drafter was initially routed through a CPU-side path even though the drafter itself ran on GPU, forcing a device-to-host round trip and synchronization inside the hottest loop in the system. Moving argmax selection directly into the drafter's on-GPU backend graph a one-line addition to the computation graph produced a 5.6% throughput gain in isolation, and compounded further once the workload was predictable enough for DFlash to matter. The general lesson: if utilization, acceptance rate, and wall-clock throughput don't agree with each other, check for host/device synchronization boundaries in the draft loop before assuming the model or the GPU is the bottleneck.&lt;/p&gt;

&lt;p&gt;Batch Size &amp;amp; Concurrency Scaling Speculative decoding's speedup shrinks as batch size grows, because the target model's per-token verification cost is amortized across a larger batch even without speculation the marginal value of "free" extra tokens per pass declines as the GPU is already well-utilized. This is precisely why serving stacks increasingly auto-disable speculation past a concurrency threshold (commonly observed around 32 concurrent sequences in production configs): beyond that point the drafter's overhead can net-negative your throughput. Any benchmark that reports a single TPS number without stating the batch size it was measured at is not reporting a usable result.&lt;br&gt;
2.3 The economic version of the same problem&lt;br&gt;
The TPS-hides-the-truth pattern isn't unique to speculative decoding; it's the same failure mode that's now well documented on the agentic-coding side of the industry. One widely circulated account describes a team that switched to "the top model on SWE-Bench" and saw its monthly inference bill roughly triple for the same amount of completed work, because the higher-scoring model burned several times more tokens per resolved ticket, more tool-call turns, and had worse prompt-cache reuse than a slightly-lower-scoring, much cheaper alternative. The generalizable point for this article: a single leaderboard number whether it's "% solved" on a coding benchmark or "tokens/sec" on a speculative-decoding benchmark collapses several independent cost and quality axes into one figure that's easy to publish and easy to misread. The fix in both cases is the same discipline: report the cost-bearing metrics (tokens burned, tool turns, cache hit rate for agentic benchmarks; acceptance rate, mean accepted length, draft overhead for speculative decoding) alongside the headline number, not instead of it.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Technical Breakdown: DFlash Architecture on 30B Models
3.1 How the block-diffusion draft pass works
DFlash's drafter takes the current sequence, injects context features extracted from multiple layers of the target model's hidden states (via a lightweight projection into the drafter's own KV cache), and denoises a block of block_size positions: an observed "anchor" token (the most recent target-verified token, or a sampled bonus token) followed by masked future positions. In one non-autoregressive forward pass, the drafter fills in all masked slots at once. The target model then does a single parallel verification pass over the whole block structurally identical to how EAGLE or Medusa verification works, but the proposal step is what changed from sequential to parallel.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Two configuration knobs matter most for a 30B benchmark:&lt;/p&gt;

&lt;p&gt;num_speculative_tokens (vLLM) / speculative-num-draft-tokens (SGLang) the block size, commonly 15–16 in published DFlash configs. Larger blocks raise the ceiling on tokens-per-round but also raise the cost of a rejected block and the verification compute per round.&lt;br&gt;
Draft attention backend DFlash configs frequently pin a specific attention backend for the drafter independent of the target model's backend (e.g., fa4 for the draft path while the target uses trtllm_mha), because the drafter's attention pattern (over a short masked block plus injected context features) has different optimal kernels than the target's long-context causal attention.&lt;/p&gt;

&lt;p&gt;Meta's own Glimmer drafter is a concrete instance of this design: it pulls hidden-state features from five specific layers of the 52-layer target model (rather than one), injects them into every layer of the drafter rather than just the drafter's input, and uses five draft layers where EAGLE-3-style drafters typically use one. The stated rationale echoed by independent technical write-ups of the release is that because block-diffusion drafting makes proposing 16 tokens cost roughly the same as proposing one, the drafter can afford to be bigger and better-conditioned without paying the per-token drafting tax that sinks autoregressive drafters as block size grows.&lt;br&gt;
3.2 Why 30B behaves differently than 8B or 70B&lt;br&gt;
8B target models are so cheap to run that the drafter's overhead is nearly irrelevant. Almost any speculative method shows a large relative speedup because the baseline is already fast in absolute terms, and single-GPU memory bandwidth is rarely the binding constraint even at moderate batch sizes.&lt;/p&gt;

&lt;p&gt;70B+ target models typically require tensor parallelism across 2–8 GPUs. This introduces cross-device communication (NVLink or PCIe all-reduce) into every verification step, and that communication cost is largely invariant to how many tokens are being verified in a round meaning the relative benefit of speculative decoding's parallel verification is partially masked by a fixed communication tax that has nothing to do with drafting quality.&lt;/p&gt;

&lt;p&gt;30B dense (or 30B-class MoE) target models on a single GPU sit in the regime where:&lt;/p&gt;

&lt;p&gt;Decoding at BS=1 is memory-bandwidth-bound (you're streaming ~30B parameters' worth of weights through HBM per token), which is exactly the bottleneck speculative decoding is designed to amortize by extracting multiple tokens per weight-streaming pass.&lt;br&gt;
There's no cross-device communication tax, so speedups measured here reflect the drafting/verification mechanism itself, not TP topology.&lt;br&gt;
The drafter is proportionally more expensive relative to the target than it would be at 70B+, so draft overhead artifacts are visible rather than buried in noise.&lt;/p&gt;

&lt;p&gt;This is why 30B is diagnostically useful: it's large enough to be memory-bandwidth-bound (where speculative decoding should help most) and small enough that a single GPU's kernel scheduling and drafter overhead aren't hidden behind multi-GPU communication effects. It's also, not coincidentally, exactly the tier Meta targeted architecturally with Glimmer: a hybrid local/global attention layout (39 of 52 layers use 2,048-token sliding-window attention, only 13 use full-sequence attention) combined with a 16:1 grouped-query-attention ratio, which independent analysis estimates cuts a theoretical 104GB KV cache at 131K context down to roughly 1.7GB specifically so the whole stack (weights, KV cache, vision projector, and DFlash drafter) fits on a single 24GB consumer GPU. The point for benchmarking purposes: at this tier, attention layout and cache geometry decisions interact with speculative decoding's memory-bandwidth story just as much as the drafter itself does, and a benchmark that only reports tok/s without VRAM footprint at real context length is missing half the picture.&lt;br&gt;
3.3 Edge cases where TPS lies to you&lt;br&gt;
High aggregate TPS, degraded interactivity. At high concurrency (BS=16–32+), aggregate TPS can climb even as per-user TBT gets worse, because the scheduler is packing more sequences through the same compute budget the aggregate number goes up while every individual user's stream gets choppier. This is the single most common way teams misread a benchmark: they run a throughput sweep, see a great TPS number at BS=32, and ship it as the "interactive" configuration.&lt;br&gt;
TPS dip at BS=1 from verification overhead. At BS=1, if acceptance rate on a given workload is mediocre (e.g., long-form reasoning with high token entropy), the fixed cost of the drafter's forward pass plus a mostly-rejected verification round can make single-stream generation slower than plain autoregressive decoding for that specific request pattern even though the same configuration shows a clear win on code-completion traffic. A single blended TPS number across a mixed eval set hides this entirely.&lt;br&gt;
Block-size vs. acceptance-rate mismatch and why acceptance rate alone can pick the wrong config. Cranking num_speculative_tokens up looks good on paper (bigger ceiling) but if your traffic's real acceptance rate is low, you're paying for larger rejected blocks more often. The "optimal" block size is workload-dependent and should be swept, not assumed from a published default. A published 30B sweep makes the trap concrete: a 4-token draft block reached 47.5% acceptance but only 34.5 tok/s, while a 15-token block accepted a much smaller 18.0% of proposals yet reached 47.2 tok/s 37% faster despite accepting proportionally far fewer tokens, because the longer block amortized each expensive target-model verification pass across more committed tokens on average. Acceptance rate alone would have pointed you at the 4-token config; only mean accepted length (τ) explains why the 15-token config actually won on throughput. Report both, and don't let acceptance percentage alone drive your block-size decision.&lt;br&gt;
Hidden sampler defaults silently changing your numbers. A serving stack's default sampling parameters can diverge from a model's documented recommendation without any error or warning. In the same published 30B log, removing an unrequested default min-p=0.05 filter that llama.cpp applied on top of Meta's documented temperature/top-p/top-k settings raised measured throughput by roughly 8%, because the extra filter was changing which candidate tokens became authoritative and therefore whether the drafter's proposed prefix survived verification. A benchmark that reports temperature but omits top-p, top-k, and min-p including whatever the serving stack defaults to when you don't set it explicitly is not reproducible.&lt;br&gt;
Long-context KV cache position changes decode speed on its own. A server accepting a large --ctx-size proves the context loads, not that it performs. In the same case study, filling a 262K-token context to capacity dropped far-cache decode throughput to 21.56 tok/s a large drop from the 84.64 tok/s measured on the same configuration with a short prompt purely because attention over a fully occupied long-context KV cache is more expensive regardless of the drafter. Context capacity and context performance are different claims; benchmark both an empty and a realistically full cache.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Real-World Benchmarking Blueprint &amp;amp; Metrics Matrix
4.1 Metrics matrix what to capture, and at what granularity
Metric
What it captures
Report at
Raw aggregate TPS
Total server throughput
Per batch size / concurrency level
Effective interactivity (tok/s/user)
What a single user actually experiences
Per concurrency level, P50/P90
TTFT
Prefill + queueing latency
P50/P90/P99, separate from decode
TBT / ITL
Per-token decode latency
P50/P90/P99, separate from TTFT
Draft acceptance rate
Draft quality on this workload
Per task category (code, chat, reasoning)
Mean accepted tokens/round (τ)
Realized speedup ceiling
Per task category
Draft model overhead
Compute/bandwidth cost of drafting
Isolated draft-pass latency
Draft-selection backend path
Whether argmax/selection stays on-GPU
Per config, checked once per deployment
Sampling parameters (incl. hidden defaults)
Reproducibility of the acceptance numbers
Full set, every run
GPU VRAM footprint
Deployability
Target weights + draft weights + KV cache at target max concurrency, measured at realistic cache fill, not load time
Quality vs. quantization
Whether speed gains cost accuracy
Perplexity or task eval, paired with every quant variant benchmarked&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This is intentionally a shape, not a filled-in scoreboard: the actual values are workload-, hardware-, and quantization-dependent, and any number pulled from a vendor blog without your own traffic replayed through it should be treated as a rough prior, not a deployment decision. Treat the columns above as the minimum set your own benchmark run needs to populate before you trust a "DFlash gave us Nx" claim.&lt;br&gt;
4.2 Step-by-step benchmarking framework&lt;br&gt;
Step 1 — Stand up the serving stack with DFlash enabled.&lt;/p&gt;

&lt;p&gt;vLLM, on a 30B-class target with a matched DFlash draft checkpoint:&lt;/p&gt;

&lt;p&gt;vllm serve Qwen/Qwen3.5-27B \&lt;/p&gt;

&lt;p&gt;--speculative-config '{"method": "dflash", "model": "z-lab/Qwen3.5-27B-DFlash", "num_speculative_tokens": 15}' \&lt;/p&gt;

&lt;p&gt;--attention-backend flash_attn \&lt;/p&gt;

&lt;p&gt;--max-num-batched-tokens 32768&lt;/p&gt;

&lt;p&gt;SGLang, on the 35B-A3B MoE variant:&lt;/p&gt;

&lt;p&gt;export SGLANG_ALLOW_OVERWRITE_LONGER_CONTEXT_LEN=1&lt;/p&gt;

&lt;p&gt;python -m sglang.launch_server \&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;--model-path Qwen/Qwen3.5-35B-A3B \

--speculative-algorithm DFLASH \

--speculative-draft-model-path z-lab/Qwen3.5-35B-A3B-DFlash \

--speculative-num-draft-tokens 16 \

--tp-size 1 \

--attention-backend trtllm_mha \

--speculative-draft-attention-backend fa4 \

--mem-fraction-static 0.75 \

--trust-remote-code
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;For local / single-GPU llama.cpp deployments (the path Meta's own Glimmer GGUF release and most community DFlash benchmarks actually use), the two flags most likely to silently sink your numbers if misconfigured are the ones that load the drafter and place its layers on GPU if you set one and forget the other, the drafter runs on CPU while the GPU waits, which can make speculative decoding measurably slower than plain decoding. Confirm the drafter's layers are actually on-device before trusting any throughput number from a llama.cpp-based benchmark.&lt;/p&gt;

&lt;p&gt;Step 2 — Establish a non-speculative baseline first. Re-run the same server without --speculative-config / --speculative-algorithm to get your autoregressive TTFT/TBT/TPS floor. Every speculative-decoding number is only meaningful relative to this baseline, measured on identical hardware, identical max-num-batched-tokens, and identical prompt/output length distribution.&lt;/p&gt;

&lt;p&gt;Step 3 — Sweep batch size / concurrency, not just one operating point. Run at BS=1 (interactivity floor), a mid-range concurrency (e.g., 8), and your expected production ceiling (e.g., 32+). DFlash's own benchmark harness supports this directly:&lt;/p&gt;

&lt;p&gt;python -m dflash.benchmark --backend vllm \&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;--base-url http://127.0.0.1:8000 --model Qwen/Qwen3.5-27B \

--dataset gsm8k --num-prompts 128 --concurrency 1 --enable-thinking
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Repeat with --concurrency 8, --concurrency 32, and swap --dataset across your representative task mix (the harness ships with gsm8k, math500, humaneval, mbpp, and mt-bench out of the box — supplement with your own production prompt sample if these don't reflect your traffic).&lt;/p&gt;

&lt;p&gt;Step 4 — Segment results by task type before averaging anything. Run code-completion-style prompts, open-ended chat, and long-form reasoning traces as separate benchmark passes. A blended acceptance rate across all three will systematically overstate performance on your hardest workload and understate it on your easiest one. Independent community benchmarks of DFlash on Qwen3.6-27B under llama.cpp go a step further and pair the speed sweep with a correctness check — since greedy speculative decoding is lossless with respect to the target model, comparing pass@1 on a math benchmark between the plain baseline and the DFlash-accelerated server is a useful sanity check that your speedup isn't coming from a quantization or sampling bug that's also changing outputs.&lt;/p&gt;

&lt;p&gt;Step 5 — Instrument TTFT and TBT independently, either via your serving stack's built-in Prometheus metrics (both vLLM and SGLang expose per-request TTFT/ITL histograms) or via a client-side harness like vLLM's benchmark_serving.py, which reports percentile latency breakdowns rather than a single averaged number.&lt;/p&gt;

&lt;p&gt;Step 6 — Capture VRAM at your real target concurrency, not at BS=1. The draft model's weights and its own (smaller) KV cache are additive to the target model's footprint headroom that looks generous at BS=1 can disappear once you're holding KV cache for 32 concurrent long-context sequences plus the target and draft weights. This matters more than it sounds: on a real 24GB-class deployment, a GGUF file size alone (e.g., a "17GB quant") is not the memory you need add the KV cache, any vision projector, the drafter's own weights and cache, and runtime/kernel overhead before assuming you have headroom.&lt;/p&gt;

&lt;p&gt;Step 7 — If you're evaluating quantization alongside DFlash, benchmark them together, not separately. Two target quants with near-identical perplexity can still expose different hidden-state features to the drafter and produce meaningfully different acceptance rates quantization quality and speculative-decoding compatibility are separate axes, and perplexity alone can't tell you which quant will actually pair well with your drafter. In one published sweep, the fastest quantized variant (a hybrid low-precision format) had the worst perplexity of the set tested, and was rejected for production despite topping the throughput table while the variant with the best perplexity was, in turn, roughly 13% slower with worse DFlash acceptance than the mid-precision option that was ultimately selected. Treat quant selection as a Pareto-frontier problem across perplexity, throughput, and acceptance rate simultaneously not a single "pick the smallest file that still passes eval" decision.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Practical Key Takeaways &amp;amp; Recommendations
When DFlash is a strong fit for 30B deployment:&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Agentic and tool-calling workflows, where output is often structurally predictable (function signatures, JSON- or XML-shaped arguments, repeated scaffolding) and acceptance rates tend to run high. This is also the exact use case Meta targeted with Glimmer's architecture; a model designed around long-running tool-call loops is, not coincidentally, a model that plays especially well with a block-diffusion drafter.&lt;br&gt;
Code completion / code generation, for the same reason high local token predictability plays directly to a well-conditioned block drafter's strength. Published 30B results back this up sharply: a coding workload reached 4.5x over plain decoding in one case study, while a mixed agentic workload on the identical setup landed closer to 2.1x.&lt;br&gt;
Long-context generation at low-to-moderate concurrency, where you're memory-bandwidth-bound on decode and not yet compute-saturated by batching the regime where speculative decoding's core value proposition is strongest, though remember that decode speed itself degrades as the KV cache actually fills, independent of the drafter.&lt;/p&gt;

&lt;p&gt;Where to be cautious:&lt;/p&gt;

&lt;p&gt;High-concurrency, throughput-maximizing deployments (large batch serving) verify your specific batch-size cutoff where speculation stops paying for itself, and configure the serving stack to auto-disable speculation past that point rather than assuming it will.&lt;br&gt;
Open-ended creative or high-entropy reasoning workloads benchmark acceptance rate on your actual traffic before assuming published numbers transfer. Architecture-planning and ambiguous-reasoning prompts are the specific failure mode published case studies keep flagging: multiple continuations can be equally valid, an exact-token verifier still rejects the drafter's alternative, and the round is wasted.&lt;br&gt;
Vendor-published, batch-one, greedy-decoding numbers presented as "the" speedup. Even a mainstream lab's own official drafter (Glimmer's DFlash checkpoint) is benchmarked this way, and independent commentary on that release was explicit that these figures shouldn't be treated as universal interactive speeds. Rerun the vendor's own numbers on your sampling configuration before trusting them.&lt;/p&gt;

&lt;p&gt;Before you deploy, not after:&lt;/p&gt;

&lt;p&gt;Never trust a single aggregate TPS number, insist on TTFT, TBT, acceptance rate, mean accepted length (τ), and VRAM footprint reported together, at a stated batch size, on your own workload mix.&lt;br&gt;
Benchmark at the batch size you'll actually run in production, not the one that makes the demo look best.&lt;br&gt;
Segment acceptance rate and speedup by task category a single blended number will mislead you in whichever direction your eval mix happens to be skewed.&lt;br&gt;
Re-run your baseline (non-speculative) on identical hardware and settings every time you re-benchmark driver, kernel, and framework version drift can shift the baseline enough to invalidate a stale comparison.&lt;br&gt;
Treat published multipliers (6x, 2.5x over EAGLE-3, 15x on Blackwell, or even a lab's own 3.1x for a shipped 30B model) as best-case upper bounds set under favorable batching, sampling, and hardware conditions your mileage on a 30B model, your traffic, and your GPU will vary, and the only way to know by how much is to run the benchmark yourself.&lt;br&gt;
Report sampling parameters in full, including anything your serving stack defaults to silently a single unrequested default filter has been shown to cost single-digit-percent throughput on its own in a real deployment.&lt;br&gt;
Confirm the draft-selection path stays on-device (GPU) before trusting any llama.cpp-class benchmark; a CPU round-trip inside the draft loop is an easy, common, and easy-to-miss source of a several-percent throughput hit.&lt;br&gt;
If quantization is in scope, benchmark it jointly with the drafter, not independently perplexity and DFlash acceptance rate are separate axes and the best quant on one is not automatically the best on the other.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Further Reading
For teams that want to go deeper than this guide, a few external write-ups are worth the time:&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;A detailed, numbers-heavy field log of getting a dense 30B model (Meta's Muse Glimmer), 256K context, vision, and DFlash to coexist on a single 24GB Blackwell GPU the source of most of the concrete acceptance-rate, block-size, min-p, and GPU-argmax numbers cited throughout §2–§4 of this article.&lt;br&gt;
Independent architectural analysis of Muse Glimmer's hybrid local/global attention and GQA design, useful background for understanding why 30B-class models are being built specifically around single-GPU memory budgets rather than just scaled-down frontier architectures.&lt;br&gt;
A skeptical, caveat-heavy read of Meta's own Glimmer benchmark claims, which is a good template for the kind of question-everything posture this article recommends applying to any vendor's speculative-decoding numbers including Meta's own.&lt;br&gt;
Community reproductions of DFlash on Qwen3.6-27B (llama.cpp) and on Apple Silicon via MLX, both of which pair throughput sweeps with correctness checks (pass@1 against a non-speculative baseline) rather than reporting tok/s alone.&lt;br&gt;
A broader, non-DFlash-specific piece on why leaderboard percentages can hide multi-x differences in real operating cost the same discipline this article recommends applying to acceptance rate and mean accepted length applies just as directly to token/dollar economics on the agentic-coding side of the industry.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>webdev</category>
      <category>programming</category>
      <category>productivity</category>
    </item>
    <item>
      <title>The Python List Multiplication Trap: Why Your Nested Lists Are Mutating Together</title>
      <dc:creator>ail akram</dc:creator>
      <pubDate>Wed, 12 Aug 2026 08:52:55 +0000</pubDate>
      <link>https://dev.to/ail_akram_dcc5063c428734b/the-python-list-multiplication-trap-why-your-nested-lists-are-mutating-together-13d9</link>
      <guid>https://dev.to/ail_akram_dcc5063c428734b/the-python-list-multiplication-trap-why-your-nested-lists-are-mutating-together-13d9</guid>
      <description>&lt;p&gt;You're building a 2D matrix for a competitive programming problem. Quick and confident, you write:&lt;/p&gt;

&lt;p&gt;grid = [[]] * 3&lt;/p&gt;

&lt;p&gt;Three empty rows, ready to hold your data. You update the first row:&lt;/p&gt;

&lt;p&gt;grid[0].append(1)&lt;/p&gt;

&lt;p&gt;You print the result expecting [[1], [], []]. Instead, Python hands you this:&lt;/p&gt;

&lt;p&gt;print(grid)  # [[1], [1], [1]]&lt;/p&gt;

&lt;p&gt;Every row changed. Not just the one you touched. If you've hit this wall, you've run straight into the python nested list multiplication trap, one of the most common and most confusing bugs for developers moving from simple lists to nested data structures. It looks like a Python bug. It isn't. It's a direct consequence of how Python handles object references, and once you understand the mechanism, you'll never fall for it again. Let's break down exactly why this happens and how to build nested lists the right way.&lt;br&gt;
The Problem Code: A Bug That Looks Like Magic (In a Bad Way)&lt;br&gt;
Here's the trap in its purest form:&lt;/p&gt;

&lt;p&gt;grid = [[]] * 3&lt;/p&gt;

&lt;p&gt;grid[0].append(1)&lt;/p&gt;

&lt;p&gt;print(grid)  # Output: [[1], [1], [1]] -&amp;gt; Unexpected!&lt;/p&gt;

&lt;p&gt;At first glance, this looks completely reasonable. [[]] * 3 should mean "three empty lists," right? And grid[0].append(1) should only affect the first one.&lt;/p&gt;

&lt;p&gt;But Python doesn't see three lists. It sees one list, referenced three times.&lt;/p&gt;

&lt;p&gt;This isn't a one-off quirk either; it's common enough that it has its own long-standing entry in the official Python FAQ, and it shows up repeatedly in Python's own issue tracker. Reports like bpo-27135 ("nested list produced with multiplication is linked to the same list"), bpo-45169 ("shallow copy occurs when list multiplication is used to create nested lists; can confuse users"), and bpo-25975 ("weird multiplication") were all filed by developers who ran into this exact behavior and assumed, reasonably, that they'd found a bug. Every one of them was closed as "not a bug" the behavior is intentional and documented, just deeply unintuitive.&lt;br&gt;
The Root Cause: Object References and the Python List Multiplication Trap&lt;br&gt;
To understand why this happens, you need to understand what a Python list actually stores. This is where most explanations get hand-wavy. Let's fix that.&lt;br&gt;
Variables Are Labels, Not Boxes&lt;br&gt;
In many beginner-friendly explanations, variables are described as "boxes" that hold values. That mental model breaks down fast in Python. A more accurate picture: variables are labels (or pointers) attached to objects living in memory. When you write x = [], Python creates an empty list object somewhere in memory, and x becomes a name that points to it.&lt;/p&gt;

&lt;p&gt;This matters enormously when you're dealing with nested structures.&lt;br&gt;
What [[]] * n Actually Does&lt;br&gt;
When you write [[]], Python creates:&lt;/p&gt;

&lt;p&gt;One empty inner list object (let's call its memory address 0xA1).&lt;br&gt;
One outer list containing a single reference to that object.&lt;/p&gt;

&lt;p&gt;Now here's the critical part. When you multiply that outer list by n, Python does not go back and create new inner list objects. It simply repeats the existing reference n times inside the outer list. The * operator duplicates the pointer, not the object.&lt;/p&gt;

&lt;p&gt;This is the essence of a python shallow copy vs deep copy list problem. A shallow copy duplicates the top-level container but leaves nested objects shared. [[]] * n is effectively a shallow duplication of a single reference it was never designed to clone what that reference points to.&lt;/p&gt;

&lt;p&gt;Classic references on this trap, including the old Python Cookbook recipe "Creating Lists of Lists Without Sharing References," break the process down into two conceptual steps to make it click:&lt;/p&gt;

&lt;p&gt;row = [0] * 5      # one list, five references to the immutable value 0&lt;/p&gt;

&lt;p&gt;multi = [row] * 3  # one outer list, three references to the SAME row object&lt;/p&gt;

&lt;p&gt;Seen this way, multi[0][0] = 'Changed!' isn't editing "row 0" it's editing the only row object that exists, and all three names in multi are watching it.&lt;br&gt;
Why It Only Bites You With Mutable Elements&lt;br&gt;
This is the detail that trips up even experienced developers: [0] * 5 is perfectly safe, but [[0]] * 5 is not. The difference isn't the multiplication, it's whether the repeated element is mutable.&lt;/p&gt;

&lt;p&gt;nums = [0] * 3&lt;/p&gt;

&lt;p&gt;nums[0] = 1&lt;/p&gt;

&lt;p&gt;print(nums)  # [1, 0, 0]  -&amp;gt; totally fine&lt;/p&gt;

&lt;p&gt;Here, nums[0] = 1 doesn't mutate the integer 0 in place (you can't make integers immutable). It rebinds index 0 to point at a brand-new integer object, leaving the other two slots pointing at the original. Nothing is shared after the rebind, so nothing looks broken.&lt;/p&gt;

&lt;p&gt;Contrast that with a mutable element like a list or dictionary:&lt;/p&gt;

&lt;p&gt;grid = [[0]] * 3&lt;/p&gt;

&lt;p&gt;grid[0][0] = 1  # this MUTATES the shared inner list in place&lt;/p&gt;

&lt;p&gt;print(grid)  # [[1], [1], [1]]&lt;/p&gt;

&lt;p&gt;grid[0][0] = 1 doesn't rebind grid[0] to a new list it reaches inside the existing shared list and changes it in place. Since all three slots in the grid are names for that same object, the mutation is visible through every one of them. The same shared-reference risk applies to dictionaries and sets used as the repeated element, e.g. [{}] * 3 or [set()] * 3 any mutable container will exhibit the exact same behavior.&lt;br&gt;
Proving It with id()&lt;br&gt;
Don't take this on faith, verify it yourself. Python's built-in id() function returns the memory address of an object, which is the fastest way to expose a python list multiplication reference issue:&lt;/p&gt;

&lt;p&gt;grid = [[]] * 3&lt;/p&gt;

&lt;p&gt;print(id(grid[0]))  # e.g., 140234567891200&lt;/p&gt;

&lt;p&gt;print(id(grid[1]))  # e.g., 140234567891200&lt;/p&gt;

&lt;p&gt;print(id(grid[2]))  # e.g., 140234567891200&lt;/p&gt;

&lt;p&gt;All three IDs are identical. grid[0], grid[1], and grid[2] are not three different lists that happen to look the same; they are three names for the exact same object. Calling .append() on grid[0] mutates that one shared object, and since every "row" is just another label for it, all three appear to change at once. This is a textbook python matrix initialization bug, and it's why using [[]] * n for a matrix or 2D grid is almost always wrong.&lt;/p&gt;

&lt;p&gt;As a debugging habit: whenever a value changes somewhere you didn't expect, don't start by second-guessing your logic check id() on the objects involved first. If two variables that should be independent return the same id(), you've found a shared-reference bug in seconds instead of hours.&lt;br&gt;
The Correct Solutions to Create Independent Nested Lists in Python&lt;br&gt;
Now for the fix. The goal is simple: instead of copying a reference to one list, you need to create n genuinely separate list objects.&lt;br&gt;
Solution 1 (Recommended): List Comprehension&lt;br&gt;
The cleanest, most Pythonic way to create independent nested lists in Python is a list comprehension:&lt;/p&gt;

&lt;p&gt;grid = [[] for _ in range(n)]&lt;/p&gt;

&lt;p&gt;Why this works, and [[]] * n doesn't: a list comprehension executes the expression [] fresh, on every single iteration of the loop. Each pass through range(n) triggers a brand-new call that constructs a brand-new empty list object, with its own unique memory address. There's no shared reference anywhere in sight.&lt;/p&gt;

&lt;p&gt;Verify it the same way as before:&lt;/p&gt;

&lt;p&gt;grid = [[] for _ in range(3)]&lt;/p&gt;

&lt;p&gt;print(id(grid[0]), id(grid[1]), id(grid[2]))&lt;/p&gt;

&lt;h1&gt;
  
  
  Three completely different addresses
&lt;/h1&gt;

&lt;p&gt;Now mutating one row leaves the others untouched:&lt;/p&gt;

&lt;p&gt;grid[0].append(1)&lt;/p&gt;

&lt;p&gt;print(grid)  # [[1], [], []]  -&amp;gt; Exactly as expected&lt;/p&gt;

&lt;p&gt;This pattern is also the standard, idiomatic approach to any python list comprehension nested list initialization whether you're building a matrix, a grid for a grid-based algorithm, or a list of buckets for a hashing exercise.&lt;br&gt;
Solution 2: Explicit Loops or the copy Module&lt;br&gt;
If you prefer explicit, step-by-step logic (or you're teaching this concept to beginners), a plain for loop achieves the same result:&lt;/p&gt;

&lt;p&gt;grid = []&lt;/p&gt;

&lt;p&gt;for _ in range(n):&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;grid.append([])
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Each loop iteration calls [] again, exactly like the list comprehension does, generating a fresh object every time.&lt;/p&gt;

&lt;p&gt;Alternatively, if you already have one populated list and want independent copies of it, Python's copy module offers deepcopy():&lt;/p&gt;

&lt;p&gt;import copy&lt;/p&gt;

&lt;p&gt;template = [1, 2, 3]&lt;/p&gt;

&lt;p&gt;grid = [copy.deepcopy(template) for _ in range(n)]&lt;/p&gt;

&lt;p&gt;copy.deepcopy() recursively clones an object and everything it contains, guaranteeing no shared references anywhere in the structure. This matters most when your inner lists aren't empty or contain other mutable objects (like nested lists or dictionaries) a shallow copy.copy() or slicing (template[:]) still shares references to any nested mutable objects inside. In fact, even list.copy() on a list of lists is only a shallow copy: it creates a new outer list, but every nested mutable element inside it is still the same shared object. Full independence at every depth requires copy.deepcopy() or a comprehension.&lt;br&gt;
The Trap Hiding Inside the Fix&lt;br&gt;
A list comprehension only guarantees a fresh outer object on each iteration it doesn't automatically make everything inside safe if you reuse an already-created mutable object from outside the loop:&lt;/p&gt;

&lt;p&gt;shared_row = []&lt;/p&gt;

&lt;p&gt;grid = [[shared_row] for _ in range(3)]&lt;/p&gt;

&lt;p&gt;grid[0][0].append(1)&lt;/p&gt;

&lt;p&gt;print(grid)  # [[[1]], [[1]], [[1]]]&lt;/p&gt;

&lt;p&gt;Here, the comprehension does create three independent outer lists but each one holds a reference to the same pre-existing shared_row object, so mutating it through any slot shows up everywhere. The fix is the same underlying principle: make sure the mutable object itself is freshly constructed inside the loop, not captured from outside it.&lt;br&gt;
When Shared References Are Actually What You Want&lt;br&gt;
The reference-repeating behavior of * isn't purely a footgun it's occasionally exactly the tool for the job:&lt;/p&gt;

&lt;p&gt;Immutable repeated elements numbers, strings, tuples are always safe with *, since there's nothing to mutate in place; any "change" just rebinds a slot to a new object.&lt;br&gt;
Read-only lookup tables or sentinel values. Repeating a reference to a shared, never-mutated configuration object or a shared None placeholder n times is a memory-efficient, intentional use of the same mechanism.&lt;br&gt;
Deliberate shared mutable state, such as several slots that should all reflect updates to one shared cache object, can also legitimately rely on this. In that case the "bug" is the desired behavior as long as it's intentional and clearly documented, since the next person reading the code will otherwise assume it's a mistake.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;               Read the full article visit Hustletoai.com
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

</description>
      <category>ai</category>
      <category>python</category>
      <category>devops</category>
      <category>web3</category>
    </item>
  </channel>
</rss>
