Rust and Go with agents: borrow-checker and simplicity traps
Rust and Go punish vague agent optimism differently. Rust via the borrow checker and rich types. Go via simplicity norms and explicit errors.
Rust and Go punish vague agent optimism differently. Rust via the borrow checker and rich types. Go via simplicity norms and explicit errors. Generic “write clean code” prompts produce idiomatic-looking wrong Rust, or over-abstracted Go that fights the standard library. The trap is accepting compile-green diffs that burn review time on unwrap storms and interface soup.
Language addenda, not generic style advice
For Rust: insist agents fix borrow issues properly. Ban clone storms and scattered unwrap() / expect without justification in library code. For Go: simple packages, context threading, errors wrapped with stable messages ops expect. Forbid heavy frameworks into services that were stdlib-simple unless the design gate approved them.
Related: Rules files that agents obey for where language addenda live.
Language-aware definition of done
- Attach idiom examples from this repo, not blog posts.
- Apply the language addenda in the rules file before coding.
- Run clippy/rustfmt or gofmt/go vet/staticcheck as part of done.
- Human-review concurrency. Agents invent races and leak goroutines/tasks under time pressure.
Stop when the agent “fixes” lifetimes by cloning everything, introduces panic-driven control flow, or adds interface layers nobody asked for.
Three traps that show up first

Failure modes to catch early
- Clone / unwrap storm. Rust compiles by force. Fix: require proper ownership design; justify every panic path.
- Framework inflation. Go gains a heavy stack where stdlib fit. Fix: design gate before new frameworks.
- Concurrency fantasy. Races and leaks. Fix: small PRs, explicit review checklist for send/sync, channels, and goroutine lifetimes.
A one-week practice loop

Stop gates before you ship
This week: add a one-screen Rust or Go addendum with two banned patterns from recent PRs. Next agent session: require clippy/vet evidence in the PR body. If the same unwrap or interface pattern repeats, automate a lint or delete the ambiguous rule.
Bottom line

When this fits vs when it does not
Language culture is a constraint, not a vibe. Give agents idiom examples, tooling gates, and concurrency review. For Python’s tooling order, see Python agent tooling; for TypeScript escapes, see TypeScript strict agents.
Share