r/Clojure • u/calmest • Jan 19 '26
Agentic Coding for Clojure
I just wanted to post a quick note about my experience over the last month using Cursor for my development work. I am a solo developer working on an education app that supports student writing with AI. This app is in use around the world at universities and K-12 schools. It is under active development with grants from the IES and NSF and some commercial support.
I have been a software developer for 30+ years. I have been using Clojure for my work in earnest since 2016. This app is an SPA with over 58,000 LOC of both Clojure(script) and a little Javascript. I have been using Cursor as my IDE for a little over a year.
Prior to a month or so ago, my typical usage was to run agents in Ask mode, meaning the agent did not do anything autonomously. I inspected all work and would transfer code into the project manually (Cursor makes this easy). This worked quite well and was the only way I felt comfortable coding given the limitation of the agents. As time progressed, the AI and agent framework has improved dramatically. I can now say that I code new features and fixes with supervised full agent autonomy. I of course thoroughly review everything still, and my long experience as a developer helps a lot with strategic choices about what to develop and how.
The introduction of Claude Opus 4.5 and improvements in Cursor's agent scaffolding have made autonomous agent coding not only possible, but it is now my daily process. I use plan mode to create a complete development plan which I revise extensively until it is good, then I have the agent implement the plan. This has been working very well. Opus 4.5 handles Clojure(script) very well. It has full access to Clojure documentation and any library docs. It uses the linter on its own to fix mismatched form closes (or any issue) which is quite a sight to see. It really is a major leap forward in competency for these agent frameworks. I have not had time to explore other frameworks like Claude Code etc... but I expect they would provide similar results.
I use the $200/mo. plan from Cursor and have managed to burn through about 70% of my monthly usage allotment. I was on the $20/mo. plan initially but needed to upgrade for usage. The cost is very well worth it IMO.
TL;DR Clojure(script) autonomous agent coding is now completely doable with a good agent framework and AI model (i.e. Opus 4.5). These agent frameworks are not just for popular JS frameworks any longer. The AI tools can adeptly handle all of Clojure tooling. This is just a heads up to the community for those of you that have not been in this space. I would be interested in hearing about other's experiences.
23
u/TheKL Jan 19 '26
200 dollars per month is crazy to me. You have a return on that investment ?
5
u/calmest Jan 20 '26
This post has sparked a great conversation that I felt was needed in the Clojure community. I will respond to many of the points made.
First off, I'm happy to hear from many of you that you have had similar experiences with the newer models and frameworks wrt Clojure development. I found your experiences very interesting and inline with my own. I look forward to learning more.
To those of you that tried using AI a while ago for Clojure development and backed off because of the state of things at that time, you are the very people this post was meant to reach. I urge you to try the latest models and frameworks again. I think you will see tremendous improvement.
With respect to all of the "productivity" concerns about claims made. I'm not interested in proving my experiences to you, and I can't. If you are sincere about this topic then I urge you to get a free plan and try it for yourself. If you a simply opposed to AI in general then that's your belief and I will not try to change your mind. However, I will say that AI is here and it isn't going away no matter how you "feel" about it. You can debate the reality of its capabilities as much as you like but it won't change the facts, IMO.
With regards to whether it is morally or emotionally "good" to use AI for development work, that is a valid debate but not one I am interested in having here. There are threads all over reddit that have and are hashing this out. I have been an AI researcher and software developer since the 1990s. I am well versed in all of these issues. I do not dismiss any of your concerns, but I do disagree on several points. The most concerning to me is the simple denial of the capabilities that AI is unlocking and the determined rejection of its use. I see this in all sectors that AI is affecting. As I have mentioned, I work in education at a major university. At least half of the faculty of the education college are wary of AI usage and a good third are outright emotionally disturbed by it. Yet, as I said, the genie is out of the box now so, IMO, it is better to think about the constructive ways to use this new technology and try to avoid the negative possibilities as best we can.
Denial of its power and utility seems foolish to me. I use AI like I would use any other tool to help me to develop better code more easily and more efficiently. I try very hard to review all code produced and I do maintain a good understanding of my codebase. It has not become a "black box" to me and I would be uncomfortable if that were the case. However, I do fear that that is the ultimate direction we are heading. AI doesn't need to use any one existing language for development. In fact it will likely, in time, develop its own languages that work well for it but are nearly incomprehensible to humans. This is a real concern and don't believe we have even begun to have serious discussions about that inevitability. To further compound this issue, AI is advancing far more quickly than most people realize. Five years from now the dev industry may be unrecognizable and MANY people may lose their jobs as many already have. It will take time to sort all of this out but we should start thinking about this now.
For now, on this little plateau in time, I find it a very helpful tool that does greatly improve my productivity in very tractable and useful ways. I urge all of you to explore these tools and understand how they are working now, and start thinking critically about what is coming down the road very quickly. With massive changes like this comes great opportunities but there is always a cost. We should try hard to mitigate that cost.
4
u/bjagg69 Jan 19 '26
Is this app open source? I work for a company that consults in higher ed and EdTech. Always looking for excuses to code in Clojure(Script).
7
u/xela314159 Jan 19 '26
Claude code + Clojure-mcp-light user here and blown away.
On the back end giving Claude full access to the REPL allows it to test its changes live. Small improvements that would have taken 1h are maybe 10mn now. The big stuff still takes time but a lot less tedious.
On the front end Claude knows arcane React and CSS patterns and does a reasonably good job at translating it to CLJS.
I think it’s overall good for the Clojure community - syntax no longer an issue so anyone can work with a CLJ codebase, makes the language less of a burden for companies. OTOH surely will put pressure on wages especially for junior Clojure devs (if such a thing exists)
6
u/dustingetz Jan 19 '26
I am also finding Opus 4.5 to be viable for a variety of Clojure application layer tasks. Prior to Opus 4.5 I was experimenting semi-seriously in consulting projects but none of the experiments I threw at it panned out. But Opus 4.5 is now part of my daily driver, I am using VSCode + Copilot with the two Calva plugins. Opus 4.5 will inspect objects at the REPL and everything. Looking forward to trying Claude Code again in a work context.
4
u/Simple1111 Jan 19 '26
Same. Claude, Codex, Gemini, OpenCode is where I'm spending virtually all of my time. It's proficient in Clojure but I've started branching out to new languages for personal projects to see if it's significantly better. I've been pleased with it's ability to write Go and Typescript.
3
u/maxw85 Jan 20 '26
Same experience here, work that took us weeks in the past condense to hours.
3
u/andyc Jan 22 '26
I think some people are like "these things are just for people who can't code. I can code good so I should be able to do without it". Well, it's what I thought until recently. But I just started accepting that sometimes the stuff I thought was important wasn't actually that important and we ended up with a better design.
I've never been the kind of person who thrives in live in-person design sessions because these discussions often go too fast for me to think about all the things I want about that might be related. So it's really nice to be able to bounce my ideas around with an intelligent other but still get to control the pace and agenda myself which I can't always do with humans 😀.
5
u/256BitChris Jan 19 '26
In my experience Claude Code with Opus 4.5 is amazing at clojure, especially if you tell it to follow Clojure idioms of data driven applications and simplicity.
I originally hesitated to even try CC with Clojure because I thought for sure it would be horrible since Clojure is so niche - but I was completely wrong - it has simplified so much of my legacy code (written like a former Java dev) and then also created clojure idomatic, data-first programs which actually show the power of Clojure that I was never able to achieve myself.
I was at a point where I was thinking about leaving Clojure for good and going back to TS, Java, or GoLang because my mental model was that these static typed languages would be better with LLMs. However, using the lein compile, check, and other tools that CC knows how to call (it's been teaching me) allow it to make changes, verify them, and iterate for me. It's one of the most amazing things I've ever seen.
I was afraid that there'd be problems with parenthesis (since humans have this problem) but it's only happened once and then Claude Code figured out how to fix it without bothering me. I don't use any MCPs either as I keep my context window pretty clean.
Also, I saw another post in here about how Clojure is the most token efficient language and that really made me excited.
Long story short, I'm sticking with Clojure as my backend stack now and in the future - the way Claude Code can write near perfect pure functions and then compose them together in Clojure feels like the super power that I've always wanted to achieve with Clojure but didn't have the personal ability to do so.
I think if more people realized that you could write JVM programs very well with Clojure and AI, then that might actually be the spark clojure needs to start growing in adoption again. Let's hope so!
6
u/raysiuuuu Jan 19 '26
If you are asking AI to generate the code, why choose Clojure that is optimized for developer interests not best optimized for AI?
There are tons of AI fitting languages out there, and you could delegate to them to write code, test code, and document code to take the developer work out of hand and forfeit all the qualities.
To me, paying $200/mo and just do review/clean up, it'd be more worth to pay a trainee that amount and have a real person friend.
8
u/Super_Broccoli_9659 Jan 19 '26
this sounds horrible, why would anyone move from developing software to orchestrating ai agents to create their stuff. so you let some algorithms do the creative part, and you clean up, review and prompt plans? and even pay for the agents? what's wrong with you people? robots should clean up my toilet and not code
2
u/andyc Jan 21 '26
Another long-time clojure user here. Agree with you completely. These later models seem to love clojure and write better simpler code than I ever have.
And with your prompting you can set it into a kind of "exploration mode" where you can let it introspect your environment as it sees fit. I've learnt all kinds of tricks by watching it explore a repo. It will ask questions, you can intervene with additional instruction when you see it going off track.
Thankfully I don't have to pay for it as I get to use my employer's bedrock account but I'm also making things go an order of magnitude faster so the bosses seem inclined to let it cook.
But if I was contracting I'd definitely pay for it myself (although suspect you could convince client to pay in most cases so that they retain all the data and outputs in their own accounts).
1
u/lgstein Jan 20 '26
What problem does this solve? Does it save you time/make dev less boring/or what?
1
u/FootballMania15 Jan 19 '26 edited Jan 19 '26
Grumble grumble, AI slop, grumble grumble.
Haters aside, I'm right there with you. I use Claude Code, similar workflow, and have been blown away by the results.
2
u/[deleted] Jan 25 '26
[removed] — view removed comment
10
u/[deleted] Jan 19 '26
[removed] — view removed comment