Edward Yang (@ezyang) · October 30, 2026
ai-agentscode-review
Claude was being overly aggressive as a code reviewer and I ended up writing this to explain to it some of the nuance of when to request changes. In particular, when we’re reviewing code, we might have to consider these situations:
What if there is a preexisting problem in the code? What if, via local reasoning only, we think there could be a problem, but we can’t tell if this situation can actually occur? What if there is a problem, but the situation is low stakes and building a spaceship is counterproductive? For all of these, the answer is “it depends,” but there’s a pretty decent first pass algorithm I personally like to follow.
1. Fix preexisting problems separately.
If I’m convinced …
Continue reading →Edward Yang (@ezyang) · May 30, 2026
ai-agentscode-reviewossllm
One of the important topics being discussed among the PyTorch team is how the PyTorch codebase should engage with AI coding agents. Today, many PRs to PyTorch are AI-authored, and there have been obvious growing pains as we’ve figured things out. Based on discussions at the most recent PyTorch compiler offsite (May 2026), I’ve assembled this playbook for AI coding in PyTorch. It is half descriptive, half prescriptive: it is trying to codify practices that are being used among some members of the team, and bring everyone else along. Hopefully, this post is just the beginning of our ongoing conversation about how to engage with AI coding agents.
We can think of AI generated code as living in a …
Continue reading →