Lack of strictly enforced static typing make agents fail much sooner with Python. In my opinion, Rust and Scala are the best targets for agentic flows - and, coincidentally, they have the most advanced typers among mainstream languages.
But any statically typed language behaves better than any dynamically/duck typed language. When I say "better" I mean delivery time and the amount of shipped defects.
Another thing which helps (but not generally applicable) - ask your agent to verify critical protocols with formal proof in TLA+/lean/coq. Agents are bad at formal proofs - but generally are much better than most of the humans.
Just tell your agent "Use type hints. Add a pre-commit hook to run ruff, black, mypy, and pytest." It will save you 99% of headaches.
Relying on the prompt to ensure the code it writes is correct is where things fail. Types, tests, linting, etc. are deterministic tools the agents tend to respect.
Typical failure mode: "I fix pyright error A, it causes pyright error B, pyright is broken, I will exclude both A and B through pyright config and will add ignore annotations for both A and B and will write a couple of idiotic comments about that".
Also, in many cases it's cheaper to rewrite a small lib instead of fighting crappy code - but that applies regardless of the target language.
I kid, I kid, but seriously …
Studies report that the language design tends to result in lower defect code (vs peers such as Go and Java) due to how the syntax aids error handling, logic flow, and API design.
You don't need to know Rust to begin using it. You'll learn it quickly enough.
The code is easy to read, and Serde makes parsing, especially JSON, extremely pleasant. Writing HTTP services is a breeze.
AI makes Rust development go 10x faster. The borrow checker isn't even an issue. It's invisible now. You almost never hit it anyway when you write web services, but now it's no issue at all when writing highly concurrent code too. Claude etc. emit the correct code and lifetimes, and it's entirely ergonomic and idiomatic.
The biggest problem with Rust is the compile time.
And I don't see how Go design patterns would be any worse. The main issue people have with it is the repetition/verbosity, which LLMs handle just fine.
What happens when things break and the AI agent can't fix it?
A failure to compile is by far the easiest thing for the AI to fix.
You're unlikely to wind up in such a situation though. The design work Claude does in Rust is really sensible and idiomatic, and I really don't think you'll be unable to refactor or redesign things. Claude is extremely good with Rust generation, refactoring, and manipulation.
I'll go as far as to say that AI has removed most of the complaints people had with learning or using Rust. It's not even a speed bump now.
Not even close. The problem is not only writing the code, it’s being able to review and understand it. An AI can’t magically transfer that knowledge into someone’s brain, they have to develop that knowledge themselves.
I’m dealing with this currently with a team of ML developers. A couple of them like Rust, the rest don’t know it. They’ve tried to submit AI-written PRs, but typically they’re incredibly over-engineered, e.g. changing 40 files when the feature really only needed changes to one or two. Or else they have other problems that the prompter wasn’t experienced enough to recognize.
Also they are extremely bad at high-level design.