Skip to content

sess package progress #1712

Description

@TinasheMTapera

Describe the bug
Early adopter of sess here just adding to the data in case its useful! I have one or two projects for which sess installed from the VSCode popup prompt, and it worked perfectly, and others for which it didn't. Today, I tried to deliberately add sess using rv add (I use rv for project package management):

rv repositories active!
repositories: 
  CRAN: https://packagemanager.posit.co/cran/latest

rv libpaths active!
library paths: 
  /n/holylabs/cgolden_lab/Lab/frontier/works/prospectors/prospectorKiribatiBioMarkers/rv/library/4.5/x86_64/redhat8
  /n/home03/ttapera/software/spack/opt/spack/linux-icelake/r-4.5.1-7hho5emqpuvlwt7hhy7i5fval54zz7mx/rlib/R/library
Warning message:
In sess::connect(use_rstudioapi = as.logical(Sys.getenv("SESS_RSTUDIOAPI",  :
  [sess] Connection info not available. Cannot connect to VS Code.
# arf console v0.3.3
# Edit mode: emacs
# R 4.5.1 is ready.
# Type :cmds for meta commands list, Ctrl+D to exit.
R 4.5.1> sess::connect()
Warning message:
In sess::connect() :
  [sess] Connection info not available. Cannot connect to VS Code.
R 4.5.1> sessionInfo()
R version 4.5.1 (2025-06-13)
Platform: x86_64-pc-linux-gnu
Running under: Rocky Linux 8.10 (Green Obsidian)

Matrix products: default
BLAS/LAPACK: /n/home03/ttapera/software/spack/opt/spack/linux-icelake/openblas-0.3.33-xlojbage3rtl5frqwshts2o3qlkej7t6/lib/libopenblas-r0.3.33.so;  LAPACK version 3.12.0

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8     LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8    LC_PAPER=en_US.UTF-8      
 [8] LC_NAME=C                  LC_ADDRESS=C               LC_TELEPHONE=C             LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

time zone: America/New_York
tzcode source: internal

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
[1] compiler_4.5.1 sess_3.0.0    
R 4.5.1> 

To Reproduce
Steps to reproduce the behavior:

rv add sess --git https://github.com/REditorSupport/vscode-R --directory sess --commit 20f32fe142145152c4cfa6a65f9a89 4f77adde9e

Can you fix this issue by yourself? (We appreciate the help)

Yes / No

(If yes,) can we assist you with anything?

(If applicable) Please attach setting.json

{
    "r.plot.useHttpgd": true,
    "r.rterm.linux": "${workspaceFolder}/.vscode/arf",
    "r.workspaceViewer.showObjectSize": true,
    "terminal.integrated.defaultProfile.linux": "bash",
    "terminal.integrated.profiles.linux": {
        "bash": {
        "path": "/bin/bash"
        }
    },
    "livePreview.defaultPreviewPath": "/docs/index.html",
    "r.bracketedPaste": true,
    "r.sessionWatcher": true,
    "r.alwaysUseActiveTerminal": true,
    "r.rpath.linux": "/n/holylabs/cgolden_lab/Lab/frontier/works/prospectors/prospectorKiribatiBioMarkers/.spack-env/view/bin/R",
    "python.terminal.activateEnvInCurrentTerminal": true,
    "r.libPaths": [
        "/n/holylabs/cgolden_lab/Lab/frontier/works/prospectors/prospectorKiribatiBioMarkers/rv/library/4.5/x86_64/redhat8",
        "/n/home03/ttapera/software/spack/opt/spack/linux-icelake/r-4.5.1-7hho5emqpuvlwt7hhy7i5fval54zz7mx/rlib/R/library"
    ]
}

# ./.vscode/arf
#!/usr/bin/env bash
set -euo pipefail

PROJECT_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"

SPACK_VIEW="$PROJECT_ROOT/.spack-env/view"

export PATH="$SPACK_VIEW/bin:$PATH"

export LD_LIBRARY_PATH="$SPACK_VIEW/lib:$SPACK_VIEW/lib64:${LD_LIBRARY_PATH:-}"

export PKG_CONFIG_PATH="$SPACK_VIEW/lib/pkgconfig:$SPACK_VIEW/lib64/pkgconfig:${PKG_CONFIG_PATH:-}"

exec  ~/.cargo/bin/arf "$@"

Expected behavior
sess connected or sess::connect() to be successful
Screenshots
If applicable, add screenshots to help explain your problem.
You can show the keyboard contents by pressing F1 and Developer: toggle screencast mode

Environment (please complete the following information):

  • OS: Linux (HPC Rocky cluster)
  • VSCode Version: 1.122.1 (Universal)
  • R Version: 4.5.1
  • vscode-R version: 3.0.0-rc.0

Additional context
Good luck! I'm quite optimistic that the sess package is the solution we've all been waiting for

Activity

  1. randy3k commented on Jun 6, 2026

    @randy3k
    Member

    It is a bit odd that Connection info not available. How did you launch the R program?

  2. grantmcdermott commented on Jul 22, 2026

    @grantmcdermott
    Contributor

    @TinasheMTapera what does your rproject.toml look like? I have sess working in an rv-enabled projected with the following entry:

    dependencies = [
      <...>
      { name = "sess", git = "https://github.com/REditorSupport/vscode-R", branch = "master", directory = "sess" },
      <...>
    ]

    P.S. Seconding the larger question raised by this issue, though. Any timeline for when sess might get submitted to CRAN @randy3k?

  3. TinasheMTapera commented on Jul 22, 2026

    @TinasheMTapera
    Author

    @grantmcdermott I recently started doing the same as you in Singularity/Docker.

    I first predict the system dependencies using pak::pkg_sys_reqs(c(MY LIST OF USUAL SUSPECTS)), which tells me to install stuff like curl and LibXML and ICU in the docker container.

    I then use Spack to install any low level C stuff like PROJ and GEOS if I'm doing geospatial data, or low level dependencies for string libraries and such.

    Lastly, I put all my packages in rv and I compile all of my packages per project; sess is the only one I get from github source.

    Now, setting it up works like a charm. But sess is not totally stable yet for me. It does the job, but there are still some hiccups. So I've resigned to using it in its incomplete state while the devs continue to work on it.

  4. TinasheMTapera commented on Jul 22, 2026

    @TinasheMTapera
    Author

    Sitrep off the top of my head using the above workflow:

    • clicking R button attaches current terminal
    • tar_visnetwork() works (network visualization, I think it uses DiagrammeR?)
    • plot() works but takes ages
    • View() doesn't work, error pop up
    • clicking away from terminal detaches, but clicking button reattaches the terminal to the same state
    • syntax highlighting works
    • ?function() works
    Image
  5. grantmcdermott commented on Jul 23, 2026

    @grantmcdermott
    Contributor
    • plot() works but takes ages

    Is this just for the first plot, or for subsequent plots too?

    Also, could you try installing jgd and check plotting performance then? (It should be invoked as the plotting backend automatically provided you are using the 3.0.0-rc version of the extension.)

  6. eitsupi commented on Aug 4, 2026

    @eitsupi
    Member

    IIUC, CRAN is not a repository intended for storing developer tools, so submitting to CRAN and recommending installation from CRAN is risky.
    R-universe, where you can control your own release timing, is a far more suitable option.


    Investigated with Claude Code against the extension source at c02ace5.

    The [sess] Connection info not available warning looks independent of rv. sess::connect() can only find the pipe path in two ways:

    1. the SESS_PIPE env var, which is set in rTerminal.ts only when the extension itself creates the R terminal, and
    2. ~/.vscode-R/sessions/<Sys.getpid()>.json, which writeSessionFile() writes keyed on the shell process ID of a terminal named R Interactive.

    So whenever R is not the direct process of an extension-created terminal — a wrapper script, module load, srun, ssh, tmux, or any REPL front-end that runs R as a child process — both lookups miss and connect() bails out with that warning. That would explain "works in some projects, fails in others" if the terminal setup differs between workspaces.

    Workaround: run R: Connect to Session (r.connectToSession), which copies a source(...) command carrying the explicit pipe path, and paste it into the R session. Setting r.alwaysUseActiveTerminal makes r.activateRSession send it to the active terminal instead.

    One more thing relevant to rv users: the bundled auto-install runs install.packages(<sess src>, repos = NULL, type = "source") into .libPaths()[1], which under rv is the project library. rv sync makes that library match the lockfile exactly, so an auto-installed sess is removed on the next sync — which is why it has to be declared in rproject.toml. rv has no dev/optional dependency concept either (project.dev_dependencies parses but is never read anywhere), so it can only go in the regular dependencies.


    Edit: See also A2-ai/rv#336

  7. grantmcdermott commented on Sep 27, 2026

    @grantmcdermott
    Contributor

    With the imminent 3.0.0 release, I've just been working through the two "failing" items from your helpful sitrep @TinasheMTapera:

    • plot() works but takes ages

    I cannot reproduce, despite trying with different plot backends (standard, jgd, and httpgd) on both Mac and Linux (the two OSs that I have access to). Plotting is instantaneous for me.

    • View() doesn't work, error pop up

    Again, I cannot reproduce. There have some some additional improvements to the viewer since your initial testing (e.g., #1703), so these may have fixed it.

    RE: sess and rv compatibility. Disregarding the potential upstream tweak highlighted by @eitsupi (A2-ai/rv#336), another point worth mentioning is that sess is now installable from r-universe: https://reditorsupport.r-universe.dev/sess Alongside the git commit approach (above), I believe that this now gives two installation paths for sess in rv powered projects. For the record, I still favour releasing stable sess versions to CRAN. But I think this issue can now be closed.

    Please reopen if you feel that I've missed something.

  8. TinasheMTapera commented on Sep 27, 2026

    @TinasheMTapera
    Author

    The r-universe feature will almost certainly solve my problems, thank you so much for your hard work!

  9. leanhdung1994 commented on Sep 28, 2026

    @leanhdung1994
  10. eitsupi commented on Oct 10, 2026

    @eitsupi
    Member

    Related to #1856

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions