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 - Oct 13, 2026Spec-Kitty v4.0.0rc6: Spec-Driven AI Agent DevelopmentSpec-Kitty has released v4.0.0rc6, a Python project focused on spec-driven development for AI agents. It aims to enforce organizational governance and consistent engineering standards through git-native missions and enforceable workflows.AI Coding - Oct 12, 2026Vetto v0.6.3: Daemon-less Sandbox for AI Coding AgentsVetto, a daemon-less OS security boundary and sandbox for AI coding agents, has released version v0.6.3. Written in Rust, it aims to provide a secure environment for tools like Codex, Claude Code, Cursor, and Aider.AI Coding - Oct 10, 2026AI DevKit: Control Plane for AI Coding AgentsAI DevKit is a TypeScript project serving as a control plane for AI coding agents. It recently released version cli@0.69.0, indicating active development and a focus on developer tools.AI Coding - Oct 13, 2026raw-cli: Local Coding Agent with Composable ToolsThe raw-cli project introduces a local coding agent designed for models with limited context. It offers composable tools, skills, hooks, and agents, accessible via a terminal REPL and a browser dashboard.AI Coding - Oct 14, 2026WrongStack AI Coding Agent v1.1.2 ReleasedWrongStack, an AI coding agent that reads code, edits files, runs commands, and reasons through bugs, has released version 1.1.2. This TypeScript project offers a terminal REPL, TUI, and browser UI, while maintaining user control over permissions.AI Coding - Oct 11, 2026Gograph v1.7.11: Local Go Static Analysis for AI AgentsGograph, a local-only Go static analysis engine, has released version v1.7.11. It provides AI coding agents with deterministic structural awareness, including call graphs and impact analysis, via a built-in MCP server.