Skip to content

[all platform] sandbox uses unsupported and incorrectly named history environment variable PYTHONHISTFILE #1735

@zNeill

Description

@zNeill

Description

[Description]
The sandbox sets the PYTHONHISTFILE environment variable, but this name is not recognized by CPython. Python 3.13 and later use PYTHON_HISTORY to control the .python_history location, and Python 3.11 (which this sandbox runs) does not support that environment variable at all. As a result, the Python REPL ignores PYTHONHISTFILE and still uses its built‑in default history file path (typically ~/.python_history), so history is not saved to /tmp/.python_history as intended.

[Environment]
Device: Ubuntu 24.04
Node.js: v22.22.2
npm: 10.9.7
Docker: Docker version 28.2.2
OpenShell CLI: 0.0.26
NemoClaw: v0.0.11
Python (sandbox): 3.11.2

[Steps to Reproduce]

  1. nemoclaw my-assistant connect
  2. echo $PYTHONHISTFILE → /tmp/.python_history
  3. python3 -c "import readline; readline.add_history('test'); readline.write_history_file()"
  4. echo $? → 0
  5. ls -la /tmp/.python_history → No such file or directory

[Expected Result]
/tmp/.python_history exists

[Actual Result]
/tmp/.python_history not found

[Fix Suggestion]

    1. Update the sandbox to run Python 3.13 or later, because the PYTHON_HISTORY environment variable is only supported starting from Python 3.13.
  • 2.Replace the incorrect PYTHONHISTFILE variable with the correct PYTHON_HISTORY variable so that the Python REPL history is actually written to /tmp/.python_history instead of falling back to the default ~/.python_history location or being lost.

Bug Details

Field Value
Priority Unprioritized
Action Dev - Open - To fix
Disposition Open issue
Module Machine Learning - NemoClaw
Keyword NemoClaw, NEMOCLAW_GH_SYNC_APPROVAL

[NVB# 6066385]

[NVB#6066385]

Metadata

Metadata

Assignees

No one assigned

    Labels

    NV QABugs found by the NVIDIA QA Teamplatform: ubuntuAffects Ubuntu Linux environments

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions