Thursday, June 18, 2026

10 ideas for getting higher R code out of your AI coding agent

Code evaluate expertise can be found from many sources. For instance, Sentry has a code evaluate talent in its repository. Aimed particularly at its undertaking’s wants, it may be a helpful pattern for comparable expertise. And superpowers is a well-liked set of general-purpose programming expertise that’s billed as “a whole software program growth methodology in your coding brokers, constructed on prime of a set of composable expertise and a few preliminary directions that be certain your agent makes use of them.” I don’t use superpowers, however numerous different folks clearly do given its greater than 227,000 GitHub stars and 20,000 forks.

One other tip: A number of specialists recommend utilizing a special LLM — possibly even from a special supplier — to conduct a code evaluate, since every mannequin has its personal strengths and weaknesses.

Don’t overlook basic prompting good habits

No matter programming language you’re utilizing, being clear will enhance your outputs. Maintain your requests focused, and don’t count on the LLM to learn your thoughts.

“Codex handles complicated work higher whenever you break it into smaller, centered steps,” OpenAI says in its developer docs. “Smaller duties are simpler for Codex to check and so that you can evaluate. If you happen to’re unsure tips on how to cut up a job up, ask Codex to suggest a plan.”

“Take time to make your prompts as related as potential, simply as you’ll when serving to a brand new teammate scope a job,” Google advises in its 5 Greatest Practices for Utilizing AI Coding Assistants. “Take into account what particulars it is advisable to share for an individual to succeed, and supply all these particulars to your AI software.”

And, don’t load up your context window to the LLM’s printed restrict. Efficiency usually degrades as you get near the utmost token restrict.

Benefit from open LLMs, significantly when you have funds and token limits

Open-weight fashions — particularly ones sufficiently small to run on a desktop laptop — might by no means rival frontier LLMs like Claude, GPT, or Gemini. However for lots of R coding, they don’t have to.

To see how properly an LLM can write R code, it ought to have the identical type of harness that Claude Code, Codex, or Posit Assistant offers bigger LLMs. “The harness is the product,” argues Mallory Mejias at Sidecar, an AI schooling firm. “The mannequin is the engine inside it — essential, however more and more interchangeable.” I wouldn’t go that far, since I nonetheless discover the LLM to be a essential piece of this equation, and fashions differ. However the identical LLM will carry out otherwise relying on the instruments and context it has.

Posit just lately added Google’s open-source Gemma 4 26B to Assistant’s current choices of bigger, closed-source LLMs. “Up till this level, fashions of this dimension — sufficiently small to run comfortably on high-end client laptops — had been on our radar however not but succesful sufficient to drive an agent harness like Posit Assistant,” Posit senior software program engineer Simon Sofa wrote on the Posit weblog. “This has modified in the previous couple of months with releases like Gemma 4.” Nevertheless, to make use of it in Posit Assistant in RStudio, you continue to have to run it by means of a Posit AI subscription, not regionally. It makes use of 1/10 the funds that the identical session with Claude Sonnet would eat.

A number of initiatives can use Claude Code to run native LLMs. Ollama, open-source software program for working LLMs regionally, does this with the terminal command ollama launch claude --model , akin to:

ollama launch claude --model gemma4:26b

The makers of Unsloth, an open-source framework for working and coaching fashions, say working native LLMs inside Claude Code might be very sluggish as a consequence of a cache invalidation subject. They are saying this may be fastened by including "CLAUDE_CODE_ATTRIBUTION_HEADER" : "0" to ~/.claude/settings.json underneath “env”.

Unsloth can even use Claude Code to run native fashions, but it surely’s considerably extra concerned to put in and arrange than Ollama. See this Unsloth tutorial.

Open-source coding agent Open Code runs LLMs from OpenAI, Anthropic, Google, Kimi, Alibaba’s Qwen, and others. I haven’t warmed as much as it but in contrast with commercially backed CLI instruments I’ve tried, but it surely has 174,000 GitHub stars so clearly numerous followers.

AI advisor Thomas Wiegold, who switched from Claude to Open Code, mentioned “OpenCode covers every part I want for my every day workflow. It’s quick, the supplier flexibility is genuinely helpful relatively than theoretical, and the TUI is healthier for prolonged classes…. That mentioned, I’m not going to faux it’s all clean crusing.” He famous some stability points and a distant code execution vulnerability earlier this 12 months.

Wiegold’s suggestion? “Set up each. Strive others. Keep versatile.”

In abstract

Giant language fashions stay imperfect and unpredictable instruments, however they’re bettering quickly — as are the harnesses round them. Even frontier LLMs in industrial coding brokers can ignore directions at instances and in any other case behave in unpleasantly stunning methods. Nevertheless, you’ll vastly enhance your possibilities of producing high quality code when you use coding brokers, take time to set them up with high quality directions, and bear in mind good prompting strategies. Good luck!

Coding agent information

Claude Code – Anthropic’s coding agent is obtainable within the terminal and as an IDE extension, a desktop app, cellular apps, Slack app, and a cloud model that may work instantly in your repos on GitHub. Arguably the primary breakthrough coding agent, it now contains a chic remote-control choice the place you can begin a session in your desktop after which proceed it on a telephone or pill. Whereas designed for Claude LLMs, you should use it to run native LLMs by way of instruments like Ollama or Unsloth Studio. When utilizing Claude fashions, it tends to supply much less utilization than different distributors’ choices. Anthropic has posted the terminal model’s code on GitHub, with utilization ruled by Anthropic’s industrial phrases of service. You should use Claude Code by way of API pay per use or as a part of a Claude subscription.

Codex – OpenAI’s reply to Claude Code is obtainable by way of terminal, app, IDE extension, or cloud, with integrations for GitHub, Slack, and Linear. The CLI software is open supply underneath an Apache license, accessible on GitHub, and works by way of API pay per use or as a part of a ChatGPT subscription.

Posit Assistant – The Posit (previously RStudio) coding agent is designed for information work in R and Python, though Posit senior software program engineer Simon Sofa informed me it might do superb for programming work for different makes use of and in different languages. It’s accessible for the RStudio IDE (by way of a Posit AI subscription in RStudio), Positron IDE, and as a stand-alone CLI terminal app, though the CLI software presently doesn’t really feel as full-featured because the IDE integrations (which will change). As of this writing, you can too use API keys from Anthropic, OpenAI, and Snowflake Cortex and a GitHub Copilot account in Positron. Posit Assistant is being up to date fairly frequenty, Sofa informed me. If you happen to examined it a month or two in the past, it has extra capabilities now.

Antigravity CLI – Google’s terminal-based software might be changing the Gemini CLI for unpaid and Google One customers this month. There’s additionally an Antigravity IDE, SDK, and platform for orchestrating a number of brokers. One benefit of Antigravity: Google gives a free plan with entry to Gemini 3.5 Flash, Gemini 3.1 Professional, Gemini 3 Flash, Claude Sonnet 4.6, Claude Opus 4.6, and gpt-oss-120b, and what it describes as “beneficiant” however undefined weekly charge limits primarily based on “the diploma now we have capability.”

Related Articles

Latest Articles