Two years ago most HPC groups I know were sure that a language model could not touch a numerical code without breaking it. This morning I gave a talk at the Innovative Computing Laboratory at the University of Tennessee to an audience that builds PaRSEC, PAPI, and the linear algebra libraries a lot of science runs on. They were the right skeptics. I was one of them two years ago, and I would rather argue with a skeptic than convince an enthusiast.
This is the talk, written down, with the demo replaced by the reasoning behind it. The short version: the tools crossed a line in 2025, the line is narrower than the marketing says, and whether an agent helps or hurts an HPC codebase is decided almost entirely by how you feed it context.
The timeline is short.
- 2023, the chat window. You pasted a function in and pasted a function out, with no memory of the project and no way to run anything.
- 2024, the editor. Cursor, GitHub Copilot, and Continue could see several files and complete in place, but a person still drove every step.
- 2025, the terminal. Claude Code, Gemini CLI, Codex CLI, and the open-source pair of Aider and Cline can read a repository, run the build, run the tests, and turn an issue into a pull request. The Model Context Protocol gave all of them one way to call external tools, which is the piece that makes them usable on a cluster instead of a laptop.
That is the current state. It does not mean an agent can write a kernel. It means an agent can do the surrounding work that consumes most of an HPC developer’s week, if you run it inside a process. Process is a word I use on purpose. I spent the better part of a decade in the army before I spent a day in a lab, and the thing the army teaches about any powerful tool is that the procedure around it matters more than the tool.
Three workflows that hold up
After a year of using these tools on our own systems and watching students use them, three patterns keep working. Everything else is a variation or a failure.
Plan, review, execute. For bug fixes, refactors, and any change that touches more than one file, never let the agent act on the first prompt. Give it the issue, the error log, and the stack trace. Ask for a numbered plan. Read the plan. Only then let it execute, step by step, and validate with the test suite afterwards.
The demo this morning used a real PaRSEC bug, issue 643, where a check in the GPU device code meant to identify newly created data was too broad and silently skipped legitimate transfers for reshaped descriptors. With the issue text and a pointer to device_gpu.c, an agent finds the condition and explains why it is wrong in a few minutes.
Without the plan step, the same agent wanders the tree for ten minutes and edits the wrong file. The plan is where the human catches the wrong direction before it costs anything. I do not skip this step when I am sure. Especially when I am sure.
Prime the context, do not accumulate it. For a new feature or a fresh session, load only what the task needs. A project file such as CLAUDE.md should be under two hundred lines: the build, test, and lint commands, the style conventions, the two or three architectural patterns that matter. Not the design document. Not the history.
A slash command that reads the README, the package manifest, and git ls-files gives the agent a map of the repository for a few thousand tokens. When the context gets bloated, clear it and prime again. Long conversations get worse, not better. This took me longer to accept than it should have, because a long conversation feels like progress.
Delegate long work to a second agent. For anything that takes more than a few minutes, launch a separate agent in its own Git worktree with a written spec, let it work while you do something else, and have it write a report file when it finishes. You come back, read the diff, and merge or discard. This is the pattern that turns the tools from a faster autocomplete into something that produces work while you are in a meeting. It only works because the worktree isolates the blast radius and the report makes the result reviewable.
The skill is context engineering
Most agent failures I see are not model failures. They are context failures: the agent was given a vague goal, the wrong files, or a window so full of stale conversation that the important instruction was lost in the middle.
Two habits fix most of it. Reduce: keep the window small, load MCP servers only when the task needs them, and never paste a design document into memory. Delegate: push side tasks to sub-agents so the primary context stays clean.
The prompt itself should be written like a program. Inputs are the variables: file paths, error output, API signatures. The workflow is a numbered sequence of steps: read these files, identify this pattern, propose a fix under these constraints. The output is a format: a plan, a patch, a report. The workflow section is the one people skip, and it is the one that matters most. “Fix the module” produces generic code. “Read x.c and y.h, find every caller of foo, propose a change that keeps the ABI stable, and list the tests that cover it” produces a change you can review.
The non-negotiables
Treat everything an agent writes as code from a new hire. Review it. Run the tests. Do not merge because the explanation was fluent. Fluency is the cheapest thing a model produces. I have been fooled by it, and I review code for a living.
Close the loop inside the session: the agent implements, runs the tests, reads the failure, and iterates until they pass, and then a person validates the final state. Measurable completion criteria have to exist before the agent starts, or “done” means whatever the model says it means.
Keep the history. Aider commits atomically by default; the others can be configured to. A log of what the agent did and why is the only way to audit a change a week later.
And do not disable the permission prompts to save time. Every serious failure story I have heard from a research group starts with someone turning off the approval step because it was slowing them down.
What kills adoption in the first three months
The same things, every time.
Someone points a cloud tool at proprietary or export-controlled code, and the group gets a ban instead of a policy. The fix is a local-first path from day one: a model served through Ollama or a similar runtime on a machine you control, an open agent such as Aider or Cline, and your own keys where a cloud model is allowed. A 32-billion-parameter coding model on one 48 GB GPU is good enough for most of the surrounding work today.
The rest are self-inflicted, and each one costs a group a month.
- Vague prompts. Someone prompts vaguely, gets generic output, and concludes the tools are toys.
- Context overload. Someone loads every MCP server and a giant memory file, and the agent gets lost in its own context.
- A broken install. Someone installs the CLI with
sudo npmand spends a week on permission errors. - Autonomy without review. Someone expects the agent to finish alone and ships a hallucinated function.
And some things still fail on merit, not on setup. Performance optimization of a kernel. Algorithm design. Numerical stability. One-shot large refactors. Use the agent for boilerplate, tests, documentation, build system repair, and navigation. Keep the kernel. When a student asks me whether an agent can write their kernel, my answer is that it can write the test harness for it by lunch, and that is the better trade.
What I asked the room to do is small. Pick one task this week and run it through plan, review, execute. Write a CLAUDE.md under two hundred lines. Build one MCP server for something you already have on the cluster: Slurm job state, PAPI counters, HDF5 metadata. Our own servers for scientific data live inside CLIO Kit and the tools I use for that are public. If the agent cannot do your task today, that is not a verdict. It is a gap in the scaffolding, and building the scaffolding is the interesting work.
Update, September 2026
Eleven months later, the three workflows are unchanged and the tools are not. The terminal agent I now run against models on my own hardware is PanCode, which I started in April 2026 to own the control loop, the tool permissions, and the record of each run instead of inheriting them from a fork. If you want the local-first path from this talk with the review step, the bounded workers, and the sealed record built in, the tutorial Run PanCode against a model on your own GPU starts from nothing.