Skip to content

after "nix-shell", if roocode runs a command it opens a new shell, cancelling the nix-shellΒ #7021

@UriZafrir

Description

@UriZafrir

App Version

3.25.11

API Provider

Google Gemini

Model Used

gemini-2.5-flash

Roo Code Task Links (Optional)

No response

πŸ” Steps to Reproduce

see video:

Screencast.From.2025-08-12.23-32-30.webm

run nix-shell for example with the be;pw shell.nix file:

tell roocode to run "ls"
it opens a new bash

let
  pkgs = import <nixpkgs> { };
in
pkgs.mkShell {
  nativeBuildInputs = with pkgs; [
    pkg-config
    gobject-introspection
    cargo
    cargo-tauri
    nodejs
  ];

  buildInputs = with pkgs;[
    at-spi2-atk
    atkmm
    cairo
    gdk-pixbuf
    glib
    gtk3
    harfbuzz
    librsvg
    libsoup_3
    pango
    webkitgtk_4_1
    openssl
  ];
}

after running "env" before and after "nix-shell" these are the difference according to AI:


Comparison of Scenario 1 (Base) vs. Scenario 2 (nix-shell original):

New variables in nix-shell (Scenario 2 only):

NIX_BUILD_CORES
configureFlags
mesonFlags
PKG_CONFIG_PATH (extensively modified with Nix store paths)
shell (points to /nix/store/.../bash-5.2p37/bin/bash)
depsHostHost
stdenv
builder
GDK_PIXBUF_MODULE_FILE
shellHook (empty, but present)
phases
SOURCE_DATE_EPOCH
NIX_ENFORCE_NO_NATIVE
CXX
TEMPDIR
system
HOST_PATH (extensively modified with Nix store paths)
IN_NIX_SHELL (value impure)
doInstallCheck
LD
READELF
buildPhase (multi-line string)
GETTEXTDATADIRS_FOR_BUILD
doCheck
depsBuildBuild
AR
AS
TEMP
NIX_BINTOOLS_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu
NIX_BUILD_TOP
NM
NIX_CFLAGS_COMPILE (extensively modified with Nix store paths)
propagatedNativeBuildInputs
strictDeps
outputs
cmakeFlags
NIX_STORE
TMPDIR (duplicate of TEMP)
NIX_PKG_CONFIG_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu
NODE_PATH
depsBuildTarget
OBJCOPY
out
STRIP
propagatedBuildInputs (extensively modified with Nix store paths)
CC
NIX_CC
NIX_CC_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu
CONFIG_SHELL
__structuredAttrs
RANLIB
NIX_HARDENING_ENABLE
NIX_LDFLAGS (extensively modified with Nix store paths)
nativeBuildInputs
name
PKG_CONFIG
depsHostHostPropagated
Modified variables in nix-shell (Scenario 2 vs. Scenario 1):

SHELL: Changed from /run/current-system/sw/bin/bash to /nix/store/.../bash-interactive-5.2p37/bin/bash.
PATH: Significantly expanded with many Nix store paths.
SHLVL: Increased from 2 to 3.
GI_TYPELIB_PATH: Significantly expanded with many Nix store paths.
XDG_DATA_DIRS: Significantly expanded with many Nix store paths.
LIBEXEC_PATH: Significantly expanded with many Nix store paths.
NIX_PROFILES: Expanded.
INFOPATH: Expanded.
GTK_PATH: Expanded.
QTWEBKIT_PLUGIN_PATH: Expanded.
GIO_EXTRA_MODULES: Expanded.
LD_LIBRARY_PATH: Expanded.
GSETTINGS_SCHEMAS_PATH: Expanded.
Variables that remained the same (or mostly the same, excluding path expansions):

PWD (confirmed correct)
TERM (confirmed xterm-256color)
PROMPT_EOL_MARK (still empty)
All VSCODE_ prefixed variables.
Many other standard environment variables.

πŸ’₯ Outcome Summary

expected not to create new shell

πŸ“„ Relevant Logs or Errors (Optional)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue/PR - TriageNew issue. Needs quick review to confirm validity and assign labels.bugSomething isn't working

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions