07 Nov 2025 » The human experience of coding with an agent
Thus far, we have covered basic work with an agent, how to use it for real engineering development, and special considerations for scientists. But this leaves a gap: how do we humans work with agents on a daily basis? How does it work emotionally? What is the bigger ethical picture?
What does flow state look like with agents?
I deeply value flow state / deep work. When it’s just me and a text editor, I know what that means: I close my eyes, take a few breaths, start the pomodoro timer, and drop into my happy place. Agents perturb that pattern. When they are working, what should we do?
For me it depends on the task. If I am planning a major feature or refactor using claude, I stay present. I find this type of work mentally taxing, so having a few seconds to breathe is welcome. On the other hand, if it’s working on a well-scoped task, I just have it running on a dedicated monitor and keep an eye on...
(full post)
04 Nov 2025 » Writing scientific code using agents
Scientific programming differs from general-purpose coding. For instance, a web server should be robust to all sorts of terrible inputs and never go down. In contrast, if I’m writing a scientific data analysis pipeline, I want it to come to a screeching halt at the first indication that the inputs deviate from my expectations.
This post builds on the Agentic Git Flow workflow with domain-specific considerations for scientific code.
Correctness is paramount, but typical tests can be challenging to formulate
In science we sometimes don’t know the right answer, making it challenging to write an effective unit test. One useful strategy is to compare implementations. For example, I can often write a model component in a horribly slow but obviously correct way with nested for loops. The output of a slow version can be used to test a fast vectorized version.
If the code is mathematical, I have found it useful to use the Math PR Summarizer agent to translate the code back into mathematical notation. Having the model in a different, more easily read format can... (full post)
01 Nov 2025 » Agentic Git Flow
Git Flow is a lovely and industry-standard means of developing software, as follows.
- Code changes are first proposed with an issue. This could be a bugfix or a new feature.
- A dedicated branch is made to address that issue.
- Changes are made on that branch.
- Once the changes are satisfactory, a pull request is made to change the main branch.
- This pull request is reviewed, feedback is incorporated, and then the branch is merged.
This pattern works well for agentic coding as well, but it needs to be augmented to clarify what success means.
In this post I will describe our formal approach to software development with agents. It allows the agent to operate autonomously but offers many chances to make sure the code is as you wish.
Formalize your goals and procedures
- A document should be maintained with the overall plan and design of the project. This could be a
.texdocument describing the mathematical details of a model, or a collection of Markdown files that can be browsed using mkdocs.... (full post)
30 Oct 2025 » Agentic coding from first principles
Agentic coding is the process of using an AI agent to assist in code development. I have found tremendous value in agentic coding and want to share my experiences, understanding, and lessons learned about using these tools for scientific work.
Claude Code is an example agentic coding system. It is a command-line program that you run on your local machine. Such an agent can edit your local files and run commands, which distinguishes it from using a chatbot interface to an LLM.
Having access to your source files means that you can say things like:
The model in @loris/binarybcon_models.py is not working as well as it should. See details in @docs/design/ ... I suspect a difference between generation and model fitting. and it will look through your code and suggest fixes.
Because it can run commands on your behalf you can say:
Please run `make test` and fix any failing tests It can also search the web, which of course is great for all manner of things, such as... (full post)
20 Aug 2025 » Dear future trainee:
I am disturbed by the reduction of opportunities for PhD students and postdocs. The loss of funding for programs will have effects for generations of scientists. Although our research group certainly is not immune, we are financially better off than most.
Thus, we are going to make an effort to increase the number of trainee spots in our group.
I am not doing this because it is the most efficient or easiest way to run a lab. I am doing this because I care about this generation, I love science, and I want there to be great scientists in the future. In many ways, it would be easier for me personally to have a smaller group populated by professional staff.
On the other hand, mentorship can be a sublime experience, with trainees exploring new directions and sparking joy. Watching a young scientist develop is thrilling! But I have found that it works best when expectations are clear up front. Here are some things I would like you to know in addition to our overall expectations of group members.
... (full post)17 Aug 2025 » The term 'affinity maturation' understates the influence of somatic hypermutation
I get a little bubble of excitement every time I encounter someone who doesn’t know about antibody affinity maturation. When I do, I get to point at my neck lymph nodes and describe that there is this little Darwinian process inside you that evolves antibodies to have higher affinity (i.e. bind better) against whatever just made you sick. Isn't that amazing? I will accept public speaking slots or alumni panels just so I can tell more people about it.
But the reality of affinity maturation is more interesting and complicated than this cursory description would suggest. It’s a noisy process of mutation and selection, and if you aren’t careful, it can actually be difficult to discern the signal of natural selection from the mutation biases! That may come as a surprise for people who only hear the short version.
Let’s juxtapose three recent manuscripts from our group and discuss this phenomenon.
In the replay project, we had a special opportunity to understand selection in a system we could observe in great detail. In a... (full post)
18 May 2025 » The next five years are going to be amazing for learning biological processes through probabilistic models
I am looking forward to a future in which AI will greatly reduce friction in designing and implementing models that directly reflect underlying biological knowledge and are directly interpretable. This can be contrasted with the “monolithic” paradigm of AI that works to develop a big black-box model. In that paradigm, one feeds all the data into a large model, and the model makes predictions. One can interpret the monolithic model post-hoc, meaning that one can query the model to try to figure out how it is reasoning. I do not doubt that this monolithic paradigm is going to be interesting and useful for some situations, but it’s not the one that I’m most excited about.
Rather, I love building models that directly reflect underlying biology; the parameters of these models can be directly interpreted in scientific terms. For example, in recent work... (full post)
07 Apr 2025 » Two new approaches to learn about antibody somatic hypermutation

Somatic hypermutation (SHM) is one of the craziest things I’ve ever heard of: we have enzymes that intentionally damage and mutate our DNA! This process is the foundation of the affinity maturation process that enables us to generate high-affinity antibodies against just about any target. Without it, we’d be limited to “just” random recombinants of germline genes.
Our SHM work was motivated by a desire to reconcile statistical analysis of somatic hypermutation with what we know mechanistically from lab experiments. Whenever one can bring reality into modeling there is the potential for a double win: one can learn something about underlying mechanism, and one can get better inferences by using a model that reflects underlying reality.
My interests were piqued by several fascinating papers. On the computational side there were Spisak et al 2020 and Zhou and Kleinstein 2020 who found evidence for an effect of absolute position along the sequence in SHM rates. The Spisak paper in particular showed a very irregular pattern of per-site effects that seemed surprising. One the lab... (full post)
Complete list of all posts