Skip to content

Agentic Coding Assistants

0packages depend
337downloads / year
56.2%test coverage
13/13flavors OK

Overview

About

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.

Changes in 0.1.4
  • **Plot vision: the model can now see your plots.** When eval_r code 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 with hal_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 error section; 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 as attr(result, "hal_verify") (print it for details). Suspicious patterns -- output identical to input, or 0-row output -- raise a classed hal_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 = FALSE or hal_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 and vscode.lm have 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.lm ids (claude-opus-4.8, claude-opus-5, claude-sonnet-5) were missing and reported as NA. 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(), and hal_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 the PATH and CLAUDE_CLI_PATH only; it never runs a subprocess.
  • **Fixed: slow eval_r calls 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_timeout defaults to 30s, roughly double that when plot vision re-renders) could exhaust the 60s prompt_timeout and 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-id with a live uuid and was rejected, until hal_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 in hal_setup(), so it fell through to the Copilot path and either mislabelled Claude as Copilot or ran npm install -g @github/copilot. There is now a real Claude branch that verifies the claude binary, 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 .cmd shim 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 creating hal.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 by hal_reset(). Turn the offer off with options(hal.memory_prompt = FALSE). An existing hal.md is still read in any context, whatever you answered.
  • Removed the never-shipped hal_query_map surface: the hal_configure(max_spawn =) parameter and hal.max_spawn option documented a function that does not exist.
  • Mock-CLI tests (which spawn local Rscript subprocesses) are skipped on CRAN; the rest of the suite runs there.
  • DESCRIPTION rewritten per CRAN conventions; stale LICENSE copyright holder fixed; .vscode/ excluded from the build.

From NEWS.md in the release

Install

Health

CRAN checks
13OK
Slowest check: 2.1 min · r-oldrel-windows-x86_64
Status changes
  • OK13 OKNow
  • OK6 OK2026-10-07
Advisories

none known

Documentation

Downloads

337
CRAN downloads in the past year
Rank #25,259 · ~1/day · ~28/mo
hal
Daily download trend is not available in this view yet.
33730 days
33790 days
3371 year
Compare downloads with other packages →

Repository

3Stars
0Forks
0Open issues
0Open PRs
1Releases
8Commits
2Commit identities
ai-agentclaude-codecrangithub-copilotllmmcppositronr
8 commits · Last activity 2026-10-15 · +200% stars, 30d
Responsiveness
How these are sampled
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
PracticesBeta

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.

Continuous integration (2)
GitHub ActionsR CMD check workflow

The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel

Governance and community (1)
Security policy
Docs source (4)
README.Rmdpkgdown

GitHub Pages site last deployed 2026-10-08 · The repository has a site deploy workflow

Reproducibility and dev environment (1)
data-raw/
Show all practicesHide 3 practices
CRAN release process (2)
cran-comments.mdCRAN-SUBMISSION
Automation and maintenance (1)
Dependabot
Git structural (1)
.gitattributes
How this is detected·Detection ruleset v3 (2026-09-26)
AI coding toolsBeta

This repository shows signs of AI coding tools.

  • Claude Codefirst seen on or before 2026-09-25
    Named in .Rbuildignore: CLAUDE.md
    Named in .gitignore: .claude, CLAUDE.md
    Commits: at least 1 crediting it in the message
Models named in its commits
  • Claude Opus 5.51 commit · Sep 2026
Counts are commits, not lines of code. Commits by a tool's accounts count once across all of its accounts. Commits crediting it are the largest count among its credit lines, a minimum.How this is detected·Detection ruleset v4 (updated 2026-09-27)

Dependencies

Declared dependencies
17 external dependencies (excludes base and recommended)

Installing hal adds 7 packages (6 with compiled code, 3.5 MB of source tarballs). Heaviest: jsonlite 1.0 MB, rlang 766 KB, curl 714 KB.

Depends (1)
R >= 4.1
LinkingTo (0)
none
Enhances (0)
none
Reverse dependencies
0direct
0indirect

Nothing depends on this yet.

People & History

People (1)
Author, Maintainer since 0.1.4 (2026)
Releases (1)
  • 0.1.4Latest
    2026-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.
  • R
    R 4.6.0 released · 2026-04-24
Across CRAN, the median accepted release of the past year spent 15 hours in the queue, 90% under 11 days.How queue time is measured

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")
Dippold, M. (2026). hal: Agentic Coding Assistants (Version 0.1.4) [Computer software]. https://doi.org/10.32614/CRAN.package.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.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for hal version 0.1.4 [Data set]. HJJB, LLC. Data release v2026-10-19. https://doi.org/10.5281/zenodo.21843040

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.

Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy