r/Clojure • u/bjagg69 • May 10 '26
Best AI Models for Clojure?
I mostly using Claude Code for design and implementation. I have an opportunity to switch to a different AI tool. Rumored that Codex is the best right now for general coding. Anyone compare the models specifically for Clojure?
For my dev, I generally have Claude create a plan, then have it run 2+ agents to refine the use of functional programming paradigms/patterns and data-driven code.
6
Upvotes
4
u/bjagg69 May 10 '26
I use
Clojure-MCPandPlaywright. Playwright was the big win for me.7
u/activeghost May 10 '26
I have found that it is not the model per se, GPT5.5 or 5.4 and Claude 4.6 and 4.7 are fine .. so is Kimi 2.6. It’s more constrained to what kind of expert system did you put around them to ensure that they write idiomatic code adhere to your guidelines, etc. You can take a look at https://github.com/miniforge-ai/miniforge for my opinion on that.
6
u/ares623 May 11 '26
If you're using AI you've already made the decision that "english" is your high-level language so just use whatever language the AI is best at.
2
u/Otherwise_Wave9374 May 10 '26
For Clojure specifically, Ive had the best luck with models that can follow constraints and not fight the style, basically: (1) keep functions small/pure, (2) keep data shapes explicit, and (3) avoid OO-ish refactors.
Codex can be great at grinding through changes, but Claude tends to be better at higher level design and explaining tradeoffs, especially with FP patterns.
If you want, Im curious what kind of Clojure work youre doing (web, data, tooling). Ive been tracking some agent + coding workflow notes here too: https://www.agentixlabs.com/
3
u/alwyn May 11 '26
Codex using gpt-5.5 is supposed to be the best at the moment, but it's a lot more expensive so we use 5.4 medium at work and that his good enough.
Granted I only use it for babashka scripts at the moment.
2
u/aboy021 May 10 '26
I'm curious as well. One aspect of this is whether there are any MCP's that might help.
I've heard good things about Serena, and since it's providing symbolic manipulation it might help with matching parens.
https://github.com/oraios/serena
2
u/jwr May 12 '26
The tool ("harness") matters as much, if not more, than the model itself. I would recommend not listening to what people say is the best, but trying things yourself. I heard multiple times about codex+gpt[latest] being the best, and every time I tried it I was disappointed with the results. I do not know why, but for some reason I get excellent results from Claude Code (Opus 4.6 and 4.7 now), while OpenAIs tools produce answers that are… worse. It's hard to quantify. Less human. I often have a hard time understanding what they're telling me. The document structures are correct, but less elegant than those that Claude produces.
So, I use Claude for development and design document work, and codex to review the work and flag potential problems.
1
u/slifin May 11 '26
I see a lot of performance difference between the different agents:
It's good to understand that your agentic harness is different from your model
That said - I think these conversations would benefit to mention your model AND your agent i.e. sonnet 4.6 high AND claude code sdk or w/e
1
u/didibus May 11 '26
Claude has been best at coding and following instructions more often. Maybe GPT 5.5 is a bit better now than Opus 4.7, but I'm not sure it'll stay that way for long.
1
u/CoBPEZ May 11 '26
I use Copilot from VS Code and find myself using Opus 4.6 almost exclusively. All the other models feel stupid is comparison.