ml-intern icon indicating copy to clipboard operation
ml-intern copied to clipboard

Support gh and hf CLIs in agent sandboxes

Open akseljoonas opened this issue 7 months ago • 3 comments

Summary

  • install GitHub CLI and Hugging Face CLI in generated sandbox images
  • document when agents should use gh/hf through bash in sandbox and local CLI modes
  • allow sandbox_create to receive a user-owned GitHub token as GH_TOKEN/GITHUB_TOKEN while continuing to inject the user's HF_TOKEN

Fixes #167.

Tests

  • UV_CACHE_DIR=/tmp/uv-cache uv run --extra dev pytest tests/unit/test_sandbox_cli_support.py tests/unit/test_sandbox_api_auth.py tests/unit/test_sandbox_already_active_message.py
  • Live cpu-basic sandbox akseljoonas/ml-intern-cli-live-f54f2f70: verified gh path/version, hf path/version, hf auth whoami, HF_TOKEN present; deleted after test

Not tested

  • Authenticated GitHub CLI operations inside a sandbox with a real user GitHub token; no user GitHub token was supplied for live testing

akseljoonas avatar Apr 28 '26 18:04 akseljoonas

Claude encountered an error —— View job


I'll analyze this and get back to you.

github-actions[bot] avatar Apr 28 '26 18:04 github-actions[bot]

Claude encountered an error —— View job


I'll analyze this and get back to you.

github-actions[bot] avatar Apr 28 '26 18:04 github-actions[bot]

closed per maintainer request

fglogan avatar May 03 '26 14:05 fglogan