Manuscript Offprint

arXiv:2610.23104

WebCoder: Scaling General Frontend Development with Artifact-Grounded Agentic Reinforcement Learning

Zijun Dou, Zhen Yang, Xijun Liu, Dongzhuoran Zhou, Aohan Zeng, Jie Tang

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

ABSTRACT

Real-world frontend development requires agents to compose reproduction, generation, modification, and repair over an evolving application state. Learning a general policy for this process requires translating heterogeneous execution feedback into task-aligned rewards and effective credit assignment across long sequences of interdependent actions. We introduce WebCoder, a general frontend development agent trained with artifact-grounded agentic reinforcement learning. Our key idea is to assess diverse development activities through their effects on a shared executable artifact and its satisfaction of task requirements. We build Webdev-World, an executable environment that integrates code editing, application execution, browser inspection, and on-demand skills while preserving project state across interactions. An independent verifier evaluates the final application against task requirements to provide terminal rewards, while changes in intermediate artifact progress redistribute the resulting rollout advantage across development segments. Context compaction and message-tree sample construction support training on trajectories beyond a single context window while avoiding repeated loss computation on shared generated history. We further introduce Webdev-Bench to evaluate composed development requirements within a single project. On Webdev-Bench, WebCoder-27B raises requirement satisfaction from 64.8 for its Qwen3.8-27B base model to 72.8, exceeding Claude-Opus-4.8 (65.1) and GPT-5.4 (59.6); on Vision2Web, it improves the average visual and functional score from 41.1 to 62.4, on par with Claude-Opus-4.8. Ablation studies confirm the contributions of artifact-grounded credit assignment and long-horizon training.

1 INTRODUCTION

Recent advances in multimodal code generation have expanded the capabilities of frontend agents, from reproducing webpage designs (Si et al., 2025; Xu et al., 2025; 2026) to refining interfaces through rendered feedback (Yang et al., 2026; Deng et al., 2026) and generating interactive websites (Lu et al., 2026). In practice, these capabilities often need to work together within the same application. A user may ask an agent to reproduce a reference design, add a product section, connect it to an existing shopping cart, and preserve the navigation behavior. These requirements share code and application state: implementing a new feature can affect the layout, while a visual revision can disrupt an existing interaction. As illustrated in Figure 1, completing such a request requires reproduction, generation, modification, and repair to be coordinated throughout development. This

  • Core contributors; † Corresponding authors.

Work was done when ZD, ZY, XL, AZ interned at Zhipu AI.

raises a central question: how can we train a general frontend agent to compose these capabilities over an evolving application state?

From Isolated Frontend Tasks to General Frontend Development

Figure

Figure 1: From isolated frontend tasks to general frontend development. (a) Existing work typically studies frontend reproduction, generation, and modification as separate task categories. (b) In real-world development, a single user request often requires multiple capabilities to be composed within a continuous, stateful, and iterative development process, followed by multi-turn and multimodal refinement over the evolving application state.

Training such an agent requires coordinating activities whose local goals differ but whose effects are coupled through shared code and application state. Satisfying one requirement can violate another, making it necessary to assess the combined effects of these activities on the application. Progress may become observable only after several edits and executions, while later changes can introduce regressions, making it difficult to distinguish the contributions of different development stages. The interaction history can also outgrow the model's context window as the project evolves. Therefore, learning a general policy requires a common basis for evaluating heterogeneous activities, credit assignment across interdependent stages, and support for long-horizon training.

To address these challenges, we introduce WebCoder, a general frontend development agent trained with artifact-grounded agentic reinforcement learning. We unify heterogeneous frontend tasks within Webdev-World, an executable environment that provides a shared, task-agnostic interface for code editing, execution, browser inspection, and on-demand skills while preserving project state across interactions. This common interaction space allows a single policy to interleave reproduction, generation, modification, and repair as the application evolves. Our key idea is to ground policy learning in the evolution of an executable application, using task requirements to evaluate both the final outcome and intermediate development progress. Evaluating build results, rendered pages, and interaction outcomes against the same requirements provides a common basis for assessing the combined effects of development activities and optimizing the policy from its own trajectories.

Specifically, we construct a weighted checklist from the task requirements and use an independent verifier to build, run, and inspect the final application. Deterministic checks and visual assessments measure requirement satisfaction, with the aggregated score gated by successful execution and rendering to form the terminal reward. This terminal reward evaluates the final outcome but does not distinguish which development stages advanced the task or introduced regressions. Thus, we estimate intermediate requirement satisfaction from available project and execution evidence using the same checklist. Changes in these estimates provide stage-level progress and regression signals, which guide credit assignment across the trajectory and help the policy learn from the development process. For training across context windows, we combine context compaction with message-tree sample construction. Compaction lets development continue while project state persists in Webdev-World. A message tree records histories across context rewrites, enabling training on different stages of the same trajectory. Shared generated history remains available as context but contributes to the policy loss at most once.

To evaluate capability composition, we introduce Webdev-Bench, which combines development requirements within a single project, including requested changes and the preservation of specified existing behavior. On Webdev-Bench, WebCoder-27B reaches a requirement satisfaction score of 72.8 against 64.8 for its Qwen3.8-27B base model and 65.1 for Claude-Opus-4.8, and delivers a running application on all 40 tasks. On Vision2Web (He et al., 2026), it achieves an average visual and functional score of 62.4, compared with 41.1 for the base model and 62.5 for Claude-Opus-4.8.

Our main contributions are summarized as follows:

• We study general frontend development as capability composition over a persistent project state, and introduce Webdev-World as a shared environment for training WebCoder, a general frontend development agent.

• We develop artifact-grounded agentic reinforcement learning, using task requirements to connect final application verification with progress-based credit assignment, and supporting training over trajectories that span multiple context windows.

• We introduce Webdev-Bench to assess capability composition and preservation of specified existing behavior, and demonstrate improved visual and functional performance on Vision2Web.

References (37)