Agentic Coding Assistants
Overview
A native R interface to agentic coding assistants. Talks directly to local command line interfaces ('GitHub Copilot', 'Anthropic' 'Claude Code') over standard input/output and to a local 'vscode.lm' bridge inside 'Positron', providing multi-model chat, tool calling, and in-session R evaluation. Supports a single stateful hal() session as well as disposable hal_ask() / hal_do() pipeline verbs, plot capture so models can see graphics, verified data transforms, and user-defined tools.
- **Plot vision: the model can now see your plots.** When
eval_rcode draws a plot -- base graphics or a returned ggplot/lattice object -- hal captures it as PNG and attaches it to the tool result as an image, so the model can describe, critique, and iterate on actual visual output ("make this plot publication-ready" now works on what the plot *looks like*). Supported on the **vscode** backend (requires the bundled hal-bridge 0.1.4) and the **claude** backend (MCP image content blocks). The **copilot** backend stays text-only until its CLI's image forwarding is verified. Disable withhal_configure(plot_vision = FALSE). Notes: returned ggplot objects are also printed to your device (they now appear in the Positron plots pane); render errors surface to the model as a## Plot render errorsection; plots written to file devices the code opens itself are not echoed; one image per eval (the final page); images larger than 5 MB are skipped.
Show all changes in 0.1.4Hide the rest of the changes in 0.1.4
- **hal-bridge 0.1.4** (bundled): tool results can carry an image part (
LanguageModelDataPart.image); if the selected model rejects image input at runtime, the bridge strips images and retries once text-only; request bodies are capped at 20 MB (413 beyond); minimum Positron/VS Code engine raised to 1.103 (first stable release with the image API). The vscode client also prunes all but the newest 2 images from the resent history so long sessions don't re-bill every old plot. - **
hal_do()now verifies its transforms.** After a successful pipe-mode transform, hal compares input and output and prints a one-line structural report -- row deltas, columns added/removed, class changes, introduced NAs (hal_do: 32 -> 14 rows | +1 col (kpl)). The full report is attached asattr(result, "hal_verify")(print it for details). Suspicious patterns -- output identical to input, or 0-row output -- raise a classedhal_do_warning. Report-only by design: deltas are often intentional ("filter mpg > 20" *should* shrink the data), so verification never triggers retries or changes values. Disable with.verify = FALSEorhal_configure(verify = FALSE). - **Fixed: the default model on the copilot and vscode backends no longer exists.** Both defaulted to
"claude-sonnet-4.6", which GitHub Copilot andvscode.lmhave since dropped from their catalogs — neither backend serves that id any more. Both now default to"claude-sonnet-5", verified present in both live catalogs. The claude backend was unaffected: it passes the"sonnet"alias, which the CLI resolves server-side and which cannot go stale this way. - **Fixed: stale model metadata.** The Claude backend's alias descriptions still named Sonnet 4.6 and Opus 4.8 as the current tiers (now Sonnet 5 and Opus 5), and reported a 200K context window for all three aliases — Sonnet and Opus are 1M natively, and only Haiku is 200K. Context windows for the newer Copilot/
vscode.lmids (claude-opus-4.8,claude-opus-5,claude-sonnet-5) were missing and reported asNA. Documentation examples naming retired ids were updated. - **Missing Copilot? hal now points you at Claude if you have it.** When hal falls back to the copilot backend and can't find the Copilot CLI, but Claude Code is installed, the error,
hal_status(), andhal_setup()now say so and give the one command that gets you working:hal_configure(backend = "claude"). The install instructions are still shown. Default backends are unchanged — this only changes the message in a case that already failed. Detection checks thePATHandCLAUDE_CLI_PATHonly; it never runs a subprocess. - **Fixed: slow
eval_rcalls could abort a healthy Claude turn.** Tool calls execute synchronously inside the Claude client's response loop, but the prompt deadline only reset when the CLI produced output -- so time spent running your R code counted as the model stalling. A single slow eval (eval_timeoutdefaults to 30s, roughly double that when plot vision re-renders) could exhaust the 60sprompt_timeoutand abort a turn that was progressing normally. Time spent servicing tool calls is now credited back to the deadline. - **Fixed: a failed Claude turn wedged the session.** The client marked a session as created only after a *successful* turn. If a turn timed out or the CLI died mid-stream, the session already existed in Claude Code's store but hal did not know it -- so every subsequent prompt re-sent
--session-idwith a live uuid and was rejected, untilhal_reset(). The session is now latched as soon as the CLI announces it, so a failed turn is simply retried with--resume. Timeout messages say so. - **Fixed:
hal_setup(backend = "claude")installed the Copilot CLI.** The documented"claude"value had no branch inhal_setup(), so it fell through to the Copilot path and either mislabelled Claude as Copilot or rannpm install -g @github/copilot. There is now a real Claude branch that verifies theclaudebinary, reports its version, and points at the download plus one-time OAuth step. It deliberately does not auto-install: Claude Code's sign-in is interactive, and an npm install produces exactly the.cmdshim whose stdio processx drops on Windows. - **Fixed: MCP subprocess crash on R 4.1--4.3.** The generated MCP server script used
%||%without defining it; base R only gained%||%in 4.4.0. The script now defines it, matching the package's declared R >= 4.1 support. - **Fixed: blank destination in the first-run data notice on the vscode backend.** The one-time "hal sends prompts and tool results to the ..." notice had no vscode branch and rendered an empty slot; it now names the model behind your Positron Copilot sign-in.
- **CRAN preparation.**
- **
hal()now asks before creatinghal.md.** Previously it wrote the project memory file into your working directory on first use and told you afterwards. It now offers — "Create hal.md?", default no — and writes only on an explicit yes. It never asks in a non-interactive session, asks at most once per folder per R session, and a decline is not undone byhal_reset(). Turn the offer off withoptions(hal.memory_prompt = FALSE). An existinghal.mdis still read in any context, whatever you answered. - Removed the never-shipped
hal_query_mapsurface: thehal_configure(max_spawn =)parameter andhal.max_spawnoption documented a function that does not exist. - Mock-CLI tests (which spawn local
Rscriptsubprocesses) are skipped on CRAN; the rest of the suite runs there. DESCRIPTIONrewritten per CRAN conventions; staleLICENSEcopyright holder fixed;.vscode/excluded from the build.
From NEWS.md in the release
Install
Health
- OK13 OKNow
- OK6 OK2026-10-07
Documentation
Documentation signals are not tracked yet for this package.
- Agent tools HTML
- Backends: vscode, Copilot, Claude HTML
- Getting started HTML
- Safety & permissions HTML
Downloads
Repository
- PRs merged (all time)
- 100%
- Median days to close, 50 most recently updated closed issues
- not measured
- Median days to close, 50 most recently updated closed PRs
- 0
12 development-tooling and community-health practices detected across 7 families in the upstream repository
Checks run against github.com/arclite-red/hal on 2026-10-11.
The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel
GitHub Pages site last deployed 2026-10-08 · The repository has a site deploy workflow
Show all practicesHide 3 practices
This repository shows signs of AI coding tools.
- Claude Codefirst seen on or before 2026-09-25Named in .Rbuildignore: CLAUDE.mdNamed in .gitignore: .claude, CLAUDE.mdCommits: at least 1 crediting it in the message
- Claude Opus 5.51 commit · Sep 2026
Dependencies
Code & Tests
People & History
- 0.1.4Latest2026-10-06 · current release ·
3 days in CRAN's queue
Listed in CRAN's incoming queue from 2026-10-03 21:57 to 2026-10-06 15:36 UTC, in 13 readings. - RR 4.6.0 released · 2026-04-24
Package metadata
- First published
- 2026-10-06
- Total releases
- 1 / 1 yrs
- License
- MIT + file LICENSE OSI
- Download size
- 2.8 MB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("hal")This is what citation() produces when a package has no citation file of its own. If it prints something else, use that.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-19, which the citation names so these numbers can be found later. More on citing and the projects behind them.