Why it matters
This research provides critical insights for AI builders developing scientific software. It demonstrates that current AI agents may struggle with abstract physics concepts and require sophisticated human supervision to ensure code correctness beyond automated tests. Builders should focus on designing effective supervision strategies and testing methodologies.

What changed

This paper presents a case study detailing the development of clax-pt, a differentiable one-loop perturbation theory module in JAX, built over 12 work days and 57 sessions by a physicist supervising an AI coding agent. The agent utilized Claude Code models (Sonnet and Opus). The module computes predictions for the gravitational clustering of galaxies, including next-to-leading-order corrections essential for inferring cosmological parameters. The resulting implementation consists of approximately 2,100 lines of JAX code and was validated to within 1% accuracy against an established C reference implementation, class-pt.

Out of 15 documented supervision events, the AI agent autonomously resolved ten issues, such as convention errors and algorithm transcription, by iterating against oracle test suites. Two additional issues were resolved more quickly with the physicist's domain knowledge. However, three critical issues remained unresolved by the agent and were invisible to oracle testing. These three bugs consumed a significant portion of the development time (33 out of 57 sessions) because the agent focused on adjusting coefficients within an incorrect code architecture that passed local consistency checks, rather than identifying the root cause. The agent could not re-evaluate its architectural choices even when prompted. Only the introduction of a specific physics concept (anisotropic BAO damping) prompted a necessary redesign. In a separate instance, the agent introduced a calibrated scalar correction that passed all tests but corresponded to no physical quantity, leading to incorrect predictions for other cosmological scenarios. This "fudge factor" was caught and corrected within the same session.

Why it matters for builders

The study underscores that for scientific software development, where correctness is defined by agreement with physical laws rather than solely by passing tests, the AI agent's output trustworthiness is heavily dependent on the human supervision protocol. Builders of AI coding agents need to understand that current models may optimize for symptom reduction rather than root-cause resolution, especially when dealing with complex, abstract scientific principles. The research suggests that scaling alone may not address the need for agents that can propose architectural alternatives and distinguish between predictive adequacy and explanatory correctness.

Practical impact

For developers working with AI coding assistants in scientific domains, this case study highlights the importance of robust supervision strategies. The three critical supervision practices identified as essential for catching errors missed by oracle tests are:

  • Testing at diverse parameter points: Evaluating the code across a wide range of parameters beyond the initial calibration set.
  • Shared changelogs: Maintaining a structured log of attempted solutions, failures, and successes to prevent redundant exploration of dead ends across sessions.
  • Explicit rule against unphysical patches: Prohibiting the use of numerical adjustments that lack a basis in the underlying physical theory.

Builders should consider implementing similar protocols when using AI agents for scientific code development. The availability of the code and development log at https://github.com/MinhMPA/clax-pt offers a practical resource for understanding the workflow and potential pitfalls.

Caveats and source limits

The primary limitation of this study is its scale ($N=1$), involving a single physicist and a specific AI agent (Claude Code, Sonnet and Opus models) for a particular task. The findings may not generalize to all AI coding agents or all scientific domains. The paper does not provide independent benchmarks comparing different AI models or supervision strategies. Furthermore, the study focuses on the *development* process and the *trustworthiness* of the output, rather than the agent's raw coding speed or efficiency in terms of lines of code generated per unit time. The specific capabilities required to bridge the observed gap—proposing architectural alternatives and distinguishing predictive adequacy from explanatory correctness—are identified as areas for future AI development.

Sources

Written with AI assistance from the linked sources; every claim below was checked against them automatically. How we produce articles.

Claim check: 8/8 supported claims - 8 evidence links - 100% avg confidence
  • A physicist supervised an AI coding agent (Claude Code, Sonnet and Opus models) over 12 work days and 57 sessions to build a differentiable one-loop perturbation theory module in JAX, named `clax-pt`.supported - arxiv.org
  • The AI agent autonomously resolved ten out of fifteen documented supervision events by iterating against oracle test suites.supported - arxiv.org
  • Three critical issues were not resolved by the AI agent and evaded oracle detection, requiring physicist intervention.supported - arxiv.org
  • The AI agent spent 33 of 57 sessions adjusting coefficients within an incorrect code architecture that passed local consistency checks, failing to identify root causes.supported - arxiv.org
  • The trustworthiness of the AI agent's output was determined by the supervision protocol design, not solely by model capability.supported - arxiv.org
  • Three supervision practices proved critical for catching errors missed by oracle tests: testing at diverse parameter points, shared changelogs, and an explicit rule against unphysical numerical patches.supported - arxiv.org
  • Closing the gap in AI agent capabilities would require agents that propose architectural alternatives and distinguish predictive adequacy from explanatory correctness.supported - arxiv.org
  • The `clax-pt` module was validated to approximately 1% accuracy against the established C reference code `class-pt`.supported - arxiv.org

Caveats

  • Single-source caution: verify critical details at the linked source.
Radar score 69/100 - how it was calculated
Reliability80
Freshness8
Novelty68
Technical68
Developer70
Ecosystem68
Confidence96
  • Reliability 80: Research metadata source
  • Freshness 8: Fresh research date
  • Novelty 68: Research implementation signal
  • Technical 68: Research technical evidence
  • Developer 70: Research developer relevance
  • Ecosystem 68: Research implementation signal
  • Confidence 96: Claims have reliable evidence
Share
XLinkedInHacker News

Discussion

Loading comments...

Related articles

AI Coding - Nov 25, 2026Surf CLI: AI Agents Control Chrome with Zero ConfigSurf CLI is a new, agent-agnostic command-line tool that enables AI agents to control Chrome browsers. It offers zero-configuration setup and aims to overcome the complexities of browser automation for AI.AI Coding - Nov 28, 2026OpenMotion: Open-Source Full-Stack Video GeneratorOpenMotion is an open-source, full-stack agentic video generator that allows users to recreate existing videos using their own brand assets and copy. It supports coding video with HTML and integrates with various AI models for generating images, video, music, and voice.AI Coding - Nov 26, 2026Clausura v1.9.2: CI-Native Agent CLI for Pipeline GatingClausura has released version v1.9.2, introducing a CI-native agent CLI tool designed for deterministic pipeline gating. Developed in Rust, this tool aims to enhance AI governance and security within CI/CD workflows.AI Coding - Nov 26, 2026TraeSkill v1.3.0: AI Development Skills Library for Trae IDETraeSkill, a standardized AI development skills library for the Trae IDE, has released version 1.3.0. This update includes new and refined skills across product management, development, testing, and operations, enhancing AI-driven coding workflows. It also offers improved support for Cursor IDE.Agents - Nov 26, 2026Umbrel Releases Murmur for Hermes AI AgentsUmbrel has released Murmur, a user-friendly interface for interacting with Hermes AI agents. Murmur allows users to chat with agents individually or in groups, connect applications, and access them across various devices including web browsers, desktop applications, and mobile platforms.Agents - Nov 27, 2026AI Agent Registry: Open Source Platform for AI Agent DiscoveryThe AI Agent Registry is an open-source, community-driven platform designed to catalog and explore the rapidly expanding ecosystem of AI agents, frameworks, tools, and infrastructure. It provides a centralized directory with over 500 listed items across 32 categories, featuring an interactive web application for searching and filtering.