# Best Practices for Using Coding Agents with Julia?

**URL:** <https://discourse.julialang.org/t/best-practices-for-using-coding-agents-with-julia/136829>\
**Category:** Tooling\
**Tags:** question\
**Created:** [April 22, 2026, 2:09pm UTC](https://discourse.julialang.org/t/best-practices-for-using-coding-agents-with-julia/136829 "2026-04-22T14:09:29Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Matt\_jl](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/matt_jl/32/52364_2.png) [@Matt\_jl](https://discourse.julialang.org/u/Matt_jl)\
**Post date:** [April 22, 2026, 2:09pm UTC](https://discourse.julialang.org/t/best-practices-for-using-coding-agents-with-julia/136829/1 "2026-04-22T14:09:30Z")

</div>

Very easy, just like the title says:

What are the best practices for letting coding agents start and manage Julia sessions for testing and debugging, while keeping the workflow safe, reproducible, and easy to reason about?

I think many people could find this useful, so maybe we can share our experiences, tips, and tricks in the comments below.

---

<div class="post-metadata">

**Author:** ![Satvik](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/satvik/32/20486_2.png) [@Satvik](https://discourse.julialang.org/u/Satvik)\
**Post date:** [April 22, 2026, 3:03pm UTC](https://discourse.julialang.org/t/best-practices-for-using-coding-agents-with-julia/136829/2 "2026-04-22T15:03:00Z")

</div>

Julia depends very heavily on the REPL, so you want your agent to have access to a REPL.

For me, that means spinning up a REPL in a separate tmux/zellij session. Then the agents can just use send-keys to access the REPL and get fast feedback.

---

<div class="post-metadata">

**Author:** ![sob](https://avatars.discourse-cdn.com/v4/letter/s/65b543/32.png) [@sob](https://discourse.julialang.org/u/sob)\
**Post date:** [April 22, 2026, 4:53pm UTC](https://discourse.julialang.org/t/best-practices-for-using-coding-agents-with-julia/136829/3 "2026-04-22T16:53:24Z")

</div>

I currently use the Claude Code plugin (in a non edit mode) in Codium. I’m at the experimental stage so for now it’s more of a “how can I optimized this code”, “can you find bugs in this file” type use.

I have also experimented with a purely local setup using OpenCode linked to Qwen 3.6 or GPT-OSS but have found the models inferior.

My use is rather simple, so I’m also interested in what others are doing.

---

<div class="post-metadata">

**Author:** ![hersle](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/hersle/32/211689_2.png) [@hersle](https://discourse.julialang.org/u/hersle)\
**Post date:** [April 22, 2026, 8:03pm UTC](https://discourse.julialang.org/t/best-practices-for-using-coding-agents-with-julia/136829/4 "2026-04-22T20:03:26Z")

</div>

> [@Satvik](#):
>
> Julia depends very heavily on the REPL, so you want your agent to have access to a REPL.

Has anyone been able to set up Opencode to use a running Julia REPL? Out of the box it’s restarting Julia all the time, making trivial mistakes with setting up environments etc.

---

<div class="post-metadata">

**Author:** ![apo383](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/apo383/32/11272_2.png) [@apo383](https://discourse.julialang.org/u/apo383)\
**Post date:** [April 22, 2026, 9:06pm UTC](https://discourse.julialang.org/t/best-practices-for-using-coding-agents-with-julia/136829/5 "2026-04-22T21:06:04Z")

</div>

> [@hersle](#):
>
> use a running Julia REPL?

Use an MCP server like `kaimon.jl`. You can have a persistent session with running state, which eliminates the startup cost of CLI julia.

I did a test with copilot CLI, to use Julia to create a DataFrame `df` with one column `data` with one row 1. I had to ask it to use kaimon otherwise it would spin up its own `julia` shell. But it connected to the MCP server, which you can monitor for `kaimon` TUI. I’m just getting started, but kaimon looks quite capable, and the agent knows quite a lot. You can use the `ex` MCP command, or just ask it to do stuff in natural language.

BTW copilot can also create a persistent julia session in a shell and refer back to it. Not sure what the limitations are compared to MCP.

Haven’t tried opencode but expect it would be similar.

---

<div class="post-metadata">

**Author:** ![Satvik](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/satvik/32/20486_2.png) [@Satvik](https://discourse.julialang.org/u/Satvik)\
**Post date:** [April 24, 2026, 1:00am UTC](https://discourse.julialang.org/t/best-practices-for-using-coding-agents-with-julia/136829/6 "2026-04-24T01:00:20Z")

</div>

I use a skill (a markdown file that gives the agent instructions) that I had Claude write, which tells the agent how to find an existing tmux session, start one if it doesn’t exist, start/restart the REPL, and send code to the REPL.

---

<div class="post-metadata">

**Author:** ![tim.holy](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tim.holy/32/52_2.png) [@tim.holy](https://discourse.julialang.org/u/tim.holy)\
**Post date:** [April 26, 2026, 10:47am UTC](https://discourse.julialang.org/t/best-practices-for-using-coding-agents-with-julia/136829/7 "2026-04-26T10:47:15Z")

</div>

I have started bundling package-maintenance tasks into skills. I would rate these as “maturing” rather than “mature,” as I am still regularly finding ways to improve the skills to ensure higher-quality results. I’ve also made some effort to improve context-efficiency by being specific about certain instructions (“use a subagent to …” or “don’t read the source, extract this from `Base.Docs.meta(MyPackage)` using the following script:”).

Repo: [GitHub - timholy/claude\_config: Configuration files for claude code · GitHub](https://github.com/timholy/claude_config)

---

<div class="post-metadata">

**Author:** ![freeman](https://avatars.discourse-cdn.com/v4/letter/f/ec9cab/32.png) [@freeman](https://discourse.julialang.org/u/freeman)\
**Post date:** [May 9, 2026, 3:33pm UTC](https://discourse.julialang.org/t/best-practices-for-using-coding-agents-with-julia/136829/8 "2026-05-09T15:33:26Z")

</div>

Would you share please?

I just verified that asking along the lines of “start a tmux session. write to it using tmux send-keys and see response using tmux capture-pane”, works. But it’s not a genuinely interactive session and furthermore it seems inefficient and brittle as capture-pane always captures the entire screen, and no more. And then the LLM would have to use its context window to diff between two capture-pane “states”. This looks harder than it should.

---

<div class="post-metadata">

**Author:** ![Satvik](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/satvik/32/20486_2.png) [@Satvik](https://discourse.julialang.org/u/Satvik)\
**Post date:** [May 14, 2026, 6:51pm UTC](https://discourse.julialang.org/t/best-practices-for-using-coding-agents-with-julia/136829/9 "2026-05-14T18:51:23Z")

</div>

I just uploaded the skill & scripts here: [GitHub - Satvik/julia-repl-skill · GitHub](https://github.com/Satvik/julia-repl-skill)

But I would say the specific skill is less important than the process. What you really want to do is have Claude write the skill, try it out, and then suggest improvements when you see Claude struggling. For example, in the first version I saw it had a really hard time figuring out when the REPL was done processing, so I ended up having it write a separate python script `wait-julia`.

---

<div class="post-metadata">

**Author:** ![csvance](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/csvance/32/218927_2.png) [@csvance](https://discourse.julialang.org/u/csvance)\
**Post date:** [May 14, 2026, 7:55pm UTC](https://discourse.julialang.org/t/best-practices-for-using-coding-agents-with-julia/136829/10 "2026-05-14T19:55:01Z")

</div>

When the cost of verification is an edit (hot patch w/ Revise) + single tool call to evaluate a function / expression in a REPL, these agents get crazy good at writing Julia. It’s the same principle in software engineering where a mistake caught early is cheap compared to one caught late. There is a huge difference between having an agent write some code and testing it when its done and having the agent verify things at each step. When I switched to this style of workflow, suddenly the Julia code I got back that was supposed to be non-allocating actually was, not to mention it was significantly more likely to one-shot the task.

---

<div class="post-metadata">

**Author:** ![sob](https://avatars.discourse-cdn.com/v4/letter/s/65b543/32.png) [@sob](https://discourse.julialang.org/u/sob)\
**Post date:** [May 28, 2026, 12:57pm UTC](https://discourse.julialang.org/t/best-practices-for-using-coding-agents-with-julia/136829/11 "2026-05-28T12:57:41Z")

</div>

> [@csvance](#):
>
> these agents get crazy good at writing Julia

I second that. I’ve been experimenting with Claude Code, and had it write small programs entirely on its own. The programs did the job and did it well. Burned through my 5 hour session quota rather fast though (Opus 4.7).

---

<div class="post-metadata">

**Author:** ![cstjean](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cstjean/32/1444_2.png) [@cstjean](https://discourse.julialang.org/u/cstjean)\
**Post date:** [June 2, 2026, 7:07am UTC](https://discourse.julialang.org/t/best-practices-for-using-coding-agents-with-julia/136829/12 "2026-06-02T07:07:18Z")

</div>

How does everyone use AI to produce notebook-like reports (with code + plots etc.)? Ideally it should be compatible with long-running Julia sessions (like julia-mcp, which works well) to avoid paying JIT costs over and over. Jupyter and Pluto have their own idiosyncrasies, and it looks messy to ask an agent to create a Pluto file ex nihilo. I’ve been trying with Literate.jl, but it relies on Quarto to produce HTML files (QuartoRunner hasn’t worked out for me on Windows). That’s a fresh Julia process, so each iteration/tweak requires paying the JIT startup cost.

---

<div class="post-metadata">

**Author:** ![kahliburke](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kahliburke/32/208472_2.png) [@kahliburke](https://discourse.julialang.org/u/kahliburke)\
**Post date:** [June 2, 2026, 10:32am UTC](https://discourse.julialang.org/t/best-practices-for-using-coding-agents-with-julia/136829/13 "2026-06-02T10:32:06Z")

</div>

> [@cstjean](#):
>
> How does everyone use AI to produce notebook-like reports (with code + plots etc.)? Ideally it should be compatible with long-running Julia sessions (like julia-mcp, which works well) to avoid paying JIT costs over and over.

I have a little side effort I’ve been playing with which might tickle some of these desires. Stay tuned and I can share something soon? It builds this type of functionality on top of Kaimon.jl and integrates with any agentic AI that supports MCP.

---

<div class="post-metadata">

**Author:** ![sob](https://avatars.discourse-cdn.com/v4/letter/s/65b543/32.png) [@sob](https://discourse.julialang.org/u/sob)\
**Post date:** [June 2, 2026, 12:17pm UTC](https://discourse.julialang.org/t/best-practices-for-using-coding-agents-with-julia/136829/14 "2026-06-02T12:17:28Z")

</div>

> [@csvance](#):
>
> these agents get crazy good at writing Julia.

I also second that. 6 months ago these tools produced code that called non existing functions and packages. Not even always syntactically correct. But I’m now a Claude Max client and I’m speechless. Don’t get me wrong, I’m still an expert in my field and a decent programmer, so I can guide the tool well. But it’s an amazing tool.

---

<div class="post-metadata">

**Author:** ![sob](https://avatars.discourse-cdn.com/v4/letter/s/65b543/32.png) [@sob](https://discourse.julialang.org/u/sob)\
**Post date:** [June 2, 2026, 12:21pm UTC](https://discourse.julialang.org/t/best-practices-for-using-coding-agents-with-julia/136829/15 "2026-06-02T12:21:34Z")

</div>

> [@cstjean](#):
>
> Ideally it should be compatible with long-running Julia sessions (like julia-mcp, which works well) to avoid paying JIT costs over and over

I’ve been using Claude Code a lot, and it hadn’t crossed my mind that I could speed things up like that. I guess on a modern CPU it’s not that bad, and the time spent “thinking” is an order of magnitude higher than the tool calling. Not to mention my time reviewing what CC is doing. Note: I mention CC because I have a (very good) experience with it, but its main competitor is supposed to be just as good.

---

<div class="post-metadata">

**Author:** ![kahliburke](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kahliburke/32/208472_2.png) [@kahliburke](https://discourse.julialang.org/u/kahliburke)\
**Post date:** [June 2, 2026, 12:48pm UTC](https://discourse.julialang.org/t/best-practices-for-using-coding-agents-with-julia/136829/16 "2026-06-02T12:48:32Z")

</div>

> [@sob](#):
>
> I’ve been using Claude Code a lot, and it hadn’t crossed my mind that I could speed things up like that.

Have you tried it with Kaimon.jl yet?

---

<div class="post-metadata">

**Author:** ![Satvik](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/satvik/32/20486_2.png) [@Satvik](https://discourse.julialang.org/u/Satvik)\
**Post date:** [June 2, 2026, 2:05pm UTC](https://discourse.julialang.org/t/best-practices-for-using-coding-agents-with-julia/136829/17 "2026-06-02T14:05:54Z")

</div>

Currently, it seems like Claude Code can’t really execute individual cells – it has to rerun the whole notebook. So I have it use the REPL to do all the initial work, define and test the functions etc., and then have it make a jupyter notebook and execute it at the end.

---

<div class="post-metadata">

**Author:** ![sob](https://avatars.discourse-cdn.com/v4/letter/s/65b543/32.png) [@sob](https://discourse.julialang.org/u/sob)\
**Post date:** [June 2, 2026, 6:10pm UTC](https://discourse.julialang.org/t/best-practices-for-using-coding-agents-with-julia/136829/18 "2026-06-02T18:10:11Z")

</div>

Not yet

---

<div class="post-metadata">

**Author:** ![sob](https://avatars.discourse-cdn.com/v4/letter/s/65b543/32.png) [@sob](https://discourse.julialang.org/u/sob)\
**Post date:** [June 2, 2026, 6:11pm UTC](https://discourse.julialang.org/t/best-practices-for-using-coding-agents-with-julia/136829/19 "2026-06-02T18:11:08Z")

</div>

CC will take hints from the linter in VSCode though, so I find it doesn’t actually run the `julia` binary that often.

---

<div class="post-metadata">

**Author:** ![GeorgeGkountouras](https://avatars.discourse-cdn.com/v4/letter/g/77aa72/32.png) [@GeorgeGkountouras](https://discourse.julialang.org/u/GeorgeGkountouras)\
**Post date:** [June 2, 2026, 9:35pm UTC](https://discourse.julialang.org/t/best-practices-for-using-coding-agents-with-julia/136829/20 "2026-06-02T21:35:29Z")

</div>

> [@csvance](#):
>
> When the cost of verification is an edit (hot patch w/ Revise) + single tool call to evaluate a function / expression in a REPL, these agents get crazy good at writing Julia.

Thirded. The fact that the agent can inspect the LLVM/ASM output alone is clutch. Think local Compiler Explorer.

[Next page](https://discourse.julialang.org/t/best-practices-for-using-coding-agents-with-julia/136829.md?page=2)
